|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.aspectwerkz.aspect.AbstractAspectContainer
public abstract class AbstractAspectContainer
Abstract base class for the aspect container implementations.
| Field Summary | |
|---|---|
protected Object[] |
ARRAY_WITH_SINGLE_ASPECT_CONTEXT
An array with the single aspect context, needed to save one array creation per invocation. |
static int |
ASPECT_CONSTRUCTION_TYPE_ASPECT_CONTEXT
|
static int |
ASPECT_CONSTRUCTION_TYPE_DEFAULT
|
static int |
ASPECT_CONSTRUCTION_TYPE_UNKNOWN
|
static Object[] |
EMPTY_OBJECT_ARRAY
|
protected Map |
m_adviceInfos
Maps the advice infos to the hash codes of the the matching advice method. |
protected AspectContext |
m_aspectContext
The aspect context prototype. |
protected int |
m_constructionType
The aspect construction type. |
protected Map |
m_perClass
Holds references to the per class aspect instances. |
protected Map |
m_perInstance
Holds references to the per instance aspect instances. |
protected Object |
m_perJvm
Holds a reference to the sole per JVM aspect instance. |
protected Map |
m_perThread
Holds references to the per thread aspect instances. |
| Constructor Summary | |
|---|---|
AbstractAspectContainer(AspectContext aspectContext)
Creates a new aspect container strategy. |
|
| Method Summary | |
|---|---|
Object |
aspectOf()
asm Creates a new perJVM cross-cutting instance, if it already exists then return it. |
Object |
aspectOf(Class klass)
Creates a new perClass cross-cutting instance, if it already exists then return it. |
Object |
aspectOf(Object instance)
Creates a new perInstance cross-cutting instance, if it already exists then return it. |
Object |
aspectOf(Thread thread)
Creates a new perThread cross-cutting instance, if it already exists then return it. |
protected abstract Object |
createAspect()
To be implemented by the concrete aspect containers. |
AspectContext |
getContext()
Returns the context. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ASPECT_CONSTRUCTION_TYPE_UNKNOWN
public static final int ASPECT_CONSTRUCTION_TYPE_DEFAULT
public static final int ASPECT_CONSTRUCTION_TYPE_ASPECT_CONTEXT
public static final Object[] EMPTY_OBJECT_ARRAY
protected final Object[] ARRAY_WITH_SINGLE_ASPECT_CONTEXT
protected int m_constructionType
protected final AspectContext m_aspectContext
protected Object m_perJvm
protected final Map m_perClass
protected final Map m_perInstance
protected final Map m_perThread
protected final Map m_adviceInfos
| Constructor Detail |
|---|
public AbstractAspectContainer(AspectContext aspectContext)
aspectContext - the context| Method Detail |
|---|
public AspectContext getContext()
getContext in interface AspectContainerpublic Object aspectOf()
aspectOf in interface AspectContainerpublic Object aspectOf(Class klass)
aspectOf in interface AspectContainerklass -
public Object aspectOf(Object instance)
aspectOf in interface AspectContainerinstance -
public Object aspectOf(Thread thread)
aspectOf in interface AspectContainerthread - the thread for the aspect
protected abstract Object createAspect()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||