jasco.runtime.connector
Class DynamicHookElement

java.lang.Object
  extended by jasco.runtime.connector.HookElement
      extended by jasco.runtime.connector.DynamicHookElement
All Implemented Interfaces:
IAspectInstanceCreator, java.lang.Cloneable

public class DynamicHookElement
extends HookElement
implements IAspectInstanceCreator


Field Summary
static char INITIALIZER
           
 
Constructor Summary
DynamicHookElement(IHook aCutpoint, CutpointExecutionElement aBefore, CutpointExecutionElement aAfter, CutpointExecutionElement aReplace, java.lang.String aName)
           
 
Method Summary
 IHook createNewInstance()
          Creates and initialises a new hook instance as specified by the connector.
 IHook createNewInstance(java.lang.Class clz)
           
 IHook createNewInstance(java.lang.ClassLoader classLoader)
          Creates and initialises a new hook instance as specified by the connector.
 boolean doNotCache()
           
protected  java.lang.reflect.Method findMethod(java.lang.String name, java.lang.Class c)
           
 IAspectFactory getAspectFactory()
           
 IHook getCutpoint()
           
 IHook getCutpoint(MethodJoinpoint jp)
           
 IHook getCutpoint(java.lang.Object o)
           
 java.lang.Class<? extends IHook> getHookClass()
          Reflective method for returning the aspect class that is created by this instance creator.
 void globalPropertyChangeEvent(HookPropertyChangeEvent event)
           
 boolean isApplicable(java.util.Hashtable mappings, MethodJoinpoint aJascoMethod, boolean forJutta)
           
 void setAspectFactory(IAspectFactory c)
           
 
Methods inherited from class jasco.runtime.connector.HookElement
addProperty, copy, equals, getAfter, getBefore, getId, getName, getProperties, getReplace, setAfter, setBefore, setId, setReplace, toString, transformOrder
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INITIALIZER

public static final char INITIALIZER
See Also:
Constant Field Values
Constructor Detail

DynamicHookElement

public DynamicHookElement(IHook aCutpoint,
                          CutpointExecutionElement aBefore,
                          CutpointExecutionElement aAfter,
                          CutpointExecutionElement aReplace,
                          java.lang.String aName)
Method Detail

setAspectFactory

public void setAspectFactory(IAspectFactory c)

doNotCache

public boolean doNotCache()
Overrides:
doNotCache in class HookElement

getAspectFactory

public IAspectFactory getAspectFactory()

globalPropertyChangeEvent

public void globalPropertyChangeEvent(HookPropertyChangeEvent event)
Overrides:
globalPropertyChangeEvent in class HookElement

getCutpoint

public IHook getCutpoint()
Overrides:
getCutpoint in class HookElement

getCutpoint

public IHook getCutpoint(java.lang.Object o)
Overrides:
getCutpoint in class HookElement

getCutpoint

public IHook getCutpoint(MethodJoinpoint jp)
Overrides:
getCutpoint in class HookElement

findMethod

protected java.lang.reflect.Method findMethod(java.lang.String name,
                                              java.lang.Class c)

createNewInstance

public IHook createNewInstance()
                        throws HookInstantiationFailed
Description copied from interface: IAspectInstanceCreator
Creates and initialises a new hook instance as specified by the connector.

Specified by:
createNewInstance in interface IAspectInstanceCreator
Returns:
the new hook instance
Throws:
HookInstantiationFailed

createNewInstance

public IHook createNewInstance(java.lang.ClassLoader classLoader)
                        throws HookInstantiationFailed
Description copied from interface: IAspectInstanceCreator
Creates and initialises a new hook instance as specified by the connector.

Specified by:
createNewInstance in interface IAspectInstanceCreator
Parameters:
classLoader - The classLoader to use for loading the hook's class data.
Returns:
the new hook instance
Throws:
HookInstantiationFailed

createNewInstance

public IHook createNewInstance(java.lang.Class clz)
                        throws HookInstantiationFailed
Throws:
HookInstantiationFailed

isApplicable

public boolean isApplicable(java.util.Hashtable mappings,
                            MethodJoinpoint aJascoMethod,
                            boolean forJutta)
Overrides:
isApplicable in class HookElement

getHookClass

public java.lang.Class<? extends IHook> getHookClass()
Description copied from interface: IAspectInstanceCreator
Reflective method for returning the aspect class that is created by this instance creator.

Specified by:
getHookClass in interface IAspectInstanceCreator
Returns:
the class of the aspect