Top "Reflection" questions

How to loop through all the properties of a class?

I have a class. Public Class Foo Private _Name As String Public Property Name() As String Get Return _Name End …

.net vb.net class reflection properties
Invoking a static method using reflection

I want to invoke the main method which is static. I got the object of type Class, but I am …

java reflection static
How to check whether an object has certain method/property?

Using dynamic pattern perhaps? You can call any method/property using the dynamic keyword, right? How to check whether the …

c# .net methods reflection properties
Check if a Class Object is subclass of another Class Object in Java

I'm playing around with Java's reflection API and trying to handle some fields. Now I'm stuck with identifying the type …

java class reflection
How to dynamically load a Python class

Given a string of a Python class, e.g. my_package.my_module.MyClass, what is the best possible way …

python reflection python-import
C# Reflection: How to get class reference from string?

I want to do this in C#, but I don't know how: I have a string with a class name …

c# reflection
Copy all values from fields in one class to another through reflection

I have a class which is basically a copy of another class. public class A { int a; String b; } public …

java reflection
At runtime, find all classes in a Java application that extend a base class

I want to do something like this: List<Animal> animals = new ArrayList<Animal>(); for( Class c: …

java reflection inheritance
Convert a python 'type' object to a string

I'm wondering how to convert a python 'type' object into a string using python's reflective capabilities. For example, I'd like …

python reflection
Programmatic equivalent of default(Type)

I'm using reflection to loop through a Type's properties and set certain types to their default. Now, I could do …

c# reflection default