public class ReflectionAspect extends Object
| Constructor and Description |
|---|
ReflectionAspect() |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
interceptConstructor(Invocation invocation,
Constructor<?> constructor,
Object[] args)
Overridable advice for a Constructor.newInstance() or Class.newInstance() call.
|
Object |
interceptFieldGet(MethodCalledByConstructorInvocation invocation)
Advice for calls to Field.getXXX().
|
Object |
interceptFieldGet(MethodCalledByMethodInvocation invocation)
Advice for calls to Field.getXXX().
|
protected Object |
interceptFieldRead(Invocation invocation,
Field field,
Object instance)
Overridable advice for a Field.setXXX() call.
|
Object |
interceptFieldSet(MethodCalledByConstructorInvocation invocation)
Advice for calls to Field.setXXX().
|
Object |
interceptFieldSet(MethodCalledByMethodInvocation invocation)
Advice for calls to Field.setXXX().
|
protected Object |
interceptFieldWrite(Invocation invocation,
Field field,
Object instance,
Object arg)
Overridable advice for a Field.setXXX() call.
|
Object |
interceptGetClasses(MethodCalledByConstructorInvocation invocation)
Advice for calls to Class.getClasses().
|
Object |
interceptGetClasses(MethodCalledByMethodInvocation invocation)
Advice for calls to Class.getClasses().
|
Object |
interceptGetConstructors(MethodCalledByConstructorInvocation invocation)
Advice for calls to Class.getConstructors().
|
Object |
interceptGetConstructors(MethodCalledByMethodInvocation invocation)
Advice for calls to Class.getConstructors().
|
Object |
interceptGetDeclaredClasses(MethodCalledByConstructorInvocation invocation)
Advice for calls to Class.getDeclaredClasses().
|
Object |
interceptGetDeclaredClasses(MethodCalledByMethodInvocation invocation)
Advice for calls to Class.getDeclaredClasses().
|
Object |
interceptGetDeclaredConstructor(MethodCalledByConstructorInvocation invocation)
Advice for calls to Class.getDeclaredConstructor().
|
Object |
interceptGetDeclaredConstructor(MethodCalledByMethodInvocation invocation)
Advice for calls to Class.getDeclaredConstructor().
|
Object |
interceptGetDeclaredConstructors(MethodCalledByConstructorInvocation invocation)
Advice for calls to Class.getDeclaredConstructors().
|
Object |
interceptGetDeclaredConstructors(MethodCalledByMethodInvocation invocation)
Advice for calls to Class.getDeclaredConstructors().
|
Object |
interceptGetDeclaredField(MethodCalledByConstructorInvocation invocation)
Advice for calls to Class.getDeclaredField().
|
Object |
interceptGetDeclaredField(MethodCalledByMethodInvocation invocation)
Advice for calls to Class.getDeclaredField().
|
Object |
interceptGetDeclaredFields(MethodCalledByConstructorInvocation invocation)
Advice for calls to Class.getDeclaredFields().
|
Object |
interceptGetDeclaredFields(MethodCalledByMethodInvocation invocation)
Advice for calls to Class.getDeclaredFields().
|
Object |
interceptGetDeclaredMethod(MethodCalledByConstructorInvocation invocation)
Advice for calls to Class.getDeclaredMethod().
|
Object |
interceptGetDeclaredMethod(MethodCalledByMethodInvocation invocation)
Advice for calls to Class.getDeclaredMethod().
|
Object |
interceptGetDeclaredMethods(MethodCalledByConstructorInvocation invocation)
Advice for calls to Class.getDeclaredMethods().
|
Object |
interceptGetDeclaredMethods(MethodCalledByMethodInvocation invocation)
Advice for calls to Class.getDeclaredMethods().
|
Object |
interceptGetFields(MethodCalledByConstructorInvocation invocation)
Advice for calls to Class.getFields().
|
Object |
interceptGetFields(MethodCalledByMethodInvocation invocation)
Advice for calls to Class.getFields().
|
Object |
interceptGetInterfaces(MethodCalledByConstructorInvocation invocation)
Advice for calls to Class.getInterfaces().
|
Object |
interceptGetInterfaces(MethodCalledByMethodInvocation invocation)
Advice for calls to Class.getInterfaces().
|
Object |
interceptGetMethod(MethodCalledByConstructorInvocation invocation)
Advice for calls to Class.getMethod().
|
Object |
interceptGetMethod(MethodCalledByMethodInvocation invocation)
Advice for calls to Class.getMethod().
|
Object |
interceptGetMethods(MethodCalledByConstructorInvocation invocation)
Advice for calls to Class.getDeclaredMethod().
|
Object |
interceptGetMethods(MethodCalledByMethodInvocation invocation)
Advice for calls to Class.getMethods().
|
protected Object |
interceptMethod(Invocation invocation,
Method method,
Object instance,
Object[] args)
Overridable advice for a Method.invoke() call.
|
Object |
interceptMethodInvoke(MethodCalledByConstructorInvocation invocation)
Advice for calls to Method.invoke().
|
Object |
interceptMethodInvoke(MethodCalledByMethodInvocation invocation)
Advice for calls to Class.newInstance() and Constructor.newInstance().
|
Object |
interceptNewInstance(MethodCalledByConstructorInvocation invocation)
Advice for calls to Class.newInstance() and Constructor.newInstance().
|
Object |
interceptNewInstance(MethodCalledByMethodInvocation invocation)
Advice for calls to Class.newInstance() and Constructor.newInstance().
|
public Object interceptNewInstance(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation - ThrowableinterceptConstructor(Invocation, Constructor, Object[])public Object interceptNewInstance(MethodCalledByMethodInvocation invocation) throws Throwable
invocation - ThrowableinterceptConstructor(Invocation, Constructor, Object[])public Object interceptMethodInvoke(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation - ThrowableReflectionAspect#interceptMethod(Invocation, Object, Method, Object[])public Object interceptMethodInvoke(MethodCalledByMethodInvocation invocation) throws Throwable
invocation - ThrowableReflectionAspect#interceptMethod(Invocation, Object, Method, Object[])public Object interceptFieldSet(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation - ThrowableinterceptFieldWrite(Invocation, Field, Object, Object)public Object interceptFieldSet(MethodCalledByMethodInvocation invocation) throws Throwable
invocation - ThrowableinterceptFieldWrite(Invocation, Field, Object, Object)public Object interceptFieldGet(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation - ThrowableinterceptFieldRead(Invocation, Field, Object)public Object interceptFieldGet(MethodCalledByMethodInvocation invocation) throws Throwable
invocation - ThrowableinterceptFieldRead(Invocation, Field, Object)public final Object interceptGetDeclaredMethods(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getDeclaredMethods()()public final Object interceptGetDeclaredMethods(MethodCalledByMethodInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getDeclaredMethods()()public final Object interceptGetDeclaredMethod(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation - The invocationThrowableClass#getDeclaredMethod()()public final Object interceptGetDeclaredMethod(MethodCalledByMethodInvocation invocation) throws Throwable
invocation - The invocationThrowableClass#getDeclaredMethod()()public final Object interceptGetMethods(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation - The invocationThrowableClass#getDeclaredMethod()()public final Object interceptGetMethods(MethodCalledByMethodInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getMethods()()public final Object interceptGetMethod(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation - The invocationThrowableClass#getDeclaredMethod()()public final Object interceptGetMethod(MethodCalledByMethodInvocation invocation) throws Throwable
invocation - The invocationThrowableClass#getDeclaredMethod()()public final Object interceptGetInterfaces(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getInterfaces()public final Object interceptGetInterfaces(MethodCalledByMethodInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getInterfaces()public final Object interceptGetDeclaredClasses(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getDeclaredClasses()public final Object interceptGetDeclaredClasses(MethodCalledByMethodInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getDeclaredClasses()public final Object interceptGetClasses(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getClasses()public final Object interceptGetClasses(MethodCalledByMethodInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getDeclaredClasses()public final Object interceptGetDeclaredFields(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getDeclaredClasses()public final Object interceptGetDeclaredFields(MethodCalledByMethodInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getDeclaredFields()public final Object interceptGetDeclaredField(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation - The invocationThrowableClass#getDeclaredField()public final Object interceptGetDeclaredField(MethodCalledByMethodInvocation invocation) throws Throwable
invocation - The invocationThrowableClass#getDeclaredField()public final Object interceptGetFields(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getFields()public final Object interceptGetFields(MethodCalledByMethodInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getFields()public final Object interceptGetDeclaredConstructors(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getDeclaredConstructors()public final Object interceptGetDeclaredConstructors(MethodCalledByMethodInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getDeclaredConstructors()public final Object interceptGetDeclaredConstructor(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getFields()public final Object interceptGetDeclaredConstructor(MethodCalledByMethodInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getFields()public final Object interceptGetConstructors(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getFields()public final Object interceptGetConstructors(MethodCalledByMethodInvocation invocation) throws Throwable
invocation - The invocationThrowableClass.getFields()protected Object interceptConstructor(Invocation invocation, Constructor<?> constructor, Object[] args) throws Throwable
invocation - The invocationconstructor - The field on which we are calling setargs - The arguments for the constructorThrowableprotected Object interceptFieldRead(Invocation invocation, Field field, Object instance) throws Throwable
invocation - The invocationfield - The field on which we are calling setinstance - The instance on which we want to write a fieldThrowableprotected Object interceptFieldWrite(Invocation invocation, Field field, Object instance, Object arg) throws Throwable
invocation - The invocationfield - The field on which we are calling setinstance - The instance on which we want to read a fieldarg - The value we want to set the field toThrowableprotected Object interceptMethod(Invocation invocation, Method method, Object instance, Object[] args) throws Throwable
invocation - The invocationmethod - The method on which we are calling setinstance - The instance on which we want to read a fieldarg - The value we want to set the field toThrowableCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.