| java.lang.Object ch.ethz.prose.Aspect
All known Subclasses: ch.ethz.prose.DefaultAspect, ch.ethz.prose.SignedAspect,
Constructor Summary | |
public | Aspect() Create an aspect with an automatically generated association. |
Method Summary | |
public synchronized void | associateTo(Object id) Associate aspect with a given object. | abstract protected Crosscut[] | crosscuts() This is a template meethod. | public boolean | equals(Object obj) Indicates whether some other object is "equal to" this one. | public static Object | generateUniqueAssociation() Aspects are associated to objects. | public Object | getAssociatedObject() | public List | getCrosscuts() Return a list of crosscuts owned by this Aspect. | public int | getPriority() Get the priority of this aspect. | public int | hashCode() Returns a hashcode for this object. | public void | insertionAction(boolean isBefore) This method is called before and after this
aspect is inserted into an AspectManager .
By overriding the default (which is a no-op), one can
define setup actions. | public void | setPriority(int prio) Set the priority of this aspect. | public String | toString() | public void | withdrawalAction(boolean isBefore) this method is called before and after the withdrawal of an aspect. |
birthDayCount | protected static long birthDayCount(Code) | | |
priority | protected int priority(Code) | | |
Aspect | public Aspect()(Code) | | Create an aspect with an automatically generated association. Note that
the aspects associations have in PROSE the same role as the 'perObject', 'perVM',
etc. role in other languages and frameworks.
|
associateTo | public synchronized void associateTo(Object id)(Code) | | Associate aspect with a given object. Note that
the associated has in PROSE the same role as the 'perObject', 'perVM',
etc. role in other languages and frameworks. For one given object,
just ONE aspect instance may be inserted in PROSE at a given time.
With this, if you specify the name "foo" as an associated object, any insertion
of a second aspect associated to "foo" results in an exception.
In other words, a unique name means a 'per VM' aspect. However,
you may associate aspects to the elements o1..oN of a vector
of your choice. In this case, it will be a 'per Object' aspect.
An aspect not explicitely associated to an id is associated to a random
object.
|
crosscuts | abstract protected Crosscut[] crosscuts()(Code) | | This is a template meethod. Users must define
this method to return a list of crosscut objects
that belong to this aspect
|
equals | public boolean equals(Object obj)(Code) | | Indicates whether some other object is "equal to" this one. The
result is true if and only if obj is
not null and is a instance of
DefaultAspect and has equal contents as this
object.
Parameters: obj - other object with which to compare true iff obj is equal to thisDefaultAspect |
generateUniqueAssociation | public static Object generateUniqueAssociation()(Code) | | Aspects are associated to objects. This method generates a 'random'
object.
|
getAssociatedObject | public Object getAssociatedObject()(Code) | | Return the object associated to this aspect
|
getCrosscuts | public List getCrosscuts()(Code) | | Return a list of crosscuts owned by this Aspect. Note that this
method returns the same list of objects during
the existence of asspect. This list is initialized using the
crosscuts template method.
|
getPriority | public int getPriority()(Code) | | Get the priority of this aspect. Advices (indireclty) belonging
to this aspect are executed from low priority values to
high prioirity values. The default priority is 0.
|
hashCode | public int hashCode()(Code) | | Returns a hashcode for this object.
hashcode value |
insertionAction | public void insertionAction(boolean isBefore)(Code) | | This method is called before and after this
aspect is inserted into an AspectManager .
By overriding the default (which is a no-op), one can
define setup actions. If this method throws an exception,
the aspect insertion fails.
|
setPriority | public void setPriority(int prio)(Code) | | Set the priority of this aspect. Advices (indireclty) belonging
to this aspect are executed from low priority values to
high prioirity values. The default priority is 0.
|
withdrawalAction | public void withdrawalAction(boolean isBefore)(Code) | | this method is called before and after the withdrawal of an aspect.
|
|
|