jasco.runtime.aspect.factory
Class DefaultAspectFactory

java.lang.Object
  extended by jasco.runtime.aspect.factory.DefaultAspectFactory
All Implemented Interfaces:
IAspectFactory
Direct Known Subclasses:
PerClassAspectFactory, PerMethodAspectFactory, PerObjectAspectFactory, PerThreadAspectFactory

public abstract class DefaultAspectFactory
extends java.lang.Object
implements IAspectFactory

convenience class. Remmebers hook instances for given keys.

Author:
Wim

Constructor Summary
DefaultAspectFactory()
           
 
Method Summary
 IHook getAspectInstance(MethodJoinpoint jp, IAspectInstanceCreator creator)
          Returns the aspect instance applicable at this joinpoint.
abstract  java.lang.Object getKey(MethodJoinpoint jp)
          Returns the key for looking up hooks given this joinpoint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAspectFactory

public DefaultAspectFactory()
Method Detail

getAspectInstance

public IHook getAspectInstance(MethodJoinpoint jp,
                               IAspectInstanceCreator creator)
Description copied from interface: IAspectFactory
Returns the aspect instance applicable at this joinpoint. Use the creator for instantiating new hooks if necessary.

Specified by:
getAspectInstance in interface IAspectFactory
Parameters:
jp - current joinpoint
creator - new hook creator
Returns:
the hook instance for jp

getKey

public abstract java.lang.Object getKey(MethodJoinpoint jp)
Returns the key for looking up hooks given this joinpoint. Key may be null, default hook is used in that case.

Parameters:
jp - joinpoint
Returns:
a key for looking up hooks