Category "reflection"

Automatically delegating all methods of a java class

Say I have a class with many of public methods: public class MyClass { public void method1() {} public void method2() {} (...) public void met

How to programmatically find public properties of a class from inside one of it's methods

I've got a class Foo with public and protected properties. Foo needs to have a non-static method, getPublicVars() that returns a list of all the public propert

Php, reflection, how to remove "final" declaration?

I want to test a class which is declared: "final class testme" and cannot be mocked. How to remove the "final" keyword with reflections?

Call custom constructor with Dapper?

I'm trying to use Dapper to interface with the ASP.NET SQL Membership Provider tables. I wrapped the SqlMembershipProvider class and added an additional method

How to iterate Field of type List using java reflection

I have a class called User which is having List of Account class objects like this public class User{ private List<Account> accounts = new ArrayLi

Merging two objects in Java

I have two objects of same type. Class A { String a; List b; int c; } A obj1 = new A(); A obj2 = new A(); obj1 => {a = "hello"; b = null; c = 10} ob

How to get line number of an instance variable from a java object during runtime

I want to find line number of an instance variable in Java file during run time. So far my understanding, it can be done through java reflection but don't know

How to access a private field of the super class of the super class with reflection in Java?

In one API I am using I have an Abstract Class (Class A) that has a private field (A.privateField). Class B extends Class A within the API. I need to extend C

C# - Fetching property value from child class

I access property value from a class object at run-time using reflection in C#. public bool GetValue(string fieldName, out object fieldValue) {

Class not inheriting from object?

I am working on a method that is using reflection to inspect parameter types of methods. This methods iterates through the ParameterInfo's and is doing somethin

Class not inheriting from object?

I am working on a method that is using reflection to inspect parameter types of methods. This methods iterates through the ParameterInfo's and is doing somethin