Java Doc for AbstractJoinPointCompiler.java in  » Aspect-oriented » aspectwerkz-2.0 » org » codehaus » aspectwerkz » transform » inlining » compiler » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Aspect oriented » aspectwerkz 2.0 » org.codehaus.aspectwerkz.transform.inlining.compiler 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.codehaus.aspectwerkz.transform.inlining.compiler.AbstractJoinPointCompiler

All known Subclasses:   org.codehaus.aspectwerkz.transform.inlining.compiler.StaticInitializationJoinPointCompiler,  org.codehaus.aspectwerkz.transform.inlining.compiler.MethodExecutionJoinPointCompiler,  org.codehaus.aspectwerkz.transform.inlining.compiler.ConstructorCallJoinPointCompiler,  org.codehaus.aspectwerkz.transform.inlining.compiler.MethodCallJoinPointCompiler,  org.codehaus.aspectwerkz.transform.inlining.compiler.ConstructorExecutionJoinPointCompiler,  org.codehaus.aspectwerkz.transform.inlining.compiler.HandlerJoinPointCompiler,  org.codehaus.aspectwerkz.transform.inlining.compiler.FieldSetJoinPointCompiler,  org.codehaus.aspectwerkz.transform.inlining.compiler.FieldGetJoinPointCompiler,
AbstractJoinPointCompiler
abstract public class AbstractJoinPointCompiler implements Compiler,TransformationConstants(Code)
Abstract base class for the different join point compiler implementations.

Compiles/generates a class that represents a specific join point, a class which invokes the advices and the target join point statically.

FIXME: depending on hotswap needs, remove the implements StaticJP or JP decision FIXME: remove isOptimizedJP and put it global
author:
   Jonas BonŽr
author:
   Alexandre Vasseur
author:
   Alex Popescu



Field Summary
final protected static  StringDUMP_DIR
    
final public static  booleanDUMP_JIT_CLASSES
    
final protected static  StringTARGET_CLASS_FIELD_NAME
    
final protected static  StringTHIS_CLASS_FIELD_NAME
    
protected  AdviceMethodInfo[]m_afterFinallyAdviceMethodInfos
    
protected  AdviceMethodInfo[]m_afterReturningAdviceMethodInfos
    
protected  AdviceMethodInfo[]m_afterThrowingAdviceMethodInfos
    
protected  Type[]m_argumentTypes
    
protected  AdviceMethodInfo[]m_aroundAdviceMethodInfos
    
protected  AspectInfo[]m_aspectInfos
    
protected  AspectModel[]m_aspectModels
    
protected  AdviceMethodInfo[]m_beforeAdviceMethodInfos
    
final protected  Stringm_calleeClassName
    
final protected  Stringm_calleeClassSignature
    
final protected  Stringm_calleeMemberDesc
    
final protected  intm_calleeMemberModifiers
    
final protected  Stringm_calleeMemberName
    
final protected  Stringm_callerClassName
    
final protected  Stringm_callerClassSignature
    
final protected  Stringm_callerMethodDesc
    
final protected  intm_callerMethodModifiers
    
final protected  Stringm_callerMethodName
    
final protected  Listm_customProceedMethodStructs
    
protected  ClassWriterm_cw
    
protected  String[]m_fieldNames
    
protected  booleanm_hasAroundAdvices
    
protected  booleanm_isThisAdvisable
    
final protected  Stringm_joinPointClassName
    
final protected  intm_joinPointHash
    
final protected  intm_joinPointType
    
protected  booleanm_requiresJoinPoint
    
protected  booleanm_requiresThisOrTarget
    
protected  Typem_returnType
    

Constructor Summary
public  AbstractJoinPointCompiler(CompilationInfo.Model model)
     Creates a new join point compiler instance.

Method Summary
protected  voidaddReturnedValueToJoinPoint(CodeVisitor cv, int returnValueIndex, int joinPointInstanceIndex, boolean unwrap)
     Adds the return value to the RETURNED field.
protected  LabelbeginRuntimeCheck(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointInstanceIndex, AdviceInfo adviceInfo, int calleeIndex)
    
protected  StringbuildInvokeMethodSignature()
     Build up the signature of the 'invoke' methods.
public  byte[]compile()
     Compiles a join point class, one specific class for each distinct join point.
protected  voidcreateAfterAdviceInvocation(CodeVisitor cv, boolean isOptimizedJoinPoint, AdviceMethodInfo adviceMethodInfo, int joinPointInstanceIndex, int argStartIndex, int callerIndex, int calleeIndex, int specialArgIndex)
     Adds a single generic after advice invocation.
protected  voidcreateAfterFinallyAdviceInvocations(CodeVisitor cv, boolean isOptimizedJoinPoint, int argStartIndex, int joinPointInstanceIndex, int callerIndex, int calleeIndex)
     Adds after advice invocations.
protected  voidcreateAfterReturningAdviceInvocations(CodeVisitor cv, boolean isOptimizedJoinPoint, int argStartIndex, int joinPointInstanceIndex, int callerIndex, int calleeIndex)
     Adds after returning advice invocations.
protected  booleancreateAndInitializeAspectField(AspectInfo aspectInfo, CodeVisitor cv)
     Create and initialize the aspect field for a specific aspect (qualified since it depends on the param, deployment model, container etc).
final protected  voidcreateArgumentArrayAt(CodeVisitor cv, int stackFreeIndex)
     Create and load a structure (f.e.
public static  voidcreateAspectInstantiation(CodeVisitor cv, AspectInfo aspectInfo, String joinPointClassName)
     Creates instantiation of aspects using the Aspects.aspectOf() methods which uses the AspectContainer impls. We are using the THIS_CLASS classloader since the aspect can be visible from that one only f.e.
public static  voidcreateAspectReferenceField(ClassWriter cw, AspectInfo aspectInfo)
     Creates aspect reference field (static or non static field).
protected  voidcreateBeforeAdviceInvocations(CodeVisitor cv, boolean isOptimizedJoinPoint, int argStartIndex, int joinPointInstanceIndex, int callerIndex, int calleeIndex)
     Adds before advice invocations.
protected  voidcreateClinit()
     Creates the clinit method for the join point.
protected  voidcreateCopyMethod()
     Creates the copy method.
protected  voidcreateEnclosingStaticJoinPoint(CodeVisitor cv)
    
protected  voidcreateFieldsCommonToAllJoinPoints()
     Creates join point specific fields.
abstract protected  voidcreateGetRttiMethod()
    
abstract protected  voidcreateGetSignatureMethod()
    
protected  voidcreateInit()
     Creates the init method for the join point.
abstract protected  voidcreateInlinedJoinPointInvocation(CodeVisitor cv, boolean isOptimizedJoinPoint, int argStartIndex, int joinPointIndex)
     Optimized implementation that does not retrieve the parameters from the join point instance but is passed directly to the method from the input parameters in the 'invoke' method.
protected  voidcreateInvocationLocalJoinPointInstance(CodeVisitor cv, int argStartIndex, int joinPointInstanceIndex, int callerIndex, int calleeIndex)
     Creates an "invocation local" join point instance, e.g.
public  voidcreateInvocationToAspectOf(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointIndex, int callerIndex, int calleeIndex, AspectInfo aspectInfo)
     Creates an invocation to Aspects.aspectOf(..).
protected  voidcreateInvocationToProceedMethod(CodeVisitor cv, int joinPointInstanceIndex, int returnValueIndex)
     Creates an invocation to the proceed method.
protected  voidcreateInvokeMethod()
     Creates the 'invoke' method.
abstract protected  voidcreateJoinPointInvocation(CodeVisitor cv)
     Creates a call to the target join point, the parameter(s) to the join point are retrieved from the invocation local join point instance.
abstract protected  voidcreateJoinPointSpecificFields()
     Creates join point specific fields.
protected  voidcreatePartOfInvokeMethodWithAllAdviceTypes(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointInstanceIndex, int argStartIndex, int callerIndex, int calleeIndex)
    
protected  voidcreatePartOfInvokeMethodWithoutAfterFinallyAndAfterThrowingAdviceTypes(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointInstanceIndex, int argStartIndex, int callerIndex, int calleeIndex)
    
protected  voidcreatePartOfInvokeMethodWithoutAfterThrowingAdviceTypes(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointInstanceIndex, int argStartIndex, int callerIndex, int calleeIndex)
    
protected  voidcreateProceedMethod()
     Create the proceed() method.
abstract protected  voidcreateSignature(CodeVisitor cv)
     Creates the signature for the join point.
protected  voidcreateStaticInitializer()
     Creates the static initialization method (not clinit) for the join point.
protected  voidcreateUtilityMethods()
     Creates utility methods for the join point (getter, setters etc.).
protected  voidendRuntimeCheck(CodeVisitor cv, AdviceInfo adviceInfo, Label label)
    
protected  AdviceMethodInfo[]getAdviceMethodInfos(List aspectQualifiedNames, Set aspectInfos, AdviceInfo[] adviceInfos)
     Retrieves the advice method infos.
abstract protected  Type[]getJoinPointArgumentTypes()
     Returns the join points argument type(s).
abstract protected  TypegetJoinPointReturnType()
     Returns the join points return type.
final protected  booleanhasArguments()
    
protected  voidincrementStackFrameCounter(CodeVisitor cv)
     Handles the incrementation of the stack frame.
protected  voidinitializeInstanceLevelAspects(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointIndex, int callerIndex, int calleeIndex)
     Initializes instance level aspects, retrieves them from the target instance through the HasInstanceLevelAspect interfaces.
protected  voidloadArgumentMemberFields(CodeVisitor cv, int argStartIndex)
     Loads the argument member fields.
protected  voidloadArguments(CodeVisitor cv)
     Loads the arguments.
protected  voidloadAspect(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointIndex, AspectInfo aspectInfo)
     Loads the aspect instance.
public  voidloadCallee(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointIndex, int calleeIndex)
    
protected  voidloadCaller(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointIndex, int callerIndex)
    
protected  voidloadJoinPointInstance(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointInstanceIndex)
     Loads the join point instance, takes static/non-static join point access into account.
protected  booleanrequiresJoinPoint()
    
protected  booleanrequiresJoinPoint(AdviceMethodInfo[] adviceMethodInfos)
    
protected  booleanrequiresProceedMethod()
     Checks if the join point requires a proceed() method.
protected  booleanrequiresThisOrTarget()
    
protected  booleanrequiresThisOrTarget(AdviceMethodInfo[] adviceMethodInfos)
    
protected  voidresetStackFrameCounter(CodeVisitor cv)
     Resets the stack frame counter.

Field Detail
DUMP_DIR
final protected static String DUMP_DIR(Code)



DUMP_JIT_CLASSES
final public static boolean DUMP_JIT_CLASSES(Code)



TARGET_CLASS_FIELD_NAME
final protected static String TARGET_CLASS_FIELD_NAME(Code)



THIS_CLASS_FIELD_NAME
final protected static String THIS_CLASS_FIELD_NAME(Code)



m_afterFinallyAdviceMethodInfos
protected AdviceMethodInfo[] m_afterFinallyAdviceMethodInfos(Code)



m_afterReturningAdviceMethodInfos
protected AdviceMethodInfo[] m_afterReturningAdviceMethodInfos(Code)



m_afterThrowingAdviceMethodInfos
protected AdviceMethodInfo[] m_afterThrowingAdviceMethodInfos(Code)



m_argumentTypes
protected Type[] m_argumentTypes(Code)



m_aroundAdviceMethodInfos
protected AdviceMethodInfo[] m_aroundAdviceMethodInfos(Code)



m_aspectInfos
protected AspectInfo[] m_aspectInfos(Code)



m_aspectModels
protected AspectModel[] m_aspectModels(Code)



m_beforeAdviceMethodInfos
protected AdviceMethodInfo[] m_beforeAdviceMethodInfos(Code)



m_calleeClassName
final protected String m_calleeClassName(Code)



m_calleeClassSignature
final protected String m_calleeClassSignature(Code)



m_calleeMemberDesc
final protected String m_calleeMemberDesc(Code)



m_calleeMemberModifiers
final protected int m_calleeMemberModifiers(Code)



m_calleeMemberName
final protected String m_calleeMemberName(Code)



m_callerClassName
final protected String m_callerClassName(Code)



m_callerClassSignature
final protected String m_callerClassSignature(Code)



m_callerMethodDesc
final protected String m_callerMethodDesc(Code)



m_callerMethodModifiers
final protected int m_callerMethodModifiers(Code)



m_callerMethodName
final protected String m_callerMethodName(Code)



m_customProceedMethodStructs
final protected List m_customProceedMethodStructs(Code)



m_cw
protected ClassWriter m_cw(Code)



m_fieldNames
protected String[] m_fieldNames(Code)



m_hasAroundAdvices
protected boolean m_hasAroundAdvices(Code)



m_isThisAdvisable
protected boolean m_isThisAdvisable(Code)



m_joinPointClassName
final protected String m_joinPointClassName(Code)



m_joinPointHash
final protected int m_joinPointHash(Code)



m_joinPointType
final protected int m_joinPointType(Code)



m_requiresJoinPoint
protected boolean m_requiresJoinPoint(Code)



m_requiresThisOrTarget
protected boolean m_requiresThisOrTarget(Code)



m_returnType
protected Type m_returnType(Code)




Constructor Detail
AbstractJoinPointCompiler
public AbstractJoinPointCompiler(CompilationInfo.Model model)(Code)
Creates a new join point compiler instance.
Parameters:
  model - the compilation model




Method Detail
addReturnedValueToJoinPoint
protected void addReturnedValueToJoinPoint(CodeVisitor cv, int returnValueIndex, int joinPointInstanceIndex, boolean unwrap)(Code)
Adds the return value to the RETURNED field.
Parameters:
  cv -
Parameters:
  returnValueIndex -
Parameters:
  joinPointInstanceIndex -
Parameters:
  unwrap - set to true if already wrapped on the stack (within proceed() code)



beginRuntimeCheck
protected Label beginRuntimeCheck(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointInstanceIndex, AdviceInfo adviceInfo, int calleeIndex)(Code)
Handles the if case for runtime check (target instanceof, cflow)
Parameters:
  cv -
Parameters:
  isOptimizedJoinPoint -
Parameters:
  joinPointInstanceIndex -
Parameters:
  adviceInfo - the label for endIf or null if the adviceInfo did not required runtime check



buildInvokeMethodSignature
protected String buildInvokeMethodSignature()(Code)
Build up the signature of the 'invoke' methods.



compile
public byte[] compile()(Code)
Compiles a join point class, one specific class for each distinct join point. The compiled join point class inherits the base join point class. the generated, compiled and loaded join point class



createAfterAdviceInvocation
protected void createAfterAdviceInvocation(CodeVisitor cv, boolean isOptimizedJoinPoint, AdviceMethodInfo adviceMethodInfo, int joinPointInstanceIndex, int argStartIndex, int callerIndex, int calleeIndex, int specialArgIndex)(Code)
Adds a single generic after advice invocation.
Parameters:
  cv -
Parameters:
  isOptimizedJoinPoint -
Parameters:
  adviceMethodInfo -
Parameters:
  joinPointInstanceIndex -
Parameters:
  argStartIndex -
Parameters:
  callerIndex -
Parameters:
  calleeIndex -
Parameters:
  specialArgIndex - for afterReturning / Throwing when binding is used



createAfterFinallyAdviceInvocations
protected void createAfterFinallyAdviceInvocations(CodeVisitor cv, boolean isOptimizedJoinPoint, int argStartIndex, int joinPointInstanceIndex, int callerIndex, int calleeIndex)(Code)
Adds after advice invocations.
Parameters:
  cv -
Parameters:
  isOptimizedJoinPoint -
Parameters:
  argStartIndex - index on stack of first target method arg (0 or 1, depends of static target ornot)
Parameters:
  joinPointInstanceIndex - >= 0 if STATIC_JOIN_POINT is NOT to be used (around advice)
Parameters:
  callerIndex -
Parameters:
  calleeIndex -



createAfterReturningAdviceInvocations
protected void createAfterReturningAdviceInvocations(CodeVisitor cv, boolean isOptimizedJoinPoint, int argStartIndex, int joinPointInstanceIndex, int callerIndex, int calleeIndex)(Code)
Adds after returning advice invocations.
Parameters:
  cv -
Parameters:
  isOptimizedJoinPoint -
Parameters:
  argStartIndex - index on stack of first target method arg (0 or 1, depends of static target ornot)
Parameters:
  joinPointInstanceIndex - >= 0 if STATIC_JOIN_POINT is NOT to be used (around advice)
Parameters:
  callerIndex -
Parameters:
  calleeIndex -



createAndInitializeAspectField
protected boolean createAndInitializeAspectField(AspectInfo aspectInfo, CodeVisitor cv)(Code)
Create and initialize the aspect field for a specific aspect (qualified since it depends on the param, deployment model, container etc).
Parameters:
  aspectInfo -
Parameters:
  cv -



createArgumentArrayAt
final protected void createArgumentArrayAt(CodeVisitor cv, int stackFreeIndex)(Code)
Create and load a structure (f.e. array of Object) where args are stored, before setting the Rtti with it (See addParametersToRttiInstance). The structure is stored at the given stackFreeIndex.

We provide here a default implementation that is suitable for method and constructor call and execution. See createParameterWrappedAt for field get/set and handler compiler (no array of argument needed)
Parameters:
  cv -
Parameters:
  stackFreeIndex -




createAspectInstantiation
public static void createAspectInstantiation(CodeVisitor cv, AspectInfo aspectInfo, String joinPointClassName)(Code)
Creates instantiation of aspects using the Aspects.aspectOf() methods which uses the AspectContainer impls. We are using the THIS_CLASS classloader since the aspect can be visible from that one only f.e. for get/set/call
Parameters:
  cv -
Parameters:
  aspectInfo -
Parameters:
  joinPointClassName -



createAspectReferenceField
public static void createAspectReferenceField(ClassWriter cw, AspectInfo aspectInfo)(Code)
Creates aspect reference field (static or non static field).
Parameters:
  cw -
Parameters:
  aspectInfo -



createBeforeAdviceInvocations
protected void createBeforeAdviceInvocations(CodeVisitor cv, boolean isOptimizedJoinPoint, int argStartIndex, int joinPointInstanceIndex, int callerIndex, int calleeIndex)(Code)
Adds before advice invocations.
Parameters:
  cv -
Parameters:
  isOptimizedJoinPoint -
Parameters:
  argStartIndex - index on stack of first target method arg (0 or 1, depends of static target ornot)
Parameters:
  joinPointInstanceIndex - >= 0 if STATIC_JOIN_POINT is NOT to be used (around advice)
Parameters:
  callerIndex -
Parameters:
  calleeIndex -



createClinit
protected void createClinit()(Code)
Creates the clinit method for the join point.



createCopyMethod
protected void createCopyMethod()(Code)
Creates the copy method.

TODO refactor and put in subclasses




createEnclosingStaticJoinPoint
protected void createEnclosingStaticJoinPoint(CodeVisitor cv)(Code)
Add and initialize the static field for enclosing joint point static part
Parameters:
  cv -



createFieldsCommonToAllJoinPoints
protected void createFieldsCommonToAllJoinPoints()(Code)
Creates join point specific fields.



createGetRttiMethod
abstract protected void createGetRttiMethod()(Code)
Creates the getRtti method



createGetSignatureMethod
abstract protected void createGetSignatureMethod()(Code)
Creates the getSignature method



createInit
protected void createInit()(Code)
Creates the init method for the join point.



createInlinedJoinPointInvocation
abstract protected void createInlinedJoinPointInvocation(CodeVisitor cv, boolean isOptimizedJoinPoint, int argStartIndex, int joinPointIndex)(Code)
Optimized implementation that does not retrieve the parameters from the join point instance but is passed directly to the method from the input parameters in the 'invoke' method. Can only be used if no around advice exists.
Parameters:
  cv -
Parameters:
  argStartIndex - index on stack of first target method arg (0 or 1, depends of static target or not)



createInvocationLocalJoinPointInstance
protected void createInvocationLocalJoinPointInstance(CodeVisitor cv, int argStartIndex, int joinPointInstanceIndex, int callerIndex, int calleeIndex)(Code)
Creates an "invocation local" join point instance, e.g. one join point per invocation. Needed for thread-safety when invoking around advice.
Parameters:
  cv -
Parameters:
  argStartIndex - index on stack of first target method arg (0 or 1, depends of static target ornot)
Parameters:
  joinPointInstanceIndex -
Parameters:
  callerIndex -
Parameters:
  calleeIndex -



createInvocationToAspectOf
public void createInvocationToAspectOf(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointIndex, int callerIndex, int calleeIndex, AspectInfo aspectInfo)(Code)
Creates an invocation to Aspects.aspectOf(..).
Parameters:
  cv -
Parameters:
  isOptimizedJoinPoint -
Parameters:
  joinPointIndex -
Parameters:
  callerIndex -
Parameters:
  calleeIndex -
Parameters:
  aspectInfo -



createInvocationToProceedMethod
protected void createInvocationToProceedMethod(CodeVisitor cv, int joinPointInstanceIndex, int returnValueIndex)(Code)
Creates an invocation to the proceed method.
Parameters:
  cv -
Parameters:
  joinPointInstanceIndex -
Parameters:
  returnValueIndex -



createInvokeMethod
protected void createInvokeMethod()(Code)
Creates the 'invoke' method. If possible delegates to the target join point directly, e.g. does not invoke the 'proceed' method (Used when a join point has zero around advice).



createJoinPointInvocation
abstract protected void createJoinPointInvocation(CodeVisitor cv)(Code)
Creates a call to the target join point, the parameter(s) to the join point are retrieved from the invocation local join point instance.
Parameters:
  cv -



createJoinPointSpecificFields
abstract protected void createJoinPointSpecificFields()(Code)
Creates join point specific fields.



createPartOfInvokeMethodWithAllAdviceTypes
protected void createPartOfInvokeMethodWithAllAdviceTypes(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointInstanceIndex, int argStartIndex, int callerIndex, int calleeIndex)(Code)

Parameters:
  cv -
Parameters:
  isOptimizedJoinPoint -
Parameters:
  joinPointInstanceIndex -
Parameters:
  argStartIndex -
Parameters:
  callerIndex -
Parameters:
  calleeIndex -



createPartOfInvokeMethodWithoutAfterFinallyAndAfterThrowingAdviceTypes
protected void createPartOfInvokeMethodWithoutAfterFinallyAndAfterThrowingAdviceTypes(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointInstanceIndex, int argStartIndex, int callerIndex, int calleeIndex)(Code)

Parameters:
  cv -
Parameters:
  isOptimizedJoinPoint -
Parameters:
  joinPointInstanceIndex -
Parameters:
  argStartIndex -
Parameters:
  callerIndex -
Parameters:
  calleeIndex -



createPartOfInvokeMethodWithoutAfterThrowingAdviceTypes
protected void createPartOfInvokeMethodWithoutAfterThrowingAdviceTypes(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointInstanceIndex, int argStartIndex, int callerIndex, int calleeIndex)(Code)

Parameters:
  cv -
Parameters:
  isOptimizedJoinPoint -
Parameters:
  joinPointInstanceIndex -
Parameters:
  argStartIndex -
Parameters:
  callerIndex -
Parameters:
  calleeIndex -



createProceedMethod
protected void createProceedMethod()(Code)
Create the proceed() method.



createSignature
abstract protected void createSignature(CodeVisitor cv)(Code)
Creates the signature for the join point.
Parameters:
  cv -



createStaticInitializer
protected void createStaticInitializer()(Code)
Creates the static initialization method (not clinit) for the join point.



createUtilityMethods
protected void createUtilityMethods()(Code)
Creates utility methods for the join point (getter, setters etc.).



endRuntimeCheck
protected void endRuntimeCheck(CodeVisitor cv, AdviceInfo adviceInfo, Label label)(Code)
Ends the ifLabel of a runtime check
Parameters:
  cv -
Parameters:
  adviceInfo -
Parameters:
  label - if null, then do nothing (means we did not had a runtime check)



getAdviceMethodInfos
protected AdviceMethodInfo[] getAdviceMethodInfos(List aspectQualifiedNames, Set aspectInfos, AdviceInfo[] adviceInfos)(Code)
Retrieves the advice method infos.
Parameters:
  aspectQualifiedNames -
Parameters:
  aspectInfos -
Parameters:
  adviceInfos -



getJoinPointArgumentTypes
abstract protected Type[] getJoinPointArgumentTypes()(Code)
Returns the join points argument type(s).



getJoinPointReturnType
abstract protected Type getJoinPointReturnType()(Code)
Returns the join points return type.



hasArguments
final protected boolean hasArguments()(Code)
Return the number of argument the joinpoint has (excludes JoinPoint, Rtti, this / target) but is only the number of argument we will have in the rtti (advised method/ctor args or 1 for field / handler)



incrementStackFrameCounter
protected void incrementStackFrameCounter(CodeVisitor cv)(Code)
Handles the incrementation of the stack frame.
Parameters:
  cv -



initializeInstanceLevelAspects
protected void initializeInstanceLevelAspects(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointIndex, int callerIndex, int calleeIndex)(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:
  isOptimizedJoinPoint -
Parameters:
  joinPointIndex -
Parameters:
  callerIndex -
Parameters:
  calleeIndex -




loadArgumentMemberFields
protected void loadArgumentMemberFields(CodeVisitor cv, int argStartIndex)(Code)
Loads the argument member fields.
Parameters:
  cv -
Parameters:
  argStartIndex -



loadArguments
protected void loadArguments(CodeVisitor cv)(Code)
Loads the arguments.
Parameters:
  cv -



loadAspect
protected void loadAspect(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointIndex, AspectInfo aspectInfo)(Code)
Loads the aspect instance.
Parameters:
  cv -
Parameters:
  isOptimizedJoinPoint -
Parameters:
  joinPointIndex -
Parameters:
  aspectInfo -



loadCallee
public void loadCallee(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointIndex, int calleeIndex)(Code)
Helper method to load the callee on the stack
Parameters:
  cv -
Parameters:
  isOptimizedJoinPoint -
Parameters:
  joinPointIndex -
Parameters:
  calleeIndex -



loadCaller
protected void loadCaller(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointIndex, int callerIndex)(Code)
Helper method to load the caller on the stack
Parameters:
  cv -
Parameters:
  isOptimizedJoinPoint -
Parameters:
  joinPointIndex -
Parameters:
  callerIndex -



loadJoinPointInstance
protected void loadJoinPointInstance(CodeVisitor cv, boolean isOptimizedJoinPoint, int joinPointInstanceIndex)(Code)
Loads the join point instance, takes static/non-static join point access into account.
Parameters:
  cv -
Parameters:
  isOptimizedJoinPoint -
Parameters:
  joinPointInstanceIndex -



requiresJoinPoint
protected boolean requiresJoinPoint()(Code)
Checks if at least one advice is using the non static JoinPoint explicitly true if so



requiresJoinPoint
protected boolean requiresJoinPoint(AdviceMethodInfo[] adviceMethodInfos)(Code)
Checks if at least one advice is using non static JoinPoint explicitly
Parameters:
  adviceMethodInfos - true if so



requiresProceedMethod
protected boolean requiresProceedMethod()(Code)
Checks if the join point requires a proceed() method.



requiresThisOrTarget
protected boolean requiresThisOrTarget()(Code)
Checks if at least one advice is using this or target (bounded or runtime check) true if so



requiresThisOrTarget
protected boolean requiresThisOrTarget(AdviceMethodInfo[] adviceMethodInfos)(Code)
Checks if at least one advice is using target or this (bounded or runtime check)
Parameters:
  adviceMethodInfos - true if so



resetStackFrameCounter
protected void resetStackFrameCounter(CodeVisitor cv)(Code)
Resets the stack frame counter.
Parameters:
  cv -



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.