|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.aspectwerkz.attribdef.definition.AspectWerkzDefinitionImpl
Implementation of the AspectWerkz interface for the attribdef definition model.
Field Summary |
Fields inherited from interface org.codehaus.aspectwerkz.definition.AspectWerkzDefinition |
CALLER_SIDE_DELIMITER, DEF_TYPE_ATTRIB_DEF, DEF_TYPE_XML_DEF, PER_CLASS, PER_INSTANCE, PER_JVM, PER_THREAD, SYSTEM_ASPECT, THROWS_DELIMITER |
Constructor Summary | |
AspectWerkzDefinitionImpl()
Creates a new instance, creates and sets the system aspect. |
Method Summary | |
void |
addAspect(AspectDefinition aspectDef)
Adds a new aspect definition. |
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 |
addInterfaceIntroductionDefinition(InterfaceIntroductionDefinition introDef)
Adds a new pure interface mixin definition. |
void |
addIntroductionDefinition(IntroductionDefinition introDef)
Adds a new mixin definition. |
void |
addParameter(java.lang.String aspectClassName,
java.lang.String key,
java.lang.String value)
Adds a new parameter for the aspect. |
void |
buildMixinMetaDataRepository(java.util.Set repository,
java.lang.ClassLoader loader)
Builds up a meta-data repository for the mixins. |
AdviceDefinition |
getAdviceDefinition(java.lang.String name)
Returns a specific advice definition. |
java.util.Collection |
getAdviceDefinitions()
Returns a collection with the advice definitions registered. |
AspectDefinition |
getAspectDefinition(java.lang.String name)
Returns a specific aspect definition. |
java.util.Collection |
getAspectDefinitions()
Returns a collection with the aspect definitions registered. |
int |
getAspectIndexByName(java.lang.String aspectName)
Returns the index for a specific introduction. |
java.util.Set |
getAspectsToUse()
Returns a set with the aspects to use. |
java.util.Set |
getExcludePackages()
Returns the exclude packages. |
java.util.Set |
getIncludePackages()
Returns the include packages. |
java.util.List |
getInterfaceIntroductions(ClassMetaData classMetaData)
Returns the interface introductions for a certain class merged with the implementation based introductions as well |
java.util.Collection |
getIntroductionDefinitions()
Returns a collection with the introduction definitions registered. |
java.util.List |
getIntroductionDefinitions(ClassMetaData classMetaData)
Returns the introduction definitions for a specific class. |
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. |
int |
getMixinIndexByName(java.lang.String mixinName)
Returns the index for a specific introduction. |
java.util.Map |
getParameters(java.lang.String aspectClassName)
Returns parameters for the aspect. |
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. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AspectWerkzDefinitionImpl()
Method Detail |
public void loadAspects(java.lang.ClassLoader loader)
loadAspects
in interface AspectWerkzDefinition
loader
- the class loader to use to load the aspectspublic boolean isAttribDef()
isAttribDef
in interface AspectWerkzDefinition
public boolean isXmlDef()
isXmlDef
in interface AspectWerkzDefinition
public void setUuid(java.lang.String uuid)
setUuid
in interface AspectWerkzDefinition
uuid
- the UUIDpublic java.lang.String getUuid()
getUuid
in interface AspectWerkzDefinition
public java.util.Set getIncludePackages()
getIncludePackages
in interface AspectWerkzDefinition
public java.util.Set getExcludePackages()
public java.util.Collection getAspectDefinitions()
getAspectDefinitions
in interface AspectWerkzDefinition
public java.util.Collection getIntroductionDefinitions()
getIntroductionDefinitions
in interface AspectWerkzDefinition
public java.util.Collection getAdviceDefinitions()
getAdviceDefinitions
in interface AspectWerkzDefinition
public AspectDefinition getAspectDefinition(java.lang.String name)
name
- the name of the aspect definition
public AdviceDefinition getAdviceDefinition(java.lang.String name)
name
- the name of the advice definition
public java.lang.String getIntroductionImplName(java.lang.String introductionName)
getIntroductionImplName
in interface AspectWerkzDefinition
introductionName
- the name of the introduction
public java.util.List getIntroductionDefinitions(ClassMetaData classMetaData)
classMetaData
- the class meta-data
public int getAspectIndexByName(java.lang.String aspectName)
aspectName
- the name of the aspect
public int getMixinIndexByName(java.lang.String mixinName)
mixinName
- the name of the mixin
public java.lang.String getJoinPointController(ClassMetaData classMetaData, MethodMetaData methodMetaData)
getJoinPointController
in interface AspectWerkzDefinition
classMetaData
- the class meta-datamethodMetaData
- the method meta-data
public java.util.Set getAspectsToUse()
getAspectsToUse
in interface AspectWerkzDefinition
public void addAspect(AspectDefinition aspectDef)
aspectDef
- the aspect definitionpublic void addIntroductionDefinition(IntroductionDefinition introDef)
introDef
- the mixin definitionpublic void addInterfaceIntroductionDefinition(InterfaceIntroductionDefinition introDef)
introDef
- the mixin definitionpublic void addAspectToUse(java.lang.String className)
addAspectToUse
in interface AspectWerkzDefinition
className
- the class name of the aspectpublic void addIncludePackage(java.lang.String includePackage)
addIncludePackage
in interface AspectWerkzDefinition
includePackage
- the new include packagepublic void addExcludePackage(java.lang.String excludePackage)
addExcludePackage
in interface AspectWerkzDefinition
excludePackage
- the new exclude packagepublic boolean hasAdvice(java.lang.String name)
hasAdvice
in interface AspectWerkzDefinition
name
- the name of the advice
public boolean hasIntroduction(java.lang.String name)
hasIntroduction
in interface AspectWerkzDefinition
name
- the name of the introduction
public boolean inIncludePackage(java.lang.String className)
inIncludePackage
in interface AspectWerkzDefinition
className
- the name or the class
public boolean inExcludePackage(java.lang.String className)
inExcludePackage
in interface AspectWerkzDefinition
className
- the name or the class
public boolean hasIntroductions(ClassMetaData classMetaData)
hasIntroductions
in interface AspectWerkzDefinition
classMetaData
- the class meta-data
public boolean hasExecutionPointcut(ClassMetaData classMetaData)
hasExecutionPointcut
in interface AspectWerkzDefinition
classMetaData
- the class meta-data
public boolean hasExecutionPointcut(ClassMetaData classMetaData, MethodMetaData methodMetaData)
hasExecutionPointcut
in interface AspectWerkzDefinition
classMetaData
- the class meta-datamethodMetaData
- the method meta-data
public boolean hasGetPointcut(ClassMetaData classMetaData)
hasGetPointcut
in interface AspectWerkzDefinition
classMetaData
- the class meta-data
public boolean hasGetPointcut(ClassMetaData classMetaData, FieldMetaData fieldMetaData)
hasGetPointcut
in interface AspectWerkzDefinition
classMetaData
- the class meta-datafieldMetaData
- the name or the field
public boolean hasSetPointcut(ClassMetaData classMetaData)
hasSetPointcut
in interface AspectWerkzDefinition
classMetaData
- the class meta-data
public boolean hasSetPointcut(ClassMetaData classMetaData, FieldMetaData fieldMetaData)
hasSetPointcut
in interface AspectWerkzDefinition
classMetaData
- the class meta-datafieldMetaData
- the name or the field
public boolean hasThrowsPointcut(ClassMetaData classMetaData)
hasThrowsPointcut
in interface AspectWerkzDefinition
classMetaData
- the class meta-data
public boolean hasThrowsPointcut(ClassMetaData classMetaData, MethodMetaData methodMetaData)
hasThrowsPointcut
in interface AspectWerkzDefinition
classMetaData
- the class meta-datamethodMetaData
- the name or the method
public boolean hasCallPointcut(ClassMetaData classMetaData)
hasCallPointcut
in interface AspectWerkzDefinition
classMetaData
- the class meta-data
public boolean isPickedOutByCallPointcut(ClassMetaData classMetaData, MethodMetaData methodMetaData)
isPickedOutByCallPointcut
in interface AspectWerkzDefinition
classMetaData
- the class meta-datamethodMetaData
- the name or the method
public java.util.List getInterfaceIntroductions(ClassMetaData classMetaData)
classMetaData
- the class meta-data
public void buildMixinMetaDataRepository(java.util.Set repository, java.lang.ClassLoader loader)
buildMixinMetaDataRepository
in interface AspectWerkzDefinition
repository
- the repositoryloader
- the class loader to usepublic void addParameter(java.lang.String aspectClassName, java.lang.String key, java.lang.String value)
aspectClassName
- the name of the aspectkey
- the keyvalue
- the valuepublic java.util.Map getParameters(java.lang.String aspectClassName)
aspectClassName
- the name of the aspect
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |