|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.aspectwerkz.attribdef.AttribDefSystem
Manages the aspects in the AspectWerkz system.
Handles the initialization and configuration of the system. Stores and indexes the aspects defined in the system. Stores and indexes the advised methods. Stores and indexes the introduced methods.
| Field Summary |
| Fields inherited from interface org.codehaus.aspectwerkz.System |
DEFAULT_SYSTEM, START_REMOTE_PROXY_SERVER |
| Constructor Summary | |
AttribDefSystem(java.lang.String uuid,
AspectWerkzDefinition definition)
Should NEVER be invoked by the user. |
|
| Method Summary | |
void |
createAspect(java.lang.String name,
java.lang.String className,
int deploymentModel,
java.lang.ClassLoader loader)
Creates and registers new aspect at runtime. |
void |
enteringControlFlow(ClassNameMethodMetaDataTuple metaData)
Registers entering of a control flow join point. |
void |
exitingControlFlow(ClassNameMethodMetaDataTuple metaData)
Registers exiting from a control flow join point. |
IndexTuple |
getAdviceIndexFor(java.lang.String name)
Returns the index for a specific name to advice mapping. |
Aspect |
getAspect(int index)
Retrieves a specific aspect based on index. |
Aspect |
getAspect(java.lang.String name)
Returns the aspect for a specific name. |
int |
getAspectIndexFor(java.lang.String name)
Returns the index for a specific name to aspect mapping. |
AspectMetaData |
getAspectMetaData(java.lang.String name)
Returns the aspect meta-data for the name specified. |
Aspect[] |
getAspects()
Returns an array with all the aspects. |
java.util.Collection |
getAspectsMetaData()
Returns a list with all the aspects meta-data. |
java.util.List |
getCallPointcuts(ClassMetaData classMetaData,
MethodMetaData methodMetaData)
Returns the call pointcut list for the class and method specified. |
java.util.List |
getCFlowExpressions(ClassMetaData classMetaData,
MethodMetaData methodMetaData)
Returns all the cflow call expression for the given metadata (callee side) |
java.util.List |
getCFlowPointcuts(java.lang.String className,
MethodMetaData methodMetaData)
ALEX RM Returns a list with the cflow pointcuts that affects the join point with the class name and the method name specified. |
java.util.List |
getExecutionPointcuts(ClassMetaData classMetaData,
MethodMetaData methodMetaData)
Returns the execution pointcut list for the class and method specified. |
java.util.List |
getGetPointcuts(ClassMetaData classMetaData,
FieldMetaData fieldMetaData)
Returns the get pointcut list for the class and field specified. |
java.lang.reflect.Method |
getMethod(java.lang.Class klass,
int index)
Returns a specific method by the class and the method index. |
Mixin |
getMixin(int index)
Retrieves a specific mixin based on its index. |
Mixin |
getMixin(java.lang.String name)
Returns the mixin implementation for a specific name. |
java.util.List |
getSetPointcuts(ClassMetaData classMetaData,
FieldMetaData fieldMetaData)
Returns the set pointcut list for the class and field specified. |
java.util.List |
getThrowsPointcuts(ClassMetaData classMetaData,
MethodMetaData methodMetaData)
Returns the throws pointcut list for the class and method specified. |
boolean |
hasAspect(java.lang.String name)
Checks if a specific class has an aspect defined. |
void |
initialize()
Initializes the system. |
boolean |
isAttribDef()
Checks if the definition is of type attribute definition. |
boolean |
isInControlFlowOf(CompiledPatternTuple patternTuple)
Checks if we are in the control flow of a specific cflow pointcut. |
boolean |
isInControlFlowOf(Expression cflowExpression)
Checks if we are in the control flow of a specific cflow pointcut. |
boolean |
isXmlDef()
Checks if the definition is of type XML definition. |
void |
register(Aspect aspect,
AspectMetaData aspectMetaData)
Registers a new aspect. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AttribDefSystem(java.lang.String uuid,
AspectWerkzDefinition definition)
SystemLoader.getSystem(uuid) to retrieve the system.
Creates a new AspectWerkz system instance.
Sets the UUID for the system.
uuid - the UUID for the systemdefinition - the definition for the system| Method Detail |
public void initialize()
initialize in interface Systempublic boolean isAttribDef()
isAttribDef in interface Systempublic boolean isXmlDef()
isXmlDef in interface System
public void register(Aspect aspect,
AspectMetaData aspectMetaData)
aspect - the aspect to registeraspectMetaData - the aspect meta-data
public void createAspect(java.lang.String name,
java.lang.String className,
int deploymentModel,
java.lang.ClassLoader loader)
name - the name of the aspectclassName - the class name of the aspectdeploymentModel - the deployment model for the aspect
(constants in the DeploymemtModel class, e.g. f.e. DeploymentModel.PER_JVM)loader - an optional class loader (if null it uses the context classloader)public void enteringControlFlow(ClassNameMethodMetaDataTuple metaData)
enteringControlFlow in interface SystemmetaData - the classname:methodMetaData metaDatapublic void exitingControlFlow(ClassNameMethodMetaDataTuple metaData)
exitingControlFlow in interface SystemmetaData - the classname:methodMetaData metaDatapublic boolean isInControlFlowOf(Expression cflowExpression)
System
isInControlFlowOf in interface SystemcflowExpression - the compiled tuple with the class pattern and the method pattern of the cflow pointcut
public boolean isInControlFlowOf(CompiledPatternTuple patternTuple)
patternTuple - the compiled tuple with the class pattern and the method pattern of the cflow pointcut
public Aspect getAspect(int index)
index - the index of the aspect
public Aspect getAspect(java.lang.String name)
name - the name of the aspect
public Mixin getMixin(int index)
getMixin in interface Systemindex - the index of the introduction (aspect in this case)
public Mixin getMixin(java.lang.String name)
getMixin in interface Systemname - the name of the introduction (aspect in this case)
public int getAspectIndexFor(java.lang.String name)
name - the name of the aspect
public IndexTuple getAdviceIndexFor(java.lang.String name)
getAdviceIndexFor in interface Systemname - the name of the advice
public AspectMetaData getAspectMetaData(java.lang.String name)
getAspectMetaData in interface Systemname - the name of the aspect
public java.util.Collection getAspectsMetaData()
getAspectsMetaData in interface Systempublic Aspect[] getAspects()
public java.util.List getExecutionPointcuts(ClassMetaData classMetaData,
MethodMetaData methodMetaData)
getExecutionPointcuts in interface SystemclassMetaData - the meta-data for the classmethodMetaData - meta-data for the method
public java.util.List getGetPointcuts(ClassMetaData classMetaData,
FieldMetaData fieldMetaData)
getGetPointcuts in interface SystemclassMetaData - the meta-data for the classfieldMetaData - meta-data for the method
public java.util.List getSetPointcuts(ClassMetaData classMetaData,
FieldMetaData fieldMetaData)
getSetPointcuts in interface SystemclassMetaData - the meta-data for the classfieldMetaData - meta-data for the method
public java.util.List getThrowsPointcuts(ClassMetaData classMetaData,
MethodMetaData methodMetaData)
getThrowsPointcuts in interface SystemclassMetaData - the meta-data for the classmethodMetaData - meta-data for the method
public java.util.List getCallPointcuts(ClassMetaData classMetaData,
MethodMetaData methodMetaData)
getCallPointcuts in interface SystemclassMetaData - the meta-data for the classmethodMetaData - meta-data for the method
public java.util.List getCFlowExpressions(ClassMetaData classMetaData,
MethodMetaData methodMetaData)
System
getCFlowExpressions in interface SystemclassMetaData - the name of the classmethodMetaData - the meta-data for the method
public java.util.List getCFlowPointcuts(java.lang.String className,
MethodMetaData methodMetaData)
className - the name of the class for the join pointmethodMetaData - the meta-data for the method for the join point
public boolean hasAspect(java.lang.String name)
hasAspect in interface Systemname - the name of the aspect
public java.lang.reflect.Method getMethod(java.lang.Class klass,
int index)
getMethod in interface Systemklass - the class housing the methodindex - the method index
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||