Package com.intergral.deep.reflect
Class ReflectionImpl
- java.lang.Object
-
- com.intergral.deep.reflect.ReflectionImpl
-
- All Implemented Interfaces:
com.intergral.deep.agent.api.reflection.IReflection
public class ReflectionImpl extends Object implements com.intergral.deep.agent.api.reflection.IReflection
The version of reflection used before modules where added.
-
-
Constructor Summary
Constructors Constructor Description ReflectionImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
callConstructor(Constructor<?> constructor, Object... args)
<T> T
callField(Object target, Field field)
<T> T
callMethod(Object target, String methodName, Object... args)
Constructor<?>
findConstructor(Class<?> clazz, Class<?>... args)
Method
findMethod(Class<?> originalClazz, String methodName, Class<?>... argTypes)
Field
getField(Object obj, String fieldName)
Iterator<Field>
getFieldIterator(Class<?> clazz)
<T> T
getFieldValue(Object target, String fieldName)
Set<String>
getModifiers(Field field)
boolean
setAccessible(Class<?> clazz, Constructor<?> constructor)
boolean
setAccessible(Class<?> clazz, Field field)
boolean
setAccessible(Class<?> clazz, Method method)
-
-
-
Method Detail
-
setAccessible
public boolean setAccessible(Class<?> clazz, Field field)
- Specified by:
setAccessible
in interfacecom.intergral.deep.agent.api.reflection.IReflection
-
setAccessible
public boolean setAccessible(Class<?> clazz, Method method)
- Specified by:
setAccessible
in interfacecom.intergral.deep.agent.api.reflection.IReflection
-
setAccessible
public boolean setAccessible(Class<?> clazz, Constructor<?> constructor)
- Specified by:
setAccessible
in interfacecom.intergral.deep.agent.api.reflection.IReflection
-
callMethod
public <T> T callMethod(Object target, String methodName, Object... args)
- Specified by:
callMethod
in interfacecom.intergral.deep.agent.api.reflection.IReflection
-
findMethod
public Method findMethod(Class<?> originalClazz, String methodName, Class<?>... argTypes)
- Specified by:
findMethod
in interfacecom.intergral.deep.agent.api.reflection.IReflection
-
getField
public Field getField(Object obj, String fieldName)
- Specified by:
getField
in interfacecom.intergral.deep.agent.api.reflection.IReflection
-
getFieldValue
public <T> T getFieldValue(Object target, String fieldName)
- Specified by:
getFieldValue
in interfacecom.intergral.deep.agent.api.reflection.IReflection
-
getFieldIterator
public Iterator<Field> getFieldIterator(Class<?> clazz)
- Specified by:
getFieldIterator
in interfacecom.intergral.deep.agent.api.reflection.IReflection
-
callField
public <T> T callField(Object target, Field field)
- Specified by:
callField
in interfacecom.intergral.deep.agent.api.reflection.IReflection
-
getModifiers
public Set<String> getModifiers(Field field)
- Specified by:
getModifiers
in interfacecom.intergral.deep.agent.api.reflection.IReflection
-
findConstructor
public Constructor<?> findConstructor(Class<?> clazz, Class<?>... args)
- Specified by:
findConstructor
in interfacecom.intergral.deep.agent.api.reflection.IReflection
-
callConstructor
public <T> T callConstructor(Constructor<?> constructor, Object... args)
- Specified by:
callConstructor
in interfacecom.intergral.deep.agent.api.reflection.IReflection
-
-