aspoev.binding
Class BindingsManager

java.lang.Object
  extended byaspoev.binding.BindingsManager
Direct Known Subclasses:
AspoevBindingManager

public class BindingsManager
extends java.lang.Object

This class encapsulates a group of binidngs which are used together to create an AspectJ aspect to be applied to the AspOEv framework.


Field Summary
protected static java.lang.String adviceFileName
           
protected  java.util.Hashtable bindings
           
protected static BindingsManager runtimeBindings
           
 
Constructor Summary
BindingsManager()
          Create a new binding manager.
 
Method Summary
 void addBinding(Binding newBinding)
          Add a binding to the manager.
 java.util.Collection getAllBindings()
          Returns a collection of all bindings in this manager.
 Binding getBinding(java.lang.String bindingName)
          Returns the binding of the specified name, or 'null' if no such binding exists.
 java.lang.String getBindingDescriptions()
          Returns a string of all bindings associated with this manager.
 java.util.Collection getMatchingBindings(java.lang.String modifiers, java.lang.String returnType, java.lang.String className, java.lang.String methodName, java.lang.String parameterTypes)
          Returns a Collection of bindings which match the given criterion.
static BindingsManager getRuntimeBindings()
          Returns the static BindingsManager 'runtimeBindings', which contains all bindings.
 void printBindings()
          Prints out all bindings associated with this bindings manager.
 java.lang.String renderAspect()
          Returns a string containing the AspectJ aspect created by this bindings manager.
 java.lang.String renderAspect(java.lang.String aspectName)
          Returns a String containing the AspectJ aspect of the specified name created from this bindings manager.
 java.lang.String renderAspect(java.lang.String packageName, java.lang.String aspectName)
          Returns a String containing the AspectJ aspect of the specified package name and name created from this bindings manager.
 java.lang.String toString()
           
 void writeAspect(java.io.File aspectFile, java.lang.String packageName, java.lang.String aspectName)
          Writes the AspectJ aspect of the represented by this bindings manager to the specifieed file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

runtimeBindings

protected static BindingsManager runtimeBindings

adviceFileName

protected static java.lang.String adviceFileName

bindings

protected java.util.Hashtable bindings
Constructor Detail

BindingsManager

public BindingsManager()
Create a new binding manager.

Method Detail

addBinding

public void addBinding(Binding newBinding)
Add a binding to the manager.


getAllBindings

public java.util.Collection getAllBindings()
Returns a collection of all bindings in this manager.


getBinding

public Binding getBinding(java.lang.String bindingName)
Returns the binding of the specified name, or 'null' if no such binding exists.


getMatchingBindings

public java.util.Collection getMatchingBindings(java.lang.String modifiers,
                                                java.lang.String returnType,
                                                java.lang.String className,
                                                java.lang.String methodName,
                                                java.lang.String parameterTypes)
Returns a Collection of bindings which match the given criterion.


getRuntimeBindings

public static BindingsManager getRuntimeBindings()
Returns the static BindingsManager 'runtimeBindings', which contains all bindings.


renderAspect

public java.lang.String renderAspect()
Returns a string containing the AspectJ aspect created by this bindings manager.


renderAspect

public java.lang.String renderAspect(java.lang.String aspectName)
Returns a String containing the AspectJ aspect of the specified name created from this bindings manager.


renderAspect

public java.lang.String renderAspect(java.lang.String packageName,
                                     java.lang.String aspectName)
Returns a String containing the AspectJ aspect of the specified package name and name created from this bindings manager.


getBindingDescriptions

public java.lang.String getBindingDescriptions()
Returns a string of all bindings associated with this manager.


printBindings

public void printBindings()
Prints out all bindings associated with this bindings manager.


writeAspect

public void writeAspect(java.io.File aspectFile,
                        java.lang.String packageName,
                        java.lang.String aspectName)
Writes the AspectJ aspect of the represented by this bindings manager to the specifieed file.

Parameters:
aspectFile - The file to write the aspect to
packageName - The package of the aspect
aspectName - The name of the aspect

toString

public java.lang.String toString()