org.jboss.aop
Class ClassAdvisor

java.lang.Object
  extended by org.jboss.aop.Advisor
      extended by org.jboss.aop.ClassAdvisor
Direct Known Subclasses:
GeneratedClassAdvisor

public class ClassAdvisor
extends Advisor

Advises a class and provides access to the class's aspect chain. Each advisable class has an associated Advisor instance. References methods using int IDs rather than the actual instances for optimal performance. Provides ability to invoke methods on an advised object without advice (see Advisor.invokeWithoutAdvisement()).

Version:
$Revision: 78662 $
Author:
Bill Burke

Field Summary
protected  Field[] advisedFields
           
protected  HashMap<String,ArrayList<ArrayList<AdviceBinding>>> backrefConCalledByConstructorBindings
           
protected  HashMap<String,ArrayList<ArrayList<AdviceBinding>>> backrefMethodCalledByConstructorBindings
           
protected  HashMap<String,gnu.trove.TLongObjectHashMap>[] conCalledByConBindings
           
protected  HashMap<String,gnu.trove.TLongObjectHashMap>[] conCalledByConInterceptors
           
protected  FieldInfo[] fieldReadInfos
           
protected  FieldInfo[] fieldWriteInfos
           
protected  boolean initialized
           
protected  HashMap<String,gnu.trove.TLongObjectHashMap>[] methodCalledByConBindings
           
protected  HashMap<String,gnu.trove.TLongObjectHashMap>[] methodCalledByConInterceptors
           
static String NOT_TRANSFORMABLE_SUFFIX
          Suffix added to unadvised methods.
protected  gnu.trove.TLongObjectHashMap unadvisedMethods
           
 
Fields inherited from class org.jboss.aop.Advisor
adviceBindings, adviceInterceptors, advisedMethods, annotations, aspects, classMetaData, classMetaDataBindings, clazz, constructionInfos, constructionInterceptors, constructorInfos, constructorInterceptors, constructorMetaData, constructors, defaultMetaData, doesHaveAspects, fieldMetaData, interfaceIntroductions, lazyCollectionLock, loader, manager, methodInfos, methodInterceptors, methodMetaData, name, NULL_ASPECT, perInstanceAspectDefinitions, perInstanceJoinpointAspectDefinitions
 
Constructor Summary
ClassAdvisor(Class<?> clazz, AspectManager manager)
           
ClassAdvisor(String classname, AspectManager manager)
           
 
Method Summary
 void addClassMetaData(ClassMetaDataBinding data)
           
 void addConstructorCallerPointcut(int callingIndex, String calledClass, long calledMethodHash, AdviceBinding binding)
           
protected  void addDeclaredMethods(Class<?> superclass)
           
 void attachClass(Class<?> clazz)
          Constructs a new helper.
protected  void bindClassMetaData(ClassMetaDataBinding data)
           
 void cleanup()
           
protected  void createConstructorTables()
           
protected  void createFieldTable()
          Gets advised methods.
protected  void createInterceptorChains()
           
protected  void createMethodTables()
           
protected  void doRebuildInterceptors()
           
protected  void doRebuildInterceptorsForAddedBinding(AdviceBinding binding)
           
protected  void doRebuildInterceptorsForRemovedBinding(AdviceBinding removedBinding)
           
protected  void finalizeChains()
           
protected  void finalizeConCalledByConInterceptorChain(ConByConInfo info)
           
protected  void finalizeConCalledByMethodInterceptorChain(ConByMethodInfo info)
           
protected  void finalizeMethodCalledByConInterceptorChain(MethodByConInfo info)
           
protected  void finalizeMethodCalledByMethodInterceptorChain(MethodByMethodInfo info)
           
 Field[] getAdvisedFields()
           
 gnu.trove.TLongObjectHashMap getAdvisedMethods()
           
protected  org.jboss.aop.ClassAdvisor.ConByMethodData getConByMethodData()
           
 HashMap<String,gnu.trove.TLongObjectHashMap>[] getConCalledByConInterceptors()
           
 gnu.trove.TLongObjectHashMap getConCalledByMethodInterceptors()
           
 int getConstructorIndex(Constructor<?> constructor)
          Get a constructor's index in the class.
 Constructor<?>[] getConstructors()
          Returns the list of constructors that belong to the advised context.
 Object getFieldAspect(FieldJoinpoint joinpoint, AspectDefinition def)
          This method is to support PER_JOINPOINT scoping of Aspects for static fields Fields are special in that a get and set do not create separate aspect instances.
 int getFieldIndex(Field field)
          Get a field's index in the class.
 FieldInfo[] getFieldReadInfos()
           
 Interceptor[][] getFieldReadInterceptors()
          Deprecated. use getFieldReadInfos instead
 FieldInfo[] getFieldWriteInfos()
           
 Interceptor[][] getFieldWriteInterceptors()
          Deprecated. use getFieldWriteInfos instead
protected  org.jboss.aop.InterceptorChainObserver getInterceptorChainObserver()
          Returns the interceptor chain observer associated with this advisor.
protected  org.jboss.aop.ClassAdvisor.MethodByMethodData getMethodByMethodData()
           
 HashMap<String,gnu.trove.TLongObjectHashMap>[] getMethodCalledByConInterceptors()
           
 gnu.trove.TLongObjectHashMap getMethodCalledByMethodBindings()
           
 gnu.trove.TLongObjectHashMap getMethodCalledByMethodInterceptors()
           
 gnu.trove.TLongObjectHashMap getMethodInterceptors()
           
protected  gnu.trove.TLongObjectHashMap getUnadvisedMethods()
           
protected  void initializeFieldReadChain()
           
protected  void initializeFieldWriteChain()
           
protected  void initializeMethodChain()
           
 Object invoke(Invocation invocation)
          Invokes interceptor chain.
 Object invokeCaller(long callingMethodHash, Object target, Object[] args, CallerMethodInfo info, Object callingObject)
          Deprecated.  
 Object invokeCaller(MethodByMethodInfo info, Object callingObject, Object target, Object[] args)
           
 Object invokeConCalledByCon(ConByConInfo info, Object[] args)
          Deprecated. Prefer using the version with callingObject instead of this one, since this object is available for call invocations made inside constructors.
 Object invokeConCalledByCon(ConByConInfo info, Object callingObject, Object[] args)
           
 Object invokeConCalledByCon(int callingIndex, Object[] args, CallerConstructorInfo info)
          Deprecated.  
 Object invokeConCalledByCon(int callingIndex, Object callingObject, Object[] args, CallerConstructorInfo info)
          Deprecated.  
 Object invokeConCalledByMethod(ConByMethodInfo info, Object callingObject, Object[] args)
           
 Object invokeConCalledByMethod(long callingMethodHash, Object[] args, CallerConstructorInfo info, Object callingObject)
          Deprecated.  
 Object invokeConstructorCaller(int callingIndex, Object target, Object[] args, CallerMethodInfo info)
          Deprecated.  
 Object invokeConstructorCaller(int callingIndex, Object callingObject, Object target, Object[] args, CallerMethodInfo info)
          Deprecated.  
 Object invokeConstructorCaller(MethodByConInfo info, Object target, Object[] args)
          Deprecated. Prefer using the version with callingObject instead of this one, since this object is available for call invocations made inside constructors.
 Object invokeConstructorCaller(MethodByConInfo info, Object callingObject, Object target, Object[] args)
           
 Object invokeMethod(InstanceAdvisor instanceAdvisor, Object target, long methodHash, Object[] arguments)
           
 Object invokeMethod(InstanceAdvisor instanceAdvisor, Object target, long methodHash, Object[] arguments, MethodInfo info)
           
 Object invokeMethod(long methodHash, Object[] arguments)
           
 Object invokeMethod(Object target, long methodHash, Object[] arguments)
           
 Object invokeNew(Object[] args, int idx)
           
 Object invokeNewWithoutAdvisement(Object[] arguments, Constructor<?> constructor)
           
 Object invokeRead(Object target, int index)
          Invokes interceptor chain.
 Object invokeWithoutAdvisement(Object target, long methodHash, Object[] arguments)
          Invokes target object without applying interceptors.
 Object invokeWrite(Object target, int index, Object value)
          Invokes interceptor chain.
static boolean isAdvisable(Method method)
          Is the method advisable?
static boolean isWithoutAdvisement(String name)
          Is this the name of a private, unadvised thing?
static String notAdvisedMethodName(String className, String methodName)
          Generates internal, unadvised version of a method name.
protected  void populateInterceptorsFromInfos()
          Deprecated. We should just be using xxxxInfos
protected  void populateMixinMethods()
          Put mixin methods from mixin class into unadvisedMethods map so that they can be correctly invoked upon.
protected  void rebindClassMetaData()
           
protected  void rebuildCallerInterceptors()
           
protected  void rebuildInterceptors()
           
protected  void rebuildInterceptorsForAddedBinding(AdviceBinding binding)
           
protected  void rebuildInterceptorsForRemovedBinding(AdviceBinding binding)
           
 void removeAdviceBinding(AdviceBinding binding)
           
 void removeAdviceBindings(ArrayList<AdviceBinding> bindings)
           
 void removeClassMetaData(ClassMetaDataBinding data)
           
 ConByMethodInfo resolveCallerConstructorInfo(long callingMethodHash, String calledClass, long calledConHash)
           
 WeakReference<ConByMethodInfo> resolveCallerConstructorInfoAsWeakReference(long callingMethodHash, String calledClass, long calledConHash)
           
 MethodByMethodInfo resolveCallerMethodInfo(long callingMethodHash, String calledClass, long calledMethodHash)
           
 WeakReference<MethodByMethodInfo> resolveCallerMethodInfoAsWeakReference(long callingMethodHash, String calledClass, long calledMethodHash)
           
 ConByConInfo resolveConstructorCallerConstructorInfo(Class<?> callingClass, int callingIndex, String calledClass, long calledConHash)
           
 ConByConInfo resolveConstructorCallerConstructorInfo(int callingIndex, String calledClass, long calledConHash)
           
 WeakReference<ConByConInfo> resolveConstructorCallerConstructorInfoAsWeakReference(Class<?> callingClass, int callingIndex, String calledClass, long calledConHash)
           
 WeakReference<ConByConInfo> resolveConstructorCallerConstructorInfoAsWeakReference(int callingIndex, String calledClass, long calledConHash)
          Deprecated. 
 MethodByConInfo resolveConstructorCallerMethodInfo(Class<?> callingClass, int callingIndex, String calledClass, long calledMethodHash)
           
 MethodByConInfo resolveConstructorCallerMethodInfo(int callingIndex, String calledClass, long calledMethodHash)
          Deprecated. 
 WeakReference<MethodByConInfo> resolveConstructorCallerMethodInfoAsWeakReference(Class<?> callingClass, int callingIndex, String calledClass, long calledMethodHash)
           
 WeakReference<MethodByConInfo> resolveConstructorCallerMethodInfoAsWeakReference(int callingIndex, String calledClass, long calledMethodHash)
          Deprecated. 
protected  void resolveFieldPointcut(FieldInfo[] newFieldInfos, Interceptor[][] interceptors, AdviceBinding binding, boolean write)
           
protected  void resolvePointcuts(AdviceBinding binding)
           
protected  void setInterceptorChainObserver(org.jboss.aop.InterceptorChainObserver observer)
          Defines the interceptor chain observer associated with this advisor.
protected  void updateFieldPointcutAfterRemove(FieldInfo fieldInfo, int i, boolean write)
           
protected  void updateInterceptorChains()
           
 
Methods inherited from class org.jboss.aop.Advisor
addAdviceInterceptor, addInterfaceIntroduction, addPerClassAspect, addPerInstanceAspect, addPerInstanceJoinpointAspect, adjustInfoForAddedBinding, chainOverridingForInheritedMethods, createInterceptorChain, deployAnnotationOverride, deployAnnotationOverrides, deployMethodAnnotationOverrides, doDeployAnnotationOverride, dynamicInvoke, finalizeChain, finalizeMethodChain, getAdviceInterceptor, getAllMethods, getAnnotations, getClassLoader, getClassMetaData, getClassMetadataBindings, getClazz, getConstructionInfos, getConstructionInterceptors, getConstructorInfos, getConstructorInterceptors, getConstructorMetaData, getDefaultMetaData, getFieldMetaData, getInterfaceIntroductions, getManager, getMetadata, getMethodInfo, getMethodMetaData, getName, getPerClassAspect, getPerClassAspect, getPerInstanceAspectDefinitions, getPerInstanceJoinpointAspectDefinitions, getPerVMAspect, getSimpleName, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAspects, hasSameConstructorAspectLength, hasSameMethodAspectLength, initAdvisedMethodsMap, initClassMetaDataBindingsList, initializeConstructionChain, initializeConstructorChain, initializeInterfaceIntroductions, initInterfaceIntroductionsList, initPerInstanceAspectDefinitionsSet, initPerInstanceJoinpointAspectDefinitionsMap, lockWriteChain, lockWriteChain, newBindingAdded, newBindingAdded, pointcutResolved, removeInterfaceIntroduction, removePerClassAspect, removePerInstanceAspect, removePerInstanceJoinpointAspect, resetChain, resetChain, resetChainKeepInterceptors, resetChainKeepInterceptors, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveAnnotation, resolveConstructionPointcut, resolveConstructorPointcut, resolveMethodPointcut, resolveTypedAnnotation, resolveTypedAnnotation, resolveTypedAnnotation, resolveTypedAnnotation, resolveTypedAnnotation, resolveTypedAnnotation, setChainOverridingForInheritedMethods, setManager, setMetadata, unlockWriteChain, unlockWriteChain, updateConstructionPointcutAfterRemove, updateConstructorPointcutAfterRemove, updateFieldPointcutAfterRemove, updateMethodPointcutAfterRemove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_TRANSFORMABLE_SUFFIX

public static final String NOT_TRANSFORMABLE_SUFFIX
Suffix added to unadvised methods.

See Also:
Constant Field Values

unadvisedMethods

protected gnu.trove.TLongObjectHashMap unadvisedMethods

methodCalledByConBindings

protected HashMap<String,gnu.trove.TLongObjectHashMap>[] methodCalledByConBindings

methodCalledByConInterceptors

protected HashMap<String,gnu.trove.TLongObjectHashMap>[] methodCalledByConInterceptors

backrefMethodCalledByConstructorBindings

protected HashMap<String,ArrayList<ArrayList<AdviceBinding>>> backrefMethodCalledByConstructorBindings

conCalledByConBindings

protected HashMap<String,gnu.trove.TLongObjectHashMap>[] conCalledByConBindings

conCalledByConInterceptors

protected HashMap<String,gnu.trove.TLongObjectHashMap>[] conCalledByConInterceptors

backrefConCalledByConstructorBindings

protected HashMap<String,ArrayList<ArrayList<AdviceBinding>>> backrefConCalledByConstructorBindings

fieldReadInfos

protected FieldInfo[] fieldReadInfos

fieldWriteInfos

protected FieldInfo[] fieldWriteInfos

advisedFields

protected Field[] advisedFields

initialized

protected boolean initialized
Constructor Detail

ClassAdvisor

public ClassAdvisor(String classname,
                    AspectManager manager)

ClassAdvisor

public ClassAdvisor(Class<?> clazz,
                    AspectManager manager)
Method Detail

getFieldAspect

public Object getFieldAspect(FieldJoinpoint joinpoint,
                             AspectDefinition def)
This method is to support PER_JOINPOINT scoping of Aspects for static fields Fields are special in that a get and set do not create separate aspect instances. Also used to support PER_CLASS_JOINPOINT, since that behaves similarly to static fields

Parameters:
joinpoint -
def -
Returns:

getAdvisedFields

public Field[] getAdvisedFields()

getAdvisedMethods

public gnu.trove.TLongObjectHashMap getAdvisedMethods()

getUnadvisedMethods

protected gnu.trove.TLongObjectHashMap getUnadvisedMethods()

getConstructors

public Constructor<?>[] getConstructors()
Description copied from class: Advisor
Returns the list of constructors that belong to the advised context.

Overrides:
getConstructors in class Advisor
Returns:
an array of constructors

getMethodCalledByMethodInterceptors

public gnu.trove.TLongObjectHashMap getMethodCalledByMethodInterceptors()

getMethodCalledByConInterceptors

public HashMap<String,gnu.trove.TLongObjectHashMap>[] getMethodCalledByConInterceptors()

getConCalledByConInterceptors

public HashMap<String,gnu.trove.TLongObjectHashMap>[] getConCalledByConInterceptors()

getConCalledByMethodInterceptors

public gnu.trove.TLongObjectHashMap getConCalledByMethodInterceptors()

getMethodCalledByMethodBindings

public gnu.trove.TLongObjectHashMap getMethodCalledByMethodBindings()

getFieldReadInterceptors

public Interceptor[][] getFieldReadInterceptors()
Deprecated. use getFieldReadInfos instead


getFieldReadInfos

public FieldInfo[] getFieldReadInfos()

getFieldWriteInterceptors

public Interceptor[][] getFieldWriteInterceptors()
Deprecated. use getFieldWriteInfos instead


getFieldWriteInfos

public FieldInfo[] getFieldWriteInfos()

getMethodInterceptors

public gnu.trove.TLongObjectHashMap getMethodInterceptors()

attachClass

public void attachClass(Class<?> clazz)
Constructs a new helper.


getConstructorIndex

public int getConstructorIndex(Constructor<?> constructor)
Get a constructor's index in the class. Returns -1 if not there


getFieldIndex

public int getFieldIndex(Field field)
Get a field's index in the class. Returns -1 if not there


populateMixinMethods

protected void populateMixinMethods()
                             throws Exception
Put mixin methods from mixin class into unadvisedMethods map so that they can be correctly invoked upon.

Throws:
Exception

removeAdviceBinding

public void removeAdviceBinding(AdviceBinding binding)
Overrides:
removeAdviceBinding in class Advisor

removeAdviceBindings

public void removeAdviceBindings(ArrayList<AdviceBinding> bindings)
Overrides:
removeAdviceBindings in class Advisor

resolveFieldPointcut

protected void resolveFieldPointcut(FieldInfo[] newFieldInfos,
                                    Interceptor[][] interceptors,
                                    AdviceBinding binding,
                                    boolean write)

initializeMethodChain

protected void initializeMethodChain()

initializeFieldReadChain

protected void initializeFieldReadChain()

initializeFieldWriteChain

protected void initializeFieldWriteChain()

createInterceptorChains

protected void createInterceptorChains()
                                throws Exception
Throws:
Exception

updateInterceptorChains

protected void updateInterceptorChains()
                                throws Exception
Throws:
Exception

finalizeChains

protected void finalizeChains()

resolvePointcuts

protected void resolvePointcuts(AdviceBinding binding)

rebuildInterceptorsForRemovedBinding

protected void rebuildInterceptorsForRemovedBinding(AdviceBinding binding)
Specified by:
rebuildInterceptorsForRemovedBinding in class Advisor

doRebuildInterceptorsForRemovedBinding

protected void doRebuildInterceptorsForRemovedBinding(AdviceBinding removedBinding)

updateFieldPointcutAfterRemove

protected void updateFieldPointcutAfterRemove(FieldInfo fieldInfo,
                                              int i,
                                              boolean write)
Overrides:
updateFieldPointcutAfterRemove in class Advisor

rebuildCallerInterceptors

protected void rebuildCallerInterceptors()
                                  throws Exception
Throws:
Exception

finalizeMethodCalledByMethodInterceptorChain

protected void finalizeMethodCalledByMethodInterceptorChain(MethodByMethodInfo info)

finalizeConCalledByMethodInterceptorChain

protected void finalizeConCalledByMethodInterceptorChain(ConByMethodInfo info)

finalizeConCalledByConInterceptorChain

protected void finalizeConCalledByConInterceptorChain(ConByConInfo info)

finalizeMethodCalledByConInterceptorChain

protected void finalizeMethodCalledByConInterceptorChain(MethodByConInfo info)

rebuildInterceptors

protected void rebuildInterceptors()
Specified by:
rebuildInterceptors in class Advisor

doRebuildInterceptors

protected void doRebuildInterceptors()

rebuildInterceptorsForAddedBinding

protected void rebuildInterceptorsForAddedBinding(AdviceBinding binding)
Specified by:
rebuildInterceptorsForAddedBinding in class Advisor

doRebuildInterceptorsForAddedBinding

protected void doRebuildInterceptorsForAddedBinding(AdviceBinding binding)

bindClassMetaData

protected void bindClassMetaData(ClassMetaDataBinding data)

rebindClassMetaData

protected void rebindClassMetaData()

addClassMetaData

public void addClassMetaData(ClassMetaDataBinding data)
Specified by:
addClassMetaData in class Advisor

removeClassMetaData

public void removeClassMetaData(ClassMetaDataBinding data)
Specified by:
removeClassMetaData in class Advisor

addConstructorCallerPointcut

public void addConstructorCallerPointcut(int callingIndex,
                                         String calledClass,
                                         long calledMethodHash,
                                         AdviceBinding binding)
                                  throws Exception
Throws:
Exception

notAdvisedMethodName

public static String notAdvisedMethodName(String className,
                                          String methodName)
Generates internal, unadvised version of a method name.


isWithoutAdvisement

public static boolean isWithoutAdvisement(String name)
Is this the name of a private, unadvised thing?


isAdvisable

public static boolean isAdvisable(Method method)
Is the method advisable?


createFieldTable

protected void createFieldTable()
                         throws Exception
Gets advised methods.

Throws:
Exception

addDeclaredMethods

protected void addDeclaredMethods(Class<?> superclass)
                           throws Exception
Throws:
Exception

createMethodTables

protected void createMethodTables()
                           throws Exception
Throws:
Exception

createConstructorTables

protected void createConstructorTables()
                                throws Exception
Throws:
Exception

resolveCallerMethodInfo

public MethodByMethodInfo resolveCallerMethodInfo(long callingMethodHash,
                                                  String calledClass,
                                                  long calledMethodHash)

resolveCallerMethodInfoAsWeakReference

public WeakReference<MethodByMethodInfo> resolveCallerMethodInfoAsWeakReference(long callingMethodHash,
                                                                                String calledClass,
                                                                                long calledMethodHash)

resolveCallerConstructorInfo

public ConByMethodInfo resolveCallerConstructorInfo(long callingMethodHash,
                                                    String calledClass,
                                                    long calledConHash)

resolveCallerConstructorInfoAsWeakReference

public WeakReference<ConByMethodInfo> resolveCallerConstructorInfoAsWeakReference(long callingMethodHash,
                                                                                  String calledClass,
                                                                                  long calledConHash)

resolveConstructorCallerMethodInfo

@Deprecated
public MethodByConInfo resolveConstructorCallerMethodInfo(int callingIndex,
                                                                     String calledClass,
                                                                     long calledMethodHash)
Deprecated. 


resolveConstructorCallerMethodInfo

public MethodByConInfo resolveConstructorCallerMethodInfo(Class<?> callingClass,
                                                          int callingIndex,
                                                          String calledClass,
                                                          long calledMethodHash)

resolveConstructorCallerMethodInfoAsWeakReference

@Deprecated
public WeakReference<MethodByConInfo> resolveConstructorCallerMethodInfoAsWeakReference(int callingIndex,
                                                                                                   String calledClass,
                                                                                                   long calledMethodHash)
Deprecated. 


resolveConstructorCallerMethodInfoAsWeakReference

public WeakReference<MethodByConInfo> resolveConstructorCallerMethodInfoAsWeakReference(Class<?> callingClass,
                                                                                        int callingIndex,
                                                                                        String calledClass,
                                                                                        long calledMethodHash)

resolveConstructorCallerConstructorInfo

public ConByConInfo resolveConstructorCallerConstructorInfo(int callingIndex,
                                                            String calledClass,
                                                            long calledConHash)

resolveConstructorCallerConstructorInfo

public ConByConInfo resolveConstructorCallerConstructorInfo(Class<?> callingClass,
                                                            int callingIndex,
                                                            String calledClass,
                                                            long calledConHash)

resolveConstructorCallerConstructorInfoAsWeakReference

@Deprecated
public WeakReference<ConByConInfo> resolveConstructorCallerConstructorInfoAsWeakReference(int callingIndex,
                                                                                                     String calledClass,
                                                                                                     long calledConHash)
Deprecated. 


resolveConstructorCallerConstructorInfoAsWeakReference

public WeakReference<ConByConInfo> resolveConstructorCallerConstructorInfoAsWeakReference(Class<?> callingClass,
                                                                                          int callingIndex,
                                                                                          String calledClass,
                                                                                          long calledConHash)

invokeWithoutAdvisement

public Object invokeWithoutAdvisement(Object target,
                                      long methodHash,
                                      Object[] arguments)
                               throws Throwable
Invokes target object without applying interceptors.

Throws:
Throwable

invokeNewWithoutAdvisement

public Object invokeNewWithoutAdvisement(Object[] arguments,
                                         Constructor<?> constructor)
                                  throws Throwable
Throws:
Throwable

invokeMethod

public Object invokeMethod(long methodHash,
                           Object[] arguments)
                    throws Throwable
Throws:
Throwable

invokeMethod

public Object invokeMethod(Object target,
                           long methodHash,
                           Object[] arguments)
                    throws Throwable
Throws:
Throwable

invokeMethod

public Object invokeMethod(InstanceAdvisor instanceAdvisor,
                           Object target,
                           long methodHash,
                           Object[] arguments)
                    throws Throwable
Throws:
Throwable

invokeMethod

public Object invokeMethod(InstanceAdvisor instanceAdvisor,
                           Object target,
                           long methodHash,
                           Object[] arguments,
                           MethodInfo info)
                    throws Throwable
Throws:
Throwable

invokeCaller

public Object invokeCaller(long callingMethodHash,
                           Object target,
                           Object[] args,
                           CallerMethodInfo info,
                           Object callingObject)
                    throws Throwable
Deprecated. 

Throws:
Throwable

invokeCaller

public Object invokeCaller(MethodByMethodInfo info,
                           Object callingObject,
                           Object target,
                           Object[] args)
                    throws Throwable
Throws:
Throwable

invokeConCalledByMethod

public Object invokeConCalledByMethod(long callingMethodHash,
                                      Object[] args,
                                      CallerConstructorInfo info,
                                      Object callingObject)
                               throws Throwable
Deprecated. 

Throws:
Throwable

invokeConCalledByMethod

public Object invokeConCalledByMethod(ConByMethodInfo info,
                                      Object callingObject,
                                      Object[] args)
                               throws Throwable
Throws:
Throwable

invokeConstructorCaller

public Object invokeConstructorCaller(int callingIndex,
                                      Object target,
                                      Object[] args,
                                      CallerMethodInfo info)
                               throws Throwable
Deprecated. 

Throws:
Throwable

invokeConstructorCaller

public Object invokeConstructorCaller(int callingIndex,
                                      Object callingObject,
                                      Object target,
                                      Object[] args,
                                      CallerMethodInfo info)
                               throws Throwable
Deprecated. 

Throws:
Throwable

invokeConstructorCaller

public Object invokeConstructorCaller(MethodByConInfo info,
                                      Object target,
                                      Object[] args)
                               throws Throwable
Deprecated. Prefer using the version with callingObject instead of this one, since this object is available for call invocations made inside constructors.

Throws:
Throwable
See Also:
invokeConstructorCaller(MethodByConInfo, Object, Object, Object[])

invokeConstructorCaller

public Object invokeConstructorCaller(MethodByConInfo info,
                                      Object callingObject,
                                      Object target,
                                      Object[] args)
                               throws Throwable
Throws:
Throwable

invokeConCalledByCon

public Object invokeConCalledByCon(int callingIndex,
                                   Object[] args,
                                   CallerConstructorInfo info)
                            throws Throwable
Deprecated. 

Throws:
Throwable

invokeConCalledByCon

public Object invokeConCalledByCon(int callingIndex,
                                   Object callingObject,
                                   Object[] args,
                                   CallerConstructorInfo info)
                            throws Throwable
Deprecated. 

Throws:
Throwable

invokeConCalledByCon

public Object invokeConCalledByCon(ConByConInfo info,
                                   Object[] args)
                            throws Throwable
Deprecated. Prefer using the version with callingObject instead of this one, since this object is available for call invocations made inside constructors.

Throws:
Throwable
See Also:
invokeConCalledByCon(ConByConInfo, Object, Object[])

invokeConCalledByCon

public Object invokeConCalledByCon(ConByConInfo info,
                                   Object callingObject,
                                   Object[] args)
                            throws Throwable
Throws:
Throwable

invokeNew

public Object invokeNew(Object[] args,
                        int idx)
                 throws Throwable
Throws:
Throwable

invokeRead

public Object invokeRead(Object target,
                         int index)
                  throws Throwable
Invokes interceptor chain. This is the beginning

Throws:
Throwable

invokeWrite

public Object invokeWrite(Object target,
                          int index,
                          Object value)
                   throws Throwable
Invokes interceptor chain. This is the beginning

Throws:
Throwable

invoke

public Object invoke(Invocation invocation)
              throws Throwable
Invokes interceptor chain. This is the beginning

Throws:
Throwable

cleanup

public void cleanup()
Overrides:
cleanup in class Advisor

getInterceptorChainObserver

protected org.jboss.aop.InterceptorChainObserver getInterceptorChainObserver()
Returns the interceptor chain observer associated with this advisor.


setInterceptorChainObserver

protected void setInterceptorChainObserver(org.jboss.aop.InterceptorChainObserver observer)
Defines the interceptor chain observer associated with this advisor.

Parameters:
observer - the interceptor chain observer.

populateInterceptorsFromInfos

protected void populateInterceptorsFromInfos()
Deprecated. We should just be using xxxxInfos

Overrides:
populateInterceptorsFromInfos in class Advisor

getMethodByMethodData

protected org.jboss.aop.ClassAdvisor.MethodByMethodData getMethodByMethodData()

getConByMethodData

protected org.jboss.aop.ClassAdvisor.ConByMethodData getConByMethodData()


Copyright © 2008 JBoss, a division of Red Hat, Inc.. All Rights Reserved.