Questions tagged [reflection]
Reflection is the ability of a computer program to examine, introspect, and modify its own structure and behavior at runtime.
56 questions
3 votes
0 answers
116 views
How to implement introspection of user-defined data in my software renderer
I am in the process of writing my own software renderer. I am currently working on setting up a shader system that allows users of the renderer to create their own Vertex Shader and Fragment Shader. ...
13 votes
6 answers
10k views
Why use a special "Name" class (instead of just a string) for representing object names in C++?
Suppose we have an Instance class in a C++ program, which has a GUID/UUID, name, parents, children, and other properties which can be saved to or loaded from an XML file. The intuitive approach for ...
0 votes
1 answer
2k views
Mapping list to another list dynamically
I had an idea for a piece of software using .NET C# as technology. Basically, in my idea Im thinking of using reflection to do the mapping between a class to another class using interactivity with a ...
17 votes
4 answers
6k views
What do IDEs use to do code completion suggestions?
For example if I have a class like class Foo { public int bar; public Foo(int constructor_var) { bar = construction_var; } public bar_plus_one() { return bar++; }...
3 votes
1 answer
2k views
Alternative to Reflection
I will directly come to our current working flow so that you can understand the problem in a clear picture. I am attached in Laboratory Automation System in which Analyzer (a machine that performs ...
0 votes
1 answer
224 views
Method for loading and running user defined code in .NET windows application
Are there any patterns that address how to have and application load and run user defined code at run-time? I am looking into developing a C# library that the users of a Test Executive application (...
0 votes
1 answer
93 views
Effective ways of dealing with static analyser warnings caused by incidental use of reflection
I don't normally use reflection directly while programming in Java. But I do use APIs and frameworks that internally rely on reflection or annotations to provide customization points. A lot of ...
1 vote
1 answer
105 views
Is there a simple way to call a method on an object in another program with a given id over TCP?
I'm working on a project where I have two programs which need to invoke methods on some of each other's objects. I do this by sending JSON objects over a TCP connection. These objects have a ...