aspoev.primitive
Class AroundPrimitive

java.lang.Object
  extended byaspoev.primitive.StaticPrimitive
      extended byaspoev.primitive.RuntimePrimitive
          extended byaspoev.primitive.AroundPrimitive
All Implemented Interfaces:
aspoev.Executable, MemberElement, pJ.jasmine.PRI, java.io.Serializable

public class AroundPrimitive
extends RuntimePrimitive
implements pJ.jasmine.PRI

This class is a piece of meta around advice. It has two parts, 'before proceed' and 'after proceed' advice. If the underlying join point is to be executed, the method 'proceed()' (with no arguments) must be called in the before proceed advice. The value returned from the 'around' advice must be stored in the variable 'proceed'. If this around advice is going to call 'proceed', it must be done in the 'beforeProceed' statement. The result can be referenced by the 'afterProceed' statement as the variable 'proceed'. An around primitive is essntially a Runtime Primitive extended to contain another Vejal block for post-proceed advice. Around primitives are declared in the command line environment as follows: around () { ... // Valid Vejal syntax for execution before 'proceed()' ... // ('proceed()' must come here, if at all) } { ... // Valid Vejal syntax for execution after 'proceed()' }

See Also:
RuntimePrimitive, Serialized Form

Field Summary
protected  StatementElement afterProceed
           
protected  StatementElement beforeProceed
           
 
Fields inherited from class aspoev.primitive.RuntimePrimitive
actionCode, active, AFTER, AROUND, BEFORE, bindings, bindType, thisPrimitive
 
Fields inherited from class aspoev.primitive.StaticPrimitive
action, effectedTypes, typeVariable
 
Fields inherited from interface pJ.jasmine.PRI
DELETECHANGE, MODIFYCHANGE, NOCHANGE
 
Constructor Summary
AroundPrimitive(StatementElement beforeProceed, StatementElement afterProceed)
           
AroundPrimitive(StatementElement beforeProceed, StatementElement afterProceed, java.util.List bindingNames)
           
 
Method Summary
 void executeAfterProceed()
          Execute the 'after proceed' Vejal block.
 void executeBeforeProceed()
          Execute the 'before proceed' Vejal block.
 StatementElement getAfterProceedAction()
          Returns the 'after proceed' advice.
 StatementElement getBeforeProceedAction()
          Returns the 'before proceed' advice.
 java.lang.String toString()
           
 
Methods inherited from class aspoev.primitive.RuntimePrimitive
declareThisPrimitive, execute, getActionStatement, isActive, registerWithBinding, registerWithBindings, registerWithBindings, setActive, setInactive
 
Methods inherited from class aspoev.primitive.StaticPrimitive
declarePrimitiveVariables
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

beforeProceed

protected StatementElement beforeProceed

afterProceed

protected StatementElement afterProceed
Constructor Detail

AroundPrimitive

public AroundPrimitive(StatementElement beforeProceed,
                       StatementElement afterProceed)

AroundPrimitive

public AroundPrimitive(StatementElement beforeProceed,
                       StatementElement afterProceed,
                       java.util.List bindingNames)
Method Detail

executeBeforeProceed

public void executeBeforeProceed()
Execute the 'before proceed' Vejal block.


executeAfterProceed

public void executeAfterProceed()
Execute the 'after proceed' Vejal block.


getAfterProceedAction

public StatementElement getAfterProceedAction()
Returns the 'after proceed' advice.


getBeforeProceedAction

public StatementElement getBeforeProceedAction()
Returns the 'before proceed' advice.


toString

public java.lang.String toString()
Overrides:
toString in class RuntimePrimitive