| |
|
| java.lang.Object ch.ethz.prose.engine.JoinPointListener ch.ethz.prose.crosscut.Crosscut
All known Subclasses: ch.ethz.prose.crosscut.AbstractCrosscut,
Crosscut | abstract public class Crosscut extends JoinPointListener implements Insertable,Serializable(Code) | | User perspective
If you want to use crosscuts, than you have to understand two things:
- how to write advices
- how to use point-cutters.
Read the documentation for MethodCut , GetCut etc
to understand these issues.
Developer perspective
Class Crosscut defines an object which can create CrosscutRequests .
A crosscut request defines a crosscut as a set of join point requests together with
actions to be performed when the events corresponding to the crosscut it defines are
triggered.
A crosscut is also a JointPointListener . According to
the contract provided by JoinPointManager
an crosscut expects to be notified only for those events
which correspond to the requests it has created itself.
Crossscut objects are expected to be used in two modes:
- when first defining a crosscuting action for the current state
of the VM
- when a new class is loaded in the current VM
version: $Revision: 1.1.1.1 $ author: Andrei Popovici |
associateToGroup | abstract public void associateToGroup(CrosscutGroup grp)(Code) | | Associated this crosscut to the group grp .
By associating a crosscut to a group, the advice of
this crosscut are executed depending on the state of the
group.
(see CrosscutGroup.setExecuteAdvice )
|
createRequest | abstract public CrosscutRequest createRequest()(Code) | | Create a CrosscutRequest for the specified class in the local
virtual machine. This method should be used by first use of this crosscut. It
analyses either all classes of the virtual machine or a definite subset of it,
specific for this Crosscut .
The JoinPointRequest s in the result of this method are created
using the factory specified with setRequestFactorye .
the CrosscutRequest corresponding to the join-points defined by thiscrosscut with respect to the current state of the local VM |
createRequest | abstract public CrosscutRequest createRequest(Class crtCls)(Code) | | Create a CrosscutRequest for the local virtual machine, but containing
requests for joinpoints only inside the class crtCls . This method
is expected to be used upon loading of new classes.
The JoinPointRequests in the result of this method are created
using the factory specified with setRequestFactorye .
|
getOwner | abstract public Aspect getOwner()(Code) | | Return the Aspect that owns this crosscut.
|
setOwner | abstract public void setOwner(Aspect x)(Code) | | Set the Aspect that owns this crosscut. This method cannot be
executed twice (crosscut cannot change owners).
|
|
|
|