About 9,910,000 results
Open links in new tab
  1. java - What is reflection and why is it useful? - Stack Overflow

    Sep 1, 2008 · What is reflection, and why is it useful? I'm particularly interested in Java, but I assume the principles are the same in any language.

  2. reflection - How do I invoke a Java method when given the method …

    You should use reflection - init a class object, then a method in this class, and then invoke this method on an object with parameters. Remember to wrap the following snippet in block

  3. Java reflection - access protected field - Stack Overflow

    Dec 6, 2013 · How can I access an inherited protected field from an object by reflection?

  4. reflection - Retrieve only static fields declared in Java class - Stack ...

    Retrieve only static fields declared in Java class Asked 15 years, 4 months ago Modified 6 years, 11 months ago Viewed 116k times

  5. Get type of a generic parameter in Java with reflection

    The key is that when Java determines this Type object, it uses type information present in the child to associate type information with our type parameters in the new ParameterizedType instance. So now …

  6. Java introspection and reflection - Stack Overflow

    Jan 11, 2010 · Reflection (taken from oracle java tutorial) Reflection is commonly used by programs which require the ability to examine or modify the runtime behavior of applications running in the …

  7. java - How do I access private methods and private data members via ...

    you can access private everything with reflection - methods, constructors, data members, everything. How can I access the private methods and the private data members?

  8. Change private static final field using Java reflection

    Jul 21, 2010 · I have a class with a private static final field that, unfortunately, I need to change it at run-time. Using reflection I get this error: java.lang.IllegalAccessException: Can not set static final

  9. Java Reflection: how can you get constructor of a class you don't know ...

    Mar 21, 2022 · Let's say you're making a general reflection class. You're given the name of the class in string format: So you do Class.forName (class_name) to get the class name.

  10. java - How to get the fields in an Object via reflection ... - Stack ...

    Sep 20, 2010 · I've an object (basically a VO) in Java and I don't know its type. I need to get values which are not null in that object. Maybe you don't necessary need reflection for that -- here is a plain …