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
- Throwable
interceptConstructor(Invocation, Constructor, Object[])
public Object interceptNewInstance(MethodCalledByMethodInvocation invocation) throws Throwable
invocation
- Throwable
interceptConstructor(Invocation, Constructor, Object[])
public Object interceptMethodInvoke(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation
- Throwable
ReflectionAspect#interceptMethod(Invocation, Object, Method, Object[])
public Object interceptMethodInvoke(MethodCalledByMethodInvocation invocation) throws Throwable
invocation
- Throwable
ReflectionAspect#interceptMethod(Invocation, Object, Method, Object[])
public Object interceptFieldSet(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation
- Throwable
interceptFieldWrite(Invocation, Field, Object, Object)
public Object interceptFieldSet(MethodCalledByMethodInvocation invocation) throws Throwable
invocation
- Throwable
interceptFieldWrite(Invocation, Field, Object, Object)
public Object interceptFieldGet(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation
- Throwable
interceptFieldRead(Invocation, Field, Object)
public Object interceptFieldGet(MethodCalledByMethodInvocation invocation) throws Throwable
invocation
- Throwable
interceptFieldRead(Invocation, Field, Object)
public final Object interceptGetDeclaredMethods(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getDeclaredMethods()()
public final Object interceptGetDeclaredMethods(MethodCalledByMethodInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getDeclaredMethods()()
public final Object interceptGetDeclaredMethod(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class#getDeclaredMethod()()
public final Object interceptGetDeclaredMethod(MethodCalledByMethodInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class#getDeclaredMethod()()
public final Object interceptGetMethods(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class#getDeclaredMethod()()
public final Object interceptGetMethods(MethodCalledByMethodInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getMethods()()
public final Object interceptGetMethod(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class#getDeclaredMethod()()
public final Object interceptGetMethod(MethodCalledByMethodInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class#getDeclaredMethod()()
public final Object interceptGetInterfaces(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getInterfaces()
public final Object interceptGetInterfaces(MethodCalledByMethodInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getInterfaces()
public final Object interceptGetDeclaredClasses(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getDeclaredClasses()
public final Object interceptGetDeclaredClasses(MethodCalledByMethodInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getDeclaredClasses()
public final Object interceptGetClasses(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getClasses()
public final Object interceptGetClasses(MethodCalledByMethodInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getDeclaredClasses()
public final Object interceptGetDeclaredFields(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getDeclaredClasses()
public final Object interceptGetDeclaredFields(MethodCalledByMethodInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getDeclaredFields()
public final Object interceptGetDeclaredField(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class#getDeclaredField()
public final Object interceptGetDeclaredField(MethodCalledByMethodInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class#getDeclaredField()
public final Object interceptGetFields(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getFields()
public final Object interceptGetFields(MethodCalledByMethodInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getFields()
public final Object interceptGetDeclaredConstructors(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getDeclaredConstructors()
public final Object interceptGetDeclaredConstructors(MethodCalledByMethodInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getDeclaredConstructors()
public final Object interceptGetDeclaredConstructor(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getFields()
public final Object interceptGetDeclaredConstructor(MethodCalledByMethodInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getFields()
public final Object interceptGetConstructors(MethodCalledByConstructorInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.getFields()
public final Object interceptGetConstructors(MethodCalledByMethodInvocation invocation) throws Throwable
invocation
- The invocationThrowable
Class.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 constructorThrowable
protected 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 fieldThrowable
protected 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 toThrowable
protected 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 toThrowable
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.