org.codehaus.aspectwerkz.definition
Interface AspectWerkzDefinition

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AspectWerkzDefinitionImpl, AspectWerkzDefinitionImpl

public interface AspectWerkzDefinition
extends java.io.Serializable

Interface for the aspectwerkz definition implementations.

Author:
Jonas Bonér

Field Summary
static java.lang.String CALLER_SIDE_DELIMITER
           
static int DEF_TYPE_ATTRIB_DEF
          Attrib definition flag.
static int DEF_TYPE_XML_DEF
          XML definition flag.
static java.lang.String PER_CLASS
           
static java.lang.String PER_INSTANCE
           
static java.lang.String PER_JVM
           
static java.lang.String PER_THREAD
           
static java.lang.String SYSTEM_ASPECT
          The name of the system aspect.
static java.lang.String THROWS_DELIMITER
           
 
Method Summary
 void addAspectToUse(java.lang.String className)
          Adds a new aspect to use.
 void addExcludePackage(java.lang.String excludePackage)
          Adds a new exclude package.
 void addIncludePackage(java.lang.String includePackage)
          Adds a new include package.
 void buildMixinMetaDataRepository(java.util.Set repository, java.lang.ClassLoader loader)
          Builds up a meta-data repository for the mixins.
 java.util.Collection getAdviceDefinitions()
          Returns a collection with the advice definitions registered.
 java.util.Collection getAspectDefinitions()
          Returns a collection with the aspect definitions registered.
 java.util.Set getAspectsToUse()
          Returns a set with the aspects to use.
 java.util.Set getIncludePackages()
          Returns the transformation scopes.
 java.util.Collection getIntroductionDefinitions()
          Returns a collection with the introduction definitions registered.
 java.lang.String getIntroductionImplName(java.lang.String introductionName)
          Returns the name of the implementation for an introduction.
 java.lang.String getJoinPointController(ClassMetaData classMetaData, MethodMetaData methodMetaData)
          Returns the class name for the join point controller, if there is a match.
 java.lang.String getUuid()
          Returns the UUID for the definition.
 boolean hasAdvice(java.lang.String name)
          Checks if there exists an advice with the name specified.
 boolean hasCallPointcut(ClassMetaData classMetaData)
          Checks if a class should care about advising caller side method invocations.
 boolean hasExecutionPointcut(ClassMetaData classMetaData)
          Checks if a method has a MethodPointcut.
 boolean hasExecutionPointcut(ClassMetaData classMetaData, MethodMetaData methodMetaData)
          Checks if a method has a MethodPointcut.
 boolean hasGetPointcut(ClassMetaData classMetaData)
          Checks if a class has a GetFieldPointcut.
 boolean hasGetPointcut(ClassMetaData classMetaData, FieldMetaData fieldMetaData)
          Checks if a class and field has a GetFieldPointcut.
 boolean hasIntroduction(java.lang.String name)
          Checks if there exists an introduction with the name specified.
 boolean hasIntroductions(ClassMetaData classMetaData)
          Checks if a class has an Mixin.
 boolean hasSetPointcut(ClassMetaData classMetaData)
          Checks if a class has a SetFieldPointcut.
 boolean hasSetPointcut(ClassMetaData classMetaData, FieldMetaData fieldMetaData)
          Checks if a class and field has a SetFieldPointcut.
 boolean hasThrowsPointcut(ClassMetaData classMetaData)
          Checks if a class and method has a ThrowsPointcut.
 boolean hasThrowsPointcut(ClassMetaData classMetaData, MethodMetaData methodMetaData)
          Checks if a class and method has a ThrowsPointcut.
 boolean inExcludePackage(java.lang.String className)
          Checks if a class has an AspectMetaData.
 boolean inIncludePackage(java.lang.String className)
          Checks if a class has an AspectMetaData.
 boolean isAttribDef()
          Checks if the definition is of type attribute definition.
 boolean isPickedOutByCallPointcut(ClassMetaData classMetaData, MethodMetaData methodMetaData)
          Checks if a method is a defined as a caller side method.
 boolean isXmlDef()
          Checks if the definition is of type XML definition.
 void loadAspects(java.lang.ClassLoader loader)
          Loads the aspects.
 void setUuid(java.lang.String uuid)
          Sets the UUID for the definition.
 

Field Detail

PER_JVM

public static final java.lang.String PER_JVM
See Also:
Constant Field Values

PER_CLASS

public static final java.lang.String PER_CLASS
See Also:
Constant Field Values

PER_INSTANCE

public static final java.lang.String PER_INSTANCE
See Also:
Constant Field Values

PER_THREAD

public static final java.lang.String PER_THREAD
See Also:
Constant Field Values

THROWS_DELIMITER

public static final java.lang.String THROWS_DELIMITER
See Also:
Constant Field Values

CALLER_SIDE_DELIMITER

public static final java.lang.String CALLER_SIDE_DELIMITER
See Also:
Constant Field Values

DEF_TYPE_XML_DEF

public static final int DEF_TYPE_XML_DEF
XML definition flag.

See Also:
Constant Field Values

DEF_TYPE_ATTRIB_DEF

public static final int DEF_TYPE_ATTRIB_DEF
Attrib definition flag.

See Also:
Constant Field Values

SYSTEM_ASPECT

public static final java.lang.String SYSTEM_ASPECT
The name of the system aspect.

See Also:
Constant Field Values
Method Detail

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

setUuid

public void setUuid(java.lang.String uuid)
Sets the UUID for the definition.

Parameters:
uuid - the UUID

getUuid

public java.lang.String getUuid()
Returns the UUID for the definition.

Returns:
the UUID

getIncludePackages

public java.util.Set getIncludePackages()
Returns the transformation scopes.

Returns:
the transformation scopes

getAspectDefinitions

public java.util.Collection getAspectDefinitions()
Returns a collection with the aspect definitions registered.

Returns:
the aspect definitions

getIntroductionDefinitions

public java.util.Collection getIntroductionDefinitions()
Returns a collection with the introduction definitions registered.

Returns:
the introduction definitions

getAdviceDefinitions

public java.util.Collection getAdviceDefinitions()
Returns a collection with the advice definitions registered.

Returns:
the advice definitions

getIntroductionImplName

public java.lang.String getIntroductionImplName(java.lang.String introductionName)
Returns the name of the implementation for an introduction.

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

getJoinPointController

public java.lang.String getJoinPointController(ClassMetaData classMetaData,
                                               MethodMetaData methodMetaData)
Returns the class name for the join point controller, if there is a match.

Parameters:
classMetaData - the class meta-data
methodMetaData - the method meta-data
Returns:
the controller class name

getAspectsToUse

public java.util.Set getAspectsToUse()
Returns a set with the aspects to use.

Returns:
the aspects to use

addAspectToUse

public void addAspectToUse(java.lang.String className)
Adds a new aspect to use.

Parameters:
className - the class name of the aspect

addIncludePackage

public void addIncludePackage(java.lang.String includePackage)
Adds a new include package.

Parameters:
includePackage - the package to include

addExcludePackage

public void addExcludePackage(java.lang.String excludePackage)
Adds a new exclude package.

Parameters:
excludePackage - the package to exclude

hasAdvice

public boolean hasAdvice(java.lang.String name)
Checks if there exists an advice with the name specified.

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

hasIntroduction

public boolean hasIntroduction(java.lang.String name)
Checks if there exists an introduction with the name specified.

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

inIncludePackage

public boolean inIncludePackage(java.lang.String className)
Checks if a class has an AspectMetaData.

Parameters:
className - the name or the class
Returns:
boolean

inExcludePackage

public boolean inExcludePackage(java.lang.String className)
Checks if a class has an AspectMetaData.

Parameters:
className - the name or the class
Returns:
boolean

hasIntroductions

public boolean hasIntroductions(ClassMetaData classMetaData)
Checks if a class has an Mixin.

Parameters:
classMetaData - the class meta-data
Returns:
boolean

hasExecutionPointcut

public boolean hasExecutionPointcut(ClassMetaData classMetaData)
Checks if a method has a MethodPointcut. Only checks for a class match to allow early filtering.

Parameters:
classMetaData - the class meta-data
Returns:
boolean

hasExecutionPointcut

public boolean hasExecutionPointcut(ClassMetaData classMetaData,
                                    MethodMetaData methodMetaData)
Checks if a method has a MethodPointcut.

Parameters:
classMetaData - the class meta-data
methodMetaData - the method meta-data
Returns:
boolean

hasGetPointcut

public boolean hasGetPointcut(ClassMetaData classMetaData)
Checks if a class has a GetFieldPointcut. Only checks for a class match to allow early filtering.

Parameters:
classMetaData - the class meta-data
Returns:
boolean

hasGetPointcut

public boolean hasGetPointcut(ClassMetaData classMetaData,
                              FieldMetaData fieldMetaData)
Checks if a class and field has a GetFieldPointcut.

Parameters:
classMetaData - the class meta-data
fieldMetaData - the name or the field
Returns:
boolean

hasSetPointcut

public boolean hasSetPointcut(ClassMetaData classMetaData)
Checks if a class has a SetFieldPointcut. Only checks for a class match to allow early filtering.

Parameters:
classMetaData - the class meta-data
Returns:
boolean

hasSetPointcut

public boolean hasSetPointcut(ClassMetaData classMetaData,
                              FieldMetaData fieldMetaData)
Checks if a class and field has a SetFieldPointcut.

Parameters:
classMetaData - the class meta-data
fieldMetaData - the name or the field
Returns:
boolean

hasThrowsPointcut

public boolean hasThrowsPointcut(ClassMetaData classMetaData)
Checks if a class and method has a ThrowsPointcut. Only checks for a class match to allow early filtering.

Parameters:
classMetaData - the class meta-data
Returns:
boolean

hasThrowsPointcut

public boolean hasThrowsPointcut(ClassMetaData classMetaData,
                                 MethodMetaData methodMetaData)
Checks if a class and method has a ThrowsPointcut.

Parameters:
classMetaData - the class meta-data
methodMetaData - the name or the method
Returns:
boolean

hasCallPointcut

public boolean hasCallPointcut(ClassMetaData classMetaData)
Checks if a class should care about advising caller side method invocations.

Parameters:
classMetaData - the class meta-data
Returns:
boolean

isPickedOutByCallPointcut

public boolean isPickedOutByCallPointcut(ClassMetaData classMetaData,
                                         MethodMetaData methodMetaData)
Checks if a method is a defined as a caller side method.

Parameters:
classMetaData - the class meta-data
methodMetaData - the name or the method
Returns:
boolean

buildMixinMetaDataRepository

public void buildMixinMetaDataRepository(java.util.Set repository,
                                         java.lang.ClassLoader loader)
Builds up a meta-data repository for the mixins.

Parameters:
repository - the repository
loader - the class loader to use

loadAspects

public void loadAspects(java.lang.ClassLoader loader)
Loads the aspects.

Parameters:
loader - the class loader to use to load the aspects


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