|
JAC project AOPSYS CEDRIC & LIP6 labs |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jac.core.AspectComponent | +--org.objectweb.jac.core.CompositeAspectComponent
This class is the root class for the composite aspect components defined by JAC aspect programmers.
A composite aspect is a kind of facade that factorizes and simplifies the use of a set of sub-aspects (called chidren aspects). For instance, the user and authentication aspects of JAC can be factorized in on unique aspect in order to simplify the use (factorization) and to eliminate useless dependencies.
Field Summary |
Fields inherited from class org.objectweb.jac.core.AspectComponent |
application, blockKeywords, firstCall, NOT_SHARED, SHARED, startWeavingCCount, startWeavingCount, startWeavingMethod, startWeavingType, systemListener, wrappers |
Fields inherited from interface org.objectweb.jac.core.BaseProgramListener |
FOUND_OBJECT |
Constructor Summary | |
CompositeAspectComponent()
The default constructor. |
Method Summary | |
protected void |
addChild(String name,
Class acClass)
Declares a new child for this composite (should be invoked from the constructor). |
void |
beforeConfiguration()
This method is upcalled by the system when the composite aspect is about to be configured. |
protected void |
disableDefaultConfigs(String childName)
Invoke this method in the constructor in order to disable the application of the default configuration for a given child aspect component. |
void |
doRegister()
This method is upcalled by the system when the composite aspect is actually registered in the AC manager. |
void |
doUnregister()
This method is upcalled by the system when the composite aspect is actually unregistered in the AC manager. |
protected AspectComponent |
getChild(String name)
Returns a child aspect component from its name. |
protected String |
getChildActualName(String name)
Returns the internal name of a child (applicationName.name). |
protected String |
getChildRegisteredName(String name)
Returns the internal name of a child, as it is registered in the JAC ACManager. |
protected void |
removeChild(String name)
Removes a child for this composite (do not use unless you know what you are doing). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CompositeAspectComponent()
Should be redefined be the programmer in order to declare the child aspects.
addChild(String,Class)
Method Detail |
protected void disableDefaultConfigs(String childName)
Note that the default configs are defined by the
getDefaultConfig
method. By default, all the
children's default configs are applied.
protected void addChild(String name, Class acClass)
name
- the child's name (can be any unique id)acClass
- the aspect component's class of the childprotected void removeChild(String name)
name
- the child's name as given in the addChild(String,Class)
methodprotected AspectComponent getChild(String name)
This method should be used in configuration methods of the composite to delegate the configuration to the child aspects.
protected String getChildActualName(String name)
name
- the child's nameprotected String getChildRegisteredName(String name)
Note that this method will return null if the child is not
yet registered in the AC manager. This is the case at
configuration time. Thus, getChildActualName(String)
should be prefered.
name
- the child's namepublic void beforeConfiguration() throws Exception
This method instantiates all the declared children (with
addChild(String,Class)
method.
beforeConfiguration
in class AspectComponent
Exception
public final void doRegister()
It symply registers all the children with the right names.
doRegister
in class AspectComponent
public final void doUnregister()
It symply unregisters all the children.
doUnregister
in class AspectComponent
|
Contact JAC development team: Renaud Pawlak Lionel Seinturier Laurent Martelli |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |