|
OK so that title sucks a little but I could not think of anything better (maybe someone else can?).
So I have a few questions around a subject here. What I want to do is create a program that can take an object and use reflection to list all its properties...
Started by Jon on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
All you need to do is to drop.
See this answer on how to build a "reflection engine".
He did.
|
|
Hi all,
I try to run a jar using reflection with the the getMethod and invoke method but ran in trouble with the arguments passed to the invoke method:
String mainClass = myprog.Run; String[] args = new String[2]; args[0] = "-a"; args[1] = "-c ./config...
Started by David Michel on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Maybe if we have a look at your main method, and in particular the way the arguments are managed, we... .
String[] args = new String[3]; args[0] = "-a"; args[1] = "-c"; args[2] = "./config/param.xml"
But please provide the code which causes the exception .
|
|
I understand the reflection API (in c#) but I am not sure in what situation would I use it. What are some patterns - anti-patterns for using reflection?
Started by StackUnderflow on
, 17 posts
by 17 people.
Answer Snippets (Read the full thread at stackoverflow):
Don't go looking for places to use it just binding....
Use reflection when you can't do what you want without use it a lot, but Reflection is a complex, slow beast.
Don't use reflection without a good reason.
|
Ask your Facebook Friends
|
Can a transient field in a class be obtained using reflection? (using getDeclaredField(..) )
Started by java_geek on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The field is still declared by the class, so it is fair game for reflection..
It's the value will not be serialized.
So no logical reason for it not to be accessible by reflection.
Fields are included.
|
|
Does a typed dataset use reflection on runtime?
Started by Blankman on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
It is just a code generated wrapper that completely compiled and does no reflection in runtime.
There is no reason for reflection to be in use on a typed dataset since you haveNo.
To runtime.
|
|
Possible Duplicates:
When do you use reflection? Patterns/anti-patterns
What exactly is Reflection and when is it a good approach?
What is the need for reflection in .NET? What are the situations where it comes in handy?
Started by Milen on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
The programming paradigm driven ....
You can use reflection to find all object of Type X in a given Assembly, or invoke some methodI think the Wikipedia article on reflection is pretty good:
In computer science, reflection.
|
|
I am using reflection to convert datareader into the generic collection list. Can anybody suggest me the best way to implement reflection for this? I want the fastestway?
Started by jalpesh on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
I then have a few object of the DotNetNuke framework... .
This way I avoid the need for reflection, and the performance is great.
I then use an interface from the DR.
Process where I create information objects that hold the data that is returned .
|
|
Hi,
We've got into a very tricky scenario in a project. We have used lot of reflection in our project.
We have ..
Validation Framework driven by Attributes and Reflection Extension methods that transaforms a DataRow to an Entity Object using Attributes...
Started by this. __curious_geek on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
With regards to deciding not to use reflection is using it to get at properties you wouldn't normally have should dictate whether or not it is appropriate to use reflection and as with my comment, test, test to not ....
|
|
Is there a way to use .NET reflection to capture the values of all parameters/local variables?
Started by Christopher on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Reflection will tell you the type of parameters that a method has but it won't help discover their values during any....
You might want to extract it.
It reads the Assembly.
Reflection is not used to capture information from the stack.
|
|
I know what Reflection is but why would I need to use it in a typical line-of-business Winforms app?
Started by Simon on
, 13 posts
by 13 people.
Answer Snippets (Read the full thread at stackoverflow):
Object creation methods can be marked with attributes with ... .
We also use reflection extensively in the Factory Pattern.
One common scenario is to reflect through assemblies to find, load and use plugins for your application.
|