aspoev.binding
Class Binding

java.lang.Object
  extended byaspoev.binding.Binding

public class Binding
extends java.lang.Object


Field Summary
protected  boolean active
           
protected  java.util.LinkedList afterRules
           
protected  java.util.LinkedList aroundRules
           
protected  java.util.LinkedList beforeRules
           
protected  java.lang.String bindingName
           
protected  java.lang.String className
           
static boolean DEBUG
           
protected  java.lang.String DSPACER
           
protected  java.lang.String methodName
           
protected  java.lang.String methodParameterTypes
           
protected  java.lang.String modifiers
           
protected  java.lang.String ownerName
           
protected  BindingArgument[] pointcutArguments
           
protected  java.lang.String pointCutType
           
protected  java.lang.String returnType
           
protected  java.lang.String SPACER
           
protected  java.lang.String TSPACER
           
 
Constructor Summary
Binding()
           
Binding(java.lang.String joinPoint, BindingArgument[] pointcutArguments)
           
Binding(java.lang.String bindingName, java.lang.String joinPoint)
          Creates a binding with the specified name on the specified join point with no arguments.
Binding(java.lang.String bindingName, java.lang.String joinPoint, BindingArgument[] pointcutArguments)
          Creates a binding with the specified name on the specified join point with arguments.
 
Method Summary
 void activate()
          Activates the binding and all subscribed advice.
 void addAfterRule(RuntimePrimitive rule)
          Add an 'after rule' (after advice) to this binding.
 void addAfterRule(RuntimePrimitive rule, int index)
          Add an 'after rule' (after advice) to this binding at the specified place.
 void addAroundRule(AroundPrimitive rule)
          Adds an 'around rule' (around advice) to this binding.
 void addAroundRule(AroundPrimitive rule, int index)
          Adds an 'around rule' (around advice) to this binding at the specified index.
 void addBeforeRule(RuntimePrimitive rule)
          Add a 'before rule' (before advice) to this binding.
 void addBeforeRule(RuntimePrimitive rule, int index)
          Add a 'before rule' (before advice) to this binding at the specified index.
 boolean bindsType(java.lang.String type)
          Returns true if this binding has a bound argument whose class name is equal to the argument string.
 void deactivate()
          Deactivates the binding and all subscribed advice.
protected  void debug(java.lang.String message)
           
 void declareArguments(java.lang.Object[] args)
          This method declares the arguments of the pointcut in the executing Vejal environment so they can be accessed by the database rules.
protected  void executeAdvice(java.util.List advice)
           
 void executeAfterAdvice()
          Executes the after advice associated with this binding.
 void executeAfterProceedAdvice()
          Executes the after-proceed portion of around advice associated with this binding.
 void executeBeforeAdvice()
          Executes the before advice associated with this binding.
 void executeBeforeProceedAdvice()
          Executes the before-proceed portion of around advice associated with this binding.
protected  java.lang.String getAdviceDescription()
          Returns a string describing the AspectJ advice for this binding.
 java.lang.String getAdviceString()
          Returns a string of all advice bound to this binding.
protected  java.lang.String getAdviceString(java.util.List list)
           
protected  java.lang.String getArgBindingNames()
           
protected  java.lang.String getArgumentBindingString()
          Returns a string describing the '&& args(..)' portion of an AspectJ pointcut if the pointcut takes arguments.
protected  java.lang.String getArgumentDeclaration()
          Returns a string representation of this binding's arguments for the parameter declaration of pointcuts and advice, i.e., "String name, Object bind"...
protected  java.lang.String getArgumentDescription()
           
protected  java.lang.String getArgumentNames()
          Returns a string that is a ','-delineated list of all the names of the arguments passed into this Binding.
 java.lang.String getBindingArgumentName(java.lang.String type)
          Returns the variable name of the bound argument of the specified type (as declared within Vejal environment within the binding).
 java.util.Collection getBoundRules()
          Returns a collection of all the advice bound to this binding.
protected  java.lang.String getJoinPointDescription()
          Returns the description of the Join Point that this Binding binds to.
protected  java.lang.String getPointcutDescription()
          Returns a string describing the AspectJ pointcut for this Binding.
protected  java.lang.String getProceedBindingNames()
          Returns a string con which is a ','-delineated list of the names of the variables that must be passed to a 'proceed(..)' call in ApsectJ around advice.
 boolean isActive()
          Returns true if the binding is active.
 void printDescription()
          Prints the result of 'getAdviceString'
 java.lang.String renderBinding()
          \ * Rendering Methods * * \
 void repositionAfterRule(int adviceNum, int newPosition)
          Moves the after rule at one index to another index.
 void repositionAroundRule(int adviceNum, int newPosition)
          Moves the around rule at one index to another index.
 void repositionBeforeRule(int adviceNum, int newPosition)
          Moves the before rule at one index to another index.
protected  void repositionRule(java.util.LinkedList ruleList, int position, int newPosition)
           
 void setAspectName(java.lang.String aspectName)
          Allows an 'aspect renderer' to inform this binding of the name of the aspect that will enclose its introductions, pointcuts, and advice.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static boolean DEBUG

SPACER

protected java.lang.String SPACER

DSPACER

protected java.lang.String DSPACER

TSPACER

protected java.lang.String TSPACER

bindingName

protected java.lang.String bindingName

modifiers

protected java.lang.String modifiers

returnType

protected java.lang.String returnType

className

protected java.lang.String className

methodName

protected java.lang.String methodName

methodParameterTypes

protected java.lang.String methodParameterTypes

pointcutArguments

protected BindingArgument[] pointcutArguments

pointCutType

protected final java.lang.String pointCutType
See Also:
Constant Field Values

ownerName

protected java.lang.String ownerName

active

protected boolean active

afterRules

protected java.util.LinkedList afterRules

beforeRules

protected java.util.LinkedList beforeRules

aroundRules

protected java.util.LinkedList aroundRules
Constructor Detail

Binding

public Binding(java.lang.String bindingName,
               java.lang.String joinPoint)
Creates a binding with the specified name on the specified join point with no arguments.

Parameters:
bindingName - The name of the binding
joinPoint - The AspectJ-style join point.

Binding

public Binding(java.lang.String bindingName,
               java.lang.String joinPoint,
               BindingArgument[] pointcutArguments)
Creates a binding with the specified name on the specified join point with arguments.

Parameters:
bindingName - The name of the binding
joinPoint - The AspectJ-style join point.
pointcutArguments - The arguments to the pointcut

Binding

public Binding(java.lang.String joinPoint,
               BindingArgument[] pointcutArguments)

Binding

public Binding()
Method Detail

activate

public void activate()
Activates the binding and all subscribed advice.


deactivate

public void deactivate()
Deactivates the binding and all subscribed advice.


isActive

public boolean isActive()
Returns true if the binding is active.


getBoundRules

public java.util.Collection getBoundRules()
Returns a collection of all the advice bound to this binding.


getAdviceString

public java.lang.String getAdviceString()
Returns a string of all advice bound to this binding.


getAdviceString

protected java.lang.String getAdviceString(java.util.List list)

printDescription

public void printDescription()
Prints the result of 'getAdviceString'


addAfterRule

public void addAfterRule(RuntimePrimitive rule)
Add an 'after rule' (after advice) to this binding.


addAfterRule

public void addAfterRule(RuntimePrimitive rule,
                         int index)
Add an 'after rule' (after advice) to this binding at the specified place.


addBeforeRule

public void addBeforeRule(RuntimePrimitive rule)
Add a 'before rule' (before advice) to this binding.


addBeforeRule

public void addBeforeRule(RuntimePrimitive rule,
                          int index)
Add a 'before rule' (before advice) to this binding at the specified index.


bindsType

public boolean bindsType(java.lang.String type)
Returns true if this binding has a bound argument whose class name is equal to the argument string.


getBindingArgumentName

public java.lang.String getBindingArgumentName(java.lang.String type)
Returns the variable name of the bound argument of the specified type (as declared within Vejal environment within the binding).


addAroundRule

public void addAroundRule(AroundPrimitive rule)
Adds an 'around rule' (around advice) to this binding.


addAroundRule

public void addAroundRule(AroundPrimitive rule,
                          int index)
Adds an 'around rule' (around advice) to this binding at the specified index.


repositionRule

protected void repositionRule(java.util.LinkedList ruleList,
                              int position,
                              int newPosition)

repositionAfterRule

public void repositionAfterRule(int adviceNum,
                                int newPosition)
Moves the after rule at one index to another index.

Parameters:
adviceNum - The current position of the advice
newPosition - The new position of the advice

repositionAroundRule

public void repositionAroundRule(int adviceNum,
                                 int newPosition)
Moves the around rule at one index to another index.

Parameters:
adviceNum - The current position of the advice
newPosition - The new position of the advice

repositionBeforeRule

public void repositionBeforeRule(int adviceNum,
                                 int newPosition)
Moves the before rule at one index to another index.

Parameters:
adviceNum - The current position of the advice
newPosition - The new position of the advice

declareArguments

public void declareArguments(java.lang.Object[] args)
This method declares the arguments of the pointcut in the executing Vejal environment so they can be accessed by the database rules. For use by AspectJ-generated around advice only.


executeAdvice

protected void executeAdvice(java.util.List advice)

executeAfterAdvice

public void executeAfterAdvice()
Executes the after advice associated with this binding. For use by AspectJ generated advice only.


executeBeforeAdvice

public void executeBeforeAdvice()
Executes the before advice associated with this binding. For use by AspectJ generated advice only.


executeBeforeProceedAdvice

public void executeBeforeProceedAdvice()
Executes the before-proceed portion of around advice associated with this binding. For use by AspectJ generated advice only.


executeAfterProceedAdvice

public void executeAfterProceedAdvice()
Executes the after-proceed portion of around advice associated with this binding. For use by AspectJ generated advice only.


debug

protected void debug(java.lang.String message)

renderBinding

public java.lang.String renderBinding()
\ * Rendering Methods * * \


getJoinPointDescription

protected java.lang.String getJoinPointDescription()
Returns the description of the Join Point that this Binding binds to.


getPointcutDescription

protected java.lang.String getPointcutDescription()
Returns a string describing the AspectJ pointcut for this Binding.


getAdviceDescription

protected java.lang.String getAdviceDescription()
Returns a string describing the AspectJ advice for this binding.


getArgumentBindingString

protected java.lang.String getArgumentBindingString()
Returns a string describing the '&& args(..)' portion of an AspectJ pointcut if the pointcut takes arguments.


getArgBindingNames

protected java.lang.String getArgBindingNames()

getProceedBindingNames

protected java.lang.String getProceedBindingNames()
Returns a string con which is a ','-delineated list of the names of the variables that must be passed to a 'proceed(..)' call in ApsectJ around advice.


getArgumentDeclaration

protected java.lang.String getArgumentDeclaration()
Returns a string representation of this binding's arguments for the parameter declaration of pointcuts and advice, i.e., "String name, Object bind"...


getArgumentNames

protected java.lang.String getArgumentNames()
Returns a string that is a ','-delineated list of all the names of the arguments passed into this Binding.


getArgumentDescription

protected java.lang.String getArgumentDescription()

setAspectName

public void setAspectName(java.lang.String aspectName)
Allows an 'aspect renderer' to inform this binding of the name of the aspect that will enclose its introductions, pointcuts, and advice.


toString

public java.lang.String toString()