|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.aspectwerkz.xmldef.definition.AspectWerkzDefinitionImpl
Implementation of the AspectWerkz interface for the xmldef 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 and the cflow advices |
Method Summary | |
void |
addAbstractAspect(AspectDefinition aspect)
Adds an abstract aspect definition. |
void |
addAdvice(AdviceDefinition advice)
Adds an advice definition. |
void |
addAdviceStack(AdviceStackDefinition adviceStackDef)
Adds an advice stack definition. |
void |
addAspect(AspectDefinition aspect)
Adds an 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 |
addIntroduction(IntroductionDefinition introduction)
Adds a new introductions definition. |
void |
buildMixinMetaDataRepository(java.util.Set repository,
java.lang.ClassLoader loader)
Builds up a meta-data repository for the mixins. |
AspectDefinition |
getAbstractAspectDefinition(java.lang.String name)
Returns a specific abstract aspect definition. |
java.util.Collection |
getAbstractAspectDefinitions()
Returns a collection with the abstract aspect definitions registered. |
AdviceDefinition |
getAdviceDefinition(java.lang.String name)
Returns a specific advice definition. |
java.util.Collection |
getAdviceDefinitions()
Returns a collection with the advice definitions registered. |
java.lang.String |
getAdviceNameByAttribute(java.lang.String attribute)
Finds the name of an advice by its attribute. |
AdviceStackDefinition |
getAdviceStackDefinition(java.lang.String adviceStackName)
Finds an advice stack definition by its name. |
AspectDefinition |
getAspectDefinition(java.lang.String name)
Returns a specific aspect definition. |
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.lang.String[] |
getAspectTargetClassNames()
Returns the names of the target classes. |
java.util.Set |
getExcludePackages()
Returns the exclude packages. |
java.util.Set |
getIncludePackages()
Returns the include packages. |
IntroductionDefinition |
getIntroductionDefinition(java.lang.String introductionName)
Returns a specific introduction definition. |
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. |
int |
getIntroductionIndex(java.lang.String introductionName)
Returns the index for a specific introduction. |
gnu.trove.TObjectIntHashMap |
getIntroductionIndexes()
Returns the indexes for the introductions. |
java.lang.String |
getIntroductionInterfaceName(java.lang.String introductionName)
Returns the name of the interface for an introduction. |
java.lang.String |
getIntroductionNameByAttribute(java.lang.String attribute)
Finds the name of an introduction by its attribute. |
java.util.List |
getIntroductionNames(ClassMetaData classMetaData)
Returns the names of the introductions for a certain class. |
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 is invoking a method that is picked out by a call pointcut. |
boolean |
hasExecutionPointcut(ClassMetaData classMetaData)
Checks if a method has an execution pointcut. |
boolean |
hasExecutionPointcut(ClassMetaData classMetaData,
MethodMetaData methodMetaData)
Checks if a method has an execution pointcut. |
boolean |
hasGetPointcut(ClassMetaData classMetaData)
Checks if a class has a get pointcut. |
boolean |
hasGetPointcut(ClassMetaData classMetaData,
FieldMetaData fieldMetaData)
Checks if a class has a get pointcut. |
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 set pointcut. |
boolean |
hasSetPointcut(ClassMetaData classMetaData,
FieldMetaData fieldMetaData)
Checks if a class has a set pointcut. |
boolean |
hasThrowsPointcut(ClassMetaData classMetaData)
Checks if a class has a throws pointcut. |
boolean |
hasThrowsPointcut(ClassMetaData classMetaData,
MethodMetaData methodMetaData)
Checks if a class has a throws pointcut. |
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 picked out by a call pointcut. |
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 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 getAbstractAspectDefinitions()
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 AdviceStackDefinition getAdviceStackDefinition(java.lang.String adviceStackName)
adviceStackName
- the advice stack name
public AspectDefinition getAbstractAspectDefinition(java.lang.String name)
name
- the name of the abstract aspect definition
public AspectDefinition getAspectDefinition(java.lang.String name)
name
- the name of the aspect definition
public java.lang.String[] getAspectTargetClassNames()
public AdviceDefinition getAdviceDefinition(java.lang.String name)
name
- the name of the advice definition
public java.lang.String getAdviceNameByAttribute(java.lang.String attribute)
attribute
- the attribute
public java.lang.String getIntroductionNameByAttribute(java.lang.String attribute)
attribute
- the attribute
public java.lang.String getIntroductionInterfaceName(java.lang.String introductionName)
introductionName
- the name of the introduction
public java.lang.String getIntroductionImplName(java.lang.String introductionName)
getIntroductionImplName
in interface AspectWerkzDefinition
introductionName
- the name of the introduction
public IntroductionDefinition getIntroductionDefinition(java.lang.String introductionName)
introductionName
- the name of the introduction
public int getIntroductionIndex(java.lang.String introductionName)
introductionName
- the name of the introduction
public gnu.trove.TObjectIntHashMap getIntroductionIndexes()
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 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 void addAbstractAspect(AspectDefinition aspect)
aspect
- a new abstract aspect definitionpublic void addAspect(AspectDefinition aspect)
aspect
- a new aspect definitionpublic void addAdviceStack(AdviceStackDefinition adviceStackDef)
adviceStackDef
- the advice stack definitionpublic void addAdvice(AdviceDefinition advice)
advice
- the advice definitionpublic void addIntroduction(IntroductionDefinition introduction)
introduction
- the introduction definitionpublic 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 getIntroductionNames(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 loadAspects(java.lang.ClassLoader loader)
loadAspects
in interface AspectWerkzDefinition
loader
- the class loader to use to load the aspects
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |