| com.tc.aspectwerkz.transform.inlining.spi.AspectModel
All known Subclasses: com.tc.aspectwerkz.transform.inlining.model.AspectWerkzAspectModel, com.tc.aspectwerkz.transform.inlining.model.AopAllianceAspectModel,
AspectModel | public interface AspectModel (Code) | | An aspect model defines a custom hook for the JoinPointCompiler.
The AspectModel is registered using AspectModelManager, and the AspectDefinition is linked to the model
"getAspectModelType()" unique identifier.
An no arg constructor instance of the model will be callback during aspect registration for defineAspect(..)
During compilation, different aspect model instance can be instantiated per compilation using the getInstance(..)
method (not returning "this").
author: Jonas BonŽr author: Alexandre Vasseur |
Inner Class :public static class AroundClosureClassInfo | |
Method Summary | |
void | createAndStoreRuntimeAspectInstantiation(MethodVisitor cv, CompilerInput input, AspectInfo aspectInfo) Initializes instance level aspects, retrieves them from the target instance through the
HasInstanceLevelAspect interfaces. | void | createAndStoreStaticAspectInstantiation(ClassVisitor cw, MethodVisitor cv, AspectInfo aspectInfo, String joinPointClassName) Creates aspect reference field (field in the jit jointpoint class f.e.) for an aspect instance. | void | createAroundAdviceArgumentHandling(MethodVisitor cv, CompilerInput input, Type[] joinPointArgumentTypes, AdviceMethodInfo adviceMethodInfo) Handles the arguments to the around advice. | public void | createBeforeOrAfterAdviceArgumentHandling(MethodVisitor cv, CompilerInput input, Type[] joinPointArgumentTypes, AdviceMethodInfo adviceMethodInfo, int specialArgIndex) Handles the arguments to the before or after (after XXX) advice. | void | createInvocationOfAroundClosureSuperClass(MethodVisitor cv) Creates invocation of the super class for the around closure.
E.g. | void | createMandatoryMethods(ClassWriter cw, JoinPointCompiler compiler) Creates the methods required to implement or extend to implement the closure for the specific aspect model type. | void | defineAspect(ClassInfo aspectClassInfo, AspectDefinition aspectDef, ClassLoader loader) Defines the aspect and adds definition to the aspect definition. | AroundClosureClassInfo | getAroundClosureClassInfo() Returns info about the closure class, name and type (interface or class). | String | getAspectModelType() Returns the aspect model type, which is an id for the the special aspect model, can be anything as long
as it is unique. | AspectModel | getInstance(CompilationInfo.Model compilationModel) A prototype patttern. | void | loadAspect(MethodVisitor cv, CompilerInput input, AspectInfo aspectInfo) Loads the aspect instance on stack. | boolean | requiresReflectiveInfo() Should return true if the aspect model requires that Runtime Type Information (RTTI) is build up
for the join point. |
createAndStoreRuntimeAspectInstantiation | void createAndStoreRuntimeAspectInstantiation(MethodVisitor cv, CompilerInput input, AspectInfo aspectInfo)(Code) | | Initializes instance level aspects, retrieves them from the target instance through the
HasInstanceLevelAspect interfaces.
Use by 'perInstance', 'perThis' and 'perTarget' deployment models.
Parameters: cv - Parameters: input - Parameters: aspectInfo - |
createAndStoreStaticAspectInstantiation | void createAndStoreStaticAspectInstantiation(ClassVisitor cw, MethodVisitor cv, AspectInfo aspectInfo, String joinPointClassName)(Code) | | Creates aspect reference field (field in the jit jointpoint class f.e.) for an aspect instance.
Creates instantiation of an aspect instance and stores them if appropriate (see createAspectReferenceField).
Parameters: cw - for the jp class beeing compiled Parameters: cv - for the method Parameters: aspectInfo - Parameters: joinPointClassName - |
createAroundAdviceArgumentHandling | void createAroundAdviceArgumentHandling(MethodVisitor cv, CompilerInput input, Type[] joinPointArgumentTypes, AdviceMethodInfo adviceMethodInfo)(Code) | | Handles the arguments to the around advice.
Parameters: cv - Parameters: adviceMethodInfo - |
createBeforeOrAfterAdviceArgumentHandling | public void createBeforeOrAfterAdviceArgumentHandling(MethodVisitor cv, CompilerInput input, Type[] joinPointArgumentTypes, AdviceMethodInfo adviceMethodInfo, int specialArgIndex)(Code) | | Handles the arguments to the before or after (after XXX) advice.
Parameters: cv - Parameters: input - Parameters: joinPointArgumentTypes - Parameters: adviceMethodInfo - Parameters: specialArgIndex - index on the stack of the throwned exception / returned value (makes sense for after advice,else set to INDEX_NOTAVAILABLE) |
createInvocationOfAroundClosureSuperClass | void createInvocationOfAroundClosureSuperClass(MethodVisitor cv)(Code) | | Creates invocation of the super class for the around closure.
E.g. the invocation of super(..) in the constructor.
Only needed to be implemented if the around closure base class is really a base class and not an interface.
Parameters: cv - |
createMandatoryMethods | void createMandatoryMethods(ClassWriter cw, JoinPointCompiler compiler)(Code) | | Creates the methods required to implement or extend to implement the closure for the specific aspect model type.
Parameters: cw - Parameters: compiler - |
defineAspect | void defineAspect(ClassInfo aspectClassInfo, AspectDefinition aspectDef, ClassLoader loader)(Code) | | Defines the aspect and adds definition to the aspect definition.
Parameters: aspectClassInfo - Parameters: aspectDef - Parameters: loader - |
getAroundClosureClassInfo | AroundClosureClassInfo getAroundClosureClassInfo()(Code) | | Returns info about the closure class, name and type (interface or class).
the closure class info |
getAspectModelType | String getAspectModelType()(Code) | | Returns the aspect model type, which is an id for the the special aspect model, can be anything as long
as it is unique.
the aspect model type id |
getInstance | AspectModel getInstance(CompilationInfo.Model compilationModel)(Code) | | A prototype patttern. Ones may return "this" if singleton / non thread safe instance is enough.
Parameters: compilationModel - |
requiresReflectiveInfo | boolean requiresReflectiveInfo()(Code) | | Should return true if the aspect model requires that Runtime Type Information (RTTI) is build up
for the join point. Needed for reflective systems and systems that does not support f.e. args() binding.
|
|
|