Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

ch.ethz.prose.crosscut
Class Crosscut  view Crosscut download Crosscut.java

java.lang.Object
  extended bych.ethz.prose.engine.JoinPointListener
      extended bych.ethz.prose.crosscut.Crosscut
All Implemented Interfaces:
ch.ethz.prose.Insertable, java.io.Serializable
Direct Known Subclasses:
AbstractCrosscut

public abstract class Crosscut
extends ch.ethz.prose.engine.JoinPointListener
implements ch.ethz.prose.Insertable, java.io.Serializable

User perspective

If you want to use crosscuts, than you have to understand two things: 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:

Version:
$Revision: 1.1.1.1 $

Constructor Summary
Crosscut()
           
 
Method Summary
abstract  void associateToGroup(CrosscutGroup grp)
          Associated this crosscut to the group grp.
abstract  CrosscutRequest createRequest()
          Create a CrosscutRequest for the specified class in the local virtual machine.
abstract  CrosscutRequest createRequest(java.lang.Class crtCls)
          Create a CrosscutRequest for the local virtual machine, but containing requests for joinpoints only inside the class crtCls.
abstract  ch.ethz.prose.Aspect getOwner()
          Return the Aspect that owns this crosscut.
abstract  void setOwner(ch.ethz.prose.Aspect x)
          Set the Aspect that owns this crosscut.
 
Methods inherited from class ch.ethz.prose.engine.JoinPointListener
joinPointReached, joinPointReached, joinPointReached, joinPointReached, joinPointReached, joinPointReached
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ch.ethz.prose.Insertable
getPriority, insertionAction, withdrawalAction
 

Constructor Detail

Crosscut

public Crosscut()
Method Detail

createRequest

public abstract CrosscutRequest createRequest()
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 JoinPointRequests in the result of this method are created using the factory specified with setRequestFactorye.


createRequest

public abstract CrosscutRequest createRequest(java.lang.Class crtCls)
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.


associateToGroup

public abstract void associateToGroup(CrosscutGroup grp)
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)


getOwner

public abstract ch.ethz.prose.Aspect getOwner()
Return the Aspect that owns this crosscut.


setOwner

public abstract void setOwner(ch.ethz.prose.Aspect x)
Set the Aspect that owns this crosscut. This method cannot be executed twice (crosscut cannot change owners).