|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.aspectwerkz.aspect.management.Aspects
public class Aspects
Manages the aspects, registry for the aspect containers (one container per aspect type).
Field Summary | |
---|---|
static String |
DEFAULT_ASPECT_CONTAINER
The default aspect container class. |
Method Summary | |
---|---|
static Object |
aspect$Of(ClassLoader loader,
String qName,
String containerClassName)
|
static Object |
aspect$Of(String qName,
String containerClassName,
Class perClass)
|
static Object |
aspect$Of(String qName,
String containerClassName,
Object perInstance)
|
static Object |
aspectOf(Class aspectClass)
Returns the singleton aspect instance for the given aspect class. |
static Object |
aspectOf(Class aspectClass,
Class targetClass)
Returns the per class aspect attached to targetClass Consider using aspectOf(qName, targetClass) if the aspect is used more than once |
static Object |
aspectOf(ClassLoader visibleFrom,
String qName)
Returns the singleton aspect instance for given aspect qName, with visibility from the given class loader |
static Object |
aspectOf(Class aspectClass,
Object targetInstance)
Returns the per instance aspect attached to targetInstance Consider using aspectOf(qName, targetInstance) if the aspect is used more than once |
static Object |
aspectOf(String qName)
Returns the singleton aspect instance for the aspect with the given qualified name. |
static Object |
aspectOf(String qName,
Class targetClass)
Returns the per class aspect instance for the aspect with the given qualified name for targetClass |
static Object |
aspectOf(String qName,
Object targetInstance)
Returns the per instance aspect attached to targetInstance |
static String[] |
getAspectQNameContainerClassName(ClassLoader visibleFrom,
String qName)
Returns the aspect container class for the given aspect class qName. |
static AspectContainer |
getContainerQNamed(ClassLoader visibleFrom,
Class containerClass,
String qName)
Returns or create the aspect container for the given container class with the given aspect qualified name We keep a weak key for the containerClass, and we then keep a list of container instance based on a composite key based on the tuple {visibleFromClassLoader.hashCode, aspectQName}, so that when hot deploying a web app, the aspects gets tied to the web app class loader even when the container class is higher up (f.e. in aw.jar) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_ASPECT_CONTAINER
Method Detail |
---|
public static String[] getAspectQNameContainerClassName(ClassLoader visibleFrom, String qName)
visibleFrom
- class loader to look fromqName
-
public static AspectContainer getContainerQNamed(ClassLoader visibleFrom, Class containerClass, String qName)
visibleFrom
- class loader hosting the advised class ie from where all is visiblecontainerClass
- qName
-
public static Object aspectOf(String qName)
qName
- the qualified name of the aspect
public static Object aspectOf(Class aspectClass)
aspectClass
- the class of the aspect
public static Object aspectOf(ClassLoader visibleFrom, String qName)
visibleFrom
- the class loader from where aspect is visible, likely to be the class loader of the
advised classes, or the one where the system hosting the aspect is deployed.
public static Object aspectOf(Class aspectClass, Class targetClass)
aspectClass
- the name of the aspecttargetClass
- the target class
public static Object aspectOf(String qName, Class targetClass)
qName
- the qualified name of the aspecttargetClass
- the target class
public static Object aspectOf(Class aspectClass, Object targetInstance)
aspectClass
- the name of the aspecttargetInstance
- the target instance
public static Object aspectOf(String qName, Object targetInstance)
qName
- the qualified name of the aspecttargetInstance
- the target instance
public static Object aspect$Of(ClassLoader loader, String qName, String containerClassName)
public static Object aspect$Of(String qName, String containerClassName, Class perClass)
public static Object aspect$Of(String qName, String containerClassName, Object perInstance)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |