org.jboss.aop.instrument
Class GeneratedAdvisorInstrumentor

java.lang.Object
  extended by org.jboss.aop.instrument.Instrumentor
      extended by org.jboss.aop.instrument.GeneratedAdvisorInstrumentor

public class GeneratedAdvisorInstrumentor
extends Instrumentor

Comment

Version:
$Revision$
Author:
Kabir Khan

Field Summary
static String GET_CLASS_ADVISOR
           
static String GET_CURRENT_ADVISOR
           
 
Fields inherited from class org.jboss.aop.instrument.Instrumentor
AOP_PACKAGE, ASPECT_MANAGER_CLASS_NAME, basicsSet, classPool, converter, HELPER_FIELD_NAME, joinpointClassifier, manager, processedClasses
 
Constructor Summary
GeneratedAdvisorInstrumentor(AOPClassPool pool, AspectManager manager, JoinpointClassifier joinpointClassifier, DynamicTransformationObserver observer)
           
GeneratedAdvisorInstrumentor(AspectManager manager, JoinpointClassifier joinpointClassifier)
           
 
Method Summary
protected  javassist.CtMethod addMixinMethod(Advisor advisor, javassist.CtMethod method, javassist.CtClass clazz, javassist.CtMethod delegate, long hash)
           
protected  javassist.CtClass createAdvisorClass(javassist.CtClass clazz)
           
protected  void createAdvisorCtors(javassist.CtClass clazz)
           
protected  javassist.CtClass createInstanceAdvisorClass(javassist.CtClass clazz)
           
protected  javassist.CtMethod createMixinInvokeMethod(javassist.CtClass clazz, javassist.CtClass mixinClass, String initializer, javassist.CtMethod method, long hash)
          Creates generic invoke method to be wrapped by real signatures.
protected  void doSetupBasics(javassist.CtClass clazz)
           
protected static String getAdvisorFQN(javassist.CtClass clazz)
           
protected static String getAdvisorName(javassist.CtClass clazz)
           
protected  javassist.CtClass getGenadvisor()
           
protected  javassist.CtClass getGenInstanceadvisor()
           
protected static String getInstanceAdvisorFQN(javassist.CtClass clazz)
           
protected static String getInstanceAdvisorName(javassist.CtClass clazz)
           
protected  javassist.CtClass getSuperClassAdvisor(javassist.CtClass superclass)
           
protected  void implementInstanceAdvisorMethods()
           
protected  void initaliseMethodInfo(String infoName, long hash, long unadvisedHash)
           
protected  void initialiseCallerInfoField(String infoName, String init)
           
protected  void initialiseConstructionInfoField(String infoName, int index, long constructorHash)
           
protected  void initialiseConstructorInfoField(String infoName, int index, long constructorHash, long wrapperHash)
           
protected  void initialiseFieldReadInfoField(String infoName, int index, String fieldName, long wrapperHash)
           
protected  void initialiseFieldWriteInfoField(String infoName, int index, String fieldName, long wrapperHash)
           
protected  void intitialiseTransformers()
           
protected  boolean isBaseClass(javassist.CtClass clazz)
           
 boolean transform(javassist.CtClass clazz, ClassAdvisor advisor)
          Makes class advisable.
static String updatedAdvicesName(String infoName)
           
 
Methods inherited from class org.jboss.aop.instrument.Instrumentor
addProtectedField, addStaticField, addSyntheticAttribute, addSyntheticAttribute, addSyntheticAttribute, addSyntheticAttribute, applyCallerPointcuts, convertProcessedClasses, convertReferences, createInvokeMethod, forName, forName, getAdvisableFields, getClassPool, getConstructors, implementsAdvised, interceptorChainsUpdated, isAdvised, isProxyObject, isTransformable, mixinFieldName, prepareClassForTransformation, setupBasics, shouldNotTransform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GET_CURRENT_ADVISOR

public static final String GET_CURRENT_ADVISOR
See Also:
Constant Field Values

GET_CLASS_ADVISOR

public static final String GET_CLASS_ADVISOR
See Also:
Constant Field Values
Constructor Detail

GeneratedAdvisorInstrumentor

public GeneratedAdvisorInstrumentor(AOPClassPool pool,
                                    AspectManager manager,
                                    JoinpointClassifier joinpointClassifier,
                                    DynamicTransformationObserver observer)

GeneratedAdvisorInstrumentor

public GeneratedAdvisorInstrumentor(AspectManager manager,
                                    JoinpointClassifier joinpointClassifier)
Method Detail

getGenadvisor

protected javassist.CtClass getGenadvisor()

getGenInstanceadvisor

protected javassist.CtClass getGenInstanceadvisor()

transform

public boolean transform(javassist.CtClass clazz,
                         ClassAdvisor advisor)
Description copied from class: Instrumentor
Makes class advisable.

Overrides:
transform in class Instrumentor

intitialiseTransformers

protected void intitialiseTransformers()
Specified by:
intitialiseTransformers in class Instrumentor

createMixinInvokeMethod

protected javassist.CtMethod createMixinInvokeMethod(javassist.CtClass clazz,
                                                     javassist.CtClass mixinClass,
                                                     String initializer,
                                                     javassist.CtMethod method,
                                                     long hash)
                                              throws javassist.CannotCompileException,
                                                     javassist.NotFoundException,
                                                     Exception
Description copied from class: Instrumentor
Creates generic invoke method to be wrapped by real signatures.

Specified by:
createMixinInvokeMethod in class Instrumentor
Throws:
javassist.CannotCompileException
javassist.NotFoundException
Exception

addMixinMethod

protected javassist.CtMethod addMixinMethod(Advisor advisor,
                                            javassist.CtMethod method,
                                            javassist.CtClass clazz,
                                            javassist.CtMethod delegate,
                                            long hash)
                                     throws Exception
Overrides:
addMixinMethod in class Instrumentor
Throws:
Exception

getAdvisorName

protected static String getAdvisorName(javassist.CtClass clazz)

getInstanceAdvisorName

protected static String getInstanceAdvisorName(javassist.CtClass clazz)

getAdvisorFQN

protected static String getAdvisorFQN(javassist.CtClass clazz)

getInstanceAdvisorFQN

protected static String getInstanceAdvisorFQN(javassist.CtClass clazz)

createAdvisorClass

protected javassist.CtClass createAdvisorClass(javassist.CtClass clazz)
                                        throws javassist.NotFoundException,
                                               javassist.CannotCompileException
Throws:
javassist.NotFoundException
javassist.CannotCompileException

createInstanceAdvisorClass

protected javassist.CtClass createInstanceAdvisorClass(javassist.CtClass clazz)
                                                throws javassist.NotFoundException,
                                                       javassist.CannotCompileException
Throws:
javassist.NotFoundException
javassist.CannotCompileException

createAdvisorCtors

protected void createAdvisorCtors(javassist.CtClass clazz)
                           throws javassist.CannotCompileException,
                                  javassist.NotFoundException
Throws:
javassist.CannotCompileException
javassist.NotFoundException

getSuperClassAdvisor

protected javassist.CtClass getSuperClassAdvisor(javassist.CtClass superclass)
                                          throws javassist.NotFoundException
Throws:
javassist.NotFoundException

implementInstanceAdvisorMethods

protected void implementInstanceAdvisorMethods()
                                        throws javassist.NotFoundException,
                                               javassist.CannotCompileException
Throws:
javassist.NotFoundException
javassist.CannotCompileException

doSetupBasics

protected void doSetupBasics(javassist.CtClass clazz)
                      throws javassist.CannotCompileException,
                             javassist.NotFoundException
Specified by:
doSetupBasics in class Instrumentor
Throws:
javassist.CannotCompileException
javassist.NotFoundException

isBaseClass

protected boolean isBaseClass(javassist.CtClass clazz)
                       throws javassist.NotFoundException
Overrides:
isBaseClass in class Instrumentor
Throws:
javassist.NotFoundException

updatedAdvicesName

public static String updatedAdvicesName(String infoName)

initaliseMethodInfo

protected void initaliseMethodInfo(String infoName,
                                   long hash,
                                   long unadvisedHash)
                            throws javassist.NotFoundException
Throws:
javassist.NotFoundException

initialiseFieldReadInfoField

protected void initialiseFieldReadInfoField(String infoName,
                                            int index,
                                            String fieldName,
                                            long wrapperHash)
                                     throws javassist.NotFoundException
Throws:
javassist.NotFoundException

initialiseFieldWriteInfoField

protected void initialiseFieldWriteInfoField(String infoName,
                                             int index,
                                             String fieldName,
                                             long wrapperHash)
                                      throws javassist.NotFoundException
Throws:
javassist.NotFoundException

initialiseConstructorInfoField

protected void initialiseConstructorInfoField(String infoName,
                                              int index,
                                              long constructorHash,
                                              long wrapperHash)
                                       throws javassist.NotFoundException
Throws:
javassist.NotFoundException

initialiseConstructionInfoField

protected void initialiseConstructionInfoField(String infoName,
                                               int index,
                                               long constructorHash)
                                        throws javassist.NotFoundException
Throws:
javassist.NotFoundException

initialiseCallerInfoField

protected void initialiseCallerInfoField(String infoName,
                                         String init)
                                  throws javassist.CannotCompileException,
                                         javassist.NotFoundException
Throws:
javassist.CannotCompileException
javassist.NotFoundException


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