org.codehaus.aspectwerkz
Interface System

All Known Implementing Classes:
AttribDefSystem, XmlDefSystem

public interface System

Interface for the different system types to implement.

Author:
Jonas Bonér

Field Summary
static java.lang.String DEFAULT_SYSTEM
          The UUID of the single AspectWerkz system if only one definition is used.
static boolean START_REMOTE_PROXY_SERVER
          The path to the definition file.
 
Method Summary
 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.
 AspectMetaData getAspectMetaData(java.lang.String name)
          Returns the aspect for the name specified.
 java.util.Collection getAspectsMetaData()
          Returns a list with all the aspects.
 java.util.List getCallPointcuts(ClassMetaData classMetaData, MethodMetaData methodMetaData)
          Returns the caller side 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 getExecutionPointcuts(ClassMetaData classMetaData, MethodMetaData methodMetaData)
          Returns the method pointcut list for the class and method specified.
 java.util.List getGetPointcuts(ClassMetaData classMetaData, FieldMetaData fieldMetaData)
          Returns the get field 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 introduction based it's index.
 Mixin getMixin(java.lang.String name)
          Returns the introduction for a specific name.
 java.util.List getSetPointcuts(ClassMetaData classMetaData, FieldMetaData fieldMetaData)
          Returns the set field 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(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.
 

Field Detail

DEFAULT_SYSTEM

public static final java.lang.String DEFAULT_SYSTEM
The UUID of the single AspectWerkz system if only one definition is used.

See Also:
Constant Field Values

START_REMOTE_PROXY_SERVER

public static final boolean START_REMOTE_PROXY_SERVER
The path to the definition file.

Method Detail

initialize

public void initialize()
Initializes the system.


isAttribDef

public boolean isAttribDef()
Checks if the definition is of type attribute definition.

Returns:
boolean

isXmlDef

public boolean isXmlDef()
Checks if the definition is of type XML definition.

Returns:
boolean

getAspectMetaData

public AspectMetaData getAspectMetaData(java.lang.String name)
Returns the aspect for the name specified.

Parameters:
name - the name of the aspect
Returns:
the aspect

getAspectsMetaData

public java.util.Collection getAspectsMetaData()
Returns a list with all the aspects.

Returns:
the aspects

getExecutionPointcuts

public java.util.List getExecutionPointcuts(ClassMetaData classMetaData,
                                            MethodMetaData methodMetaData)
Returns the method pointcut list for the class and method specified. Caches the list, needed since the actual method call is expensive and is made each time a new instance of an advised class is created.

Parameters:
classMetaData - the meta-data for the class
methodMetaData - meta-data for the method
Returns:
the pointcuts for this join point

getCallPointcuts

public java.util.List getCallPointcuts(ClassMetaData classMetaData,
                                       MethodMetaData methodMetaData)
Returns the caller side pointcut list for the class and method specified. Caches the list, needed since the actual method call is expensive and is made each time a new instance of an advised class is created.

Parameters:
classMetaData - the meta-data for the class
methodMetaData - meta-data for the method
Returns:
the pointcuts for this join point

getGetPointcuts

public java.util.List getGetPointcuts(ClassMetaData classMetaData,
                                      FieldMetaData fieldMetaData)
Returns the get field pointcut list for the class and field specified. Caches the list, needed since the actual method call is expensive and is made each time a new instance of an advised class is created.

Parameters:
classMetaData - the meta-data for the class
fieldMetaData - meta-data for the field
Returns:
the pointcuts for this join point

getSetPointcuts

public java.util.List getSetPointcuts(ClassMetaData classMetaData,
                                      FieldMetaData fieldMetaData)
Returns the set field pointcut list for the class and field specified. Caches the list, needed since the actual method call is expensive and is made each time a new instance of an advised class is created.

Parameters:
classMetaData - the meta-data for the class
fieldMetaData - meta-data for the field
Returns:
the pointcuts for this join point

getThrowsPointcuts

public java.util.List getThrowsPointcuts(ClassMetaData classMetaData,
                                         MethodMetaData methodMetaData)
Returns the throws pointcut list for the class and method specified. Caches the list, needed since the actual method call is expensive and is made each time a new instance of an advised class is created.

Parameters:
classMetaData - the meta-data for the class
methodMetaData - meta-data for the method
Returns:
the pointcuts for this join point

getCFlowExpressions

public java.util.List getCFlowExpressions(ClassMetaData classMetaData,
                                          MethodMetaData methodMetaData)
Returns all the cflow call expression for the given metadata (callee side)

Parameters:
classMetaData - the name of the class
methodMetaData - the meta-data for the method
Returns:
the pointcuts

getAdviceIndexFor

public IndexTuple getAdviceIndexFor(java.lang.String name)
Returns the index for a specific name to advice mapping.

Parameters:
name - the name of the advice
Returns:
the index of the advice

getMixin

public Mixin getMixin(int index)
Retrieves a specific introduction based it's index.

Parameters:
index - the index of the introduction
Returns:
the introduction

getMixin

public Mixin getMixin(java.lang.String name)
Returns the introduction for a specific name.

Parameters:
name - the name of the introduction
Returns:
the the introduction

hasAspect

public boolean hasAspect(java.lang.String name)
Checks if a specific class has an aspect defined.

Parameters:
name - the name of the aspect
Returns:
boolean true if the class has an aspect defined

getMethod

public java.lang.reflect.Method getMethod(java.lang.Class klass,
                                          int index)
Returns a specific method by the class and the method index.

Parameters:
klass - the class housing the method
index - the method index
Returns:
the method

enteringControlFlow

public void enteringControlFlow(ClassNameMethodMetaDataTuple metaData)
Registers entering of a control flow join point.

Parameters:
metaData - the classname:methodMetaData metaData

exitingControlFlow

public void exitingControlFlow(ClassNameMethodMetaDataTuple metaData)
Registers exiting from a control flow join point.

Parameters:
metaData - the classname:methodMetaData metaData

isInControlFlowOf

public boolean isInControlFlowOf(Expression cflowExpression)
Checks if we are in the control flow of a specific cflow pointcut.

Parameters:
cflowExpression - the compiled tuple with the class pattern and the method pattern of the cflow pointcut
Returns:
boolean


Copyright (c) 2002-2004 The AspectWerkz Team. All Rights Reserved.