|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jac.core.AspectComponent
org.objectweb.jac.core.CompositionAspect
This special aspect component is used by the system to solve inter-aspect composition issues.
It is typically used to order the different wrappers at runtime
(see getWeaveTimeRank()
) or to check if two aspect
components are incompatible of dependent (see
addIncompatibleACPairs()
and
addDependentACPair()
).
Field Summary | |
protected Vector |
dependentACs
Store the dependent aspect component pairs. |
protected Vector |
incompatibleACs
Store the exclusive aspect component pairs. |
protected Vector |
wrappingOrder
Store the default wrapping order. |
Fields inherited from class org.objectweb.jac.core.AspectComponent |
application, blockKeywords, cr, currentConfigMethod, currentImports, firstCall, NOT_SHARED, SHARED, startWeavingCCount, startWeavingCount, startWeavingMethod, startWeavingType, systemListener, wrappers |
Fields inherited from interface org.objectweb.jac.core.BaseProgramListener |
FOUND_OBJECT |
Constructor Summary | |
CompositionAspect()
The default contructor (reads the jac.prop file to initialize the composition aspect). |
Method Summary | |
void |
addDependentACPair(AspectComponent ac1,
AspectComponent ac2)
Add a new dependent aspect component pair. |
void |
addIncompatibleACPair(AspectComponent ac1,
AspectComponent ac2)
Add a new exlusive aspect component pair. |
boolean |
areCorrectlyOrdered(String wrapperType1,
String wrapperType2)
Returns true if wrapperType1 has to be run before wrapperType2. |
boolean |
areDependent(AspectComponent ac1,
AspectComponent ac2)
Returns true if the aspect components are dependent. |
boolean |
areIncompatible(AspectComponent ac1,
AspectComponent ac2)
Returns true if the aspect components are incompatible. |
int |
getWeaveTimeRank(WrappingChain wrappingChain,
Wrapper wrapper)
When a wrappee method is beeing wrapped by a wrapper, this method is upcalled by the system to get the rank of the wrapper within the wrapping chain (the set of wrappers that allready wrap the wrappee method). |
Vector |
getWrappingTypesOrder()
The getter for the wrapping types order. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Vector wrappingOrder
protected Vector incompatibleACs
protected Vector dependentACs
Constructor Detail |
public CompositionAspect()
Method Detail |
public int getWeaveTimeRank(WrappingChain wrappingChain, Wrapper wrapper)
wrappingChain
- the set of wrapping methods that allready
wraps the wrappee methodwrapper
- the wrapper that is going be added to the
wrapping chainWrapping.wrap(Wrappee,Wrapper,AbstractMethodItem)
public final boolean areCorrectlyOrdered(String wrapperType1, String wrapperType2)
getWeaveTimeRank()
.
wrapperType1
- the first type to checkwrapperType2
- the second type to check
getWeaveTimeRank(WrappingChain,Wrapper)
public final Vector getWrappingTypesOrder()
public final void addIncompatibleACPair(AspectComponent ac1, AspectComponent ac2)
If ac1 and ac2 are incompatible, then ac1 cannot be registered in the Aspect Component Manager if ac2 is already registered (and reverse).
NOTE: this is a reflexive relation.
ac1
- the aspect component that is incompatible with ac2ac2
- the aspect component that is incompatible with ac1ACManager.register(String,Object)
public final void addDependentACPair(AspectComponent ac1, AspectComponent ac2)
If ac1 depends on ac2, then ac1 cannot be registered in the Aspect Component Manager if ac2 is not already registered.
NOTE: this is a transitive relation.
ac1
- the aspect component that depends on ac2ac2
- the aspect component on which ac1 dependsACManager.register(String,Object)
public final boolean areIncompatible(AspectComponent ac1, AspectComponent ac2)
NOTE:
areIncompatible(ac1,ac2)
equals
areIncompatible(ac2,ac1)
ac1
- the first aspect component to checkac2
- the second aspect component to check
addIncompatibleACPair(AspectComponent,AspectComponent)
public final boolean areDependent(AspectComponent ac1, AspectComponent ac2)
NOTE:
areDependent(ac1,ac2)
not equals
areDependent(ac2,ac1)
ac1
- the first aspect component to checkac2
- the second aspect component to check
addDependentACPair(AspectComponent,AspectComponent)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |