| java.lang.Object com.tc.aspectwerkz.aspect.management.Aspects
Aspects | public class Aspects (Code) | | Manages the aspects.
Each Aspect qName has a generated factory (one factory per aspect qName) on which we invoke reflectively
the aspectOf and alike. Those are user exposed method. The weaved code does not use those.
author: Jonas Bonér author: Alexandre Vasseur |
Method Summary | |
public static Object | aspect$Of(String qName, String aspectClassName, ClassLoader loader) | public static Object | aspect$Of(String qName, String aspectClassName, Class perClass) | public static Object | aspect$Of(String qName, String aspectClassName, Object perInstance) | public static Object | aspectOf(String qName) Returns the singleton aspect instance for the aspect with the given qualified name. | public static Object | aspectOf(Class aspectClass) Returns the singleton aspect instance for the given aspect class. | public static Object | aspectOf(ClassLoader visibleFrom, String qName) Returns the singleton aspect instance for given aspect qName, with visibility from the given class loader
Parameters: visibleFrom - the class loader from where aspect is visible, likely to be the class loader of theadvised classes, or the one where the system hosting the aspect is deployed. | public static Object | aspectOf(Class aspectClass, Class targetClass) | public static Object | aspectOf(String qName, Class targetClass) | public static Object | aspectOf(Class aspectClass, Object targetInstance) | public static Object | aspectOf(String qName, Object targetInstance) | public static boolean | hasAspect(String qName, Object targetInstance) |
aspectOf | public static Object aspectOf(String qName)(Code) | | Returns the singleton aspect instance for the aspect with the given qualified name.
The aspect is looked up from the thread context classloader.
Parameters: qName - the qualified name of the aspect the singleton aspect instance |
aspectOf | public static Object aspectOf(Class aspectClass)(Code) | | Returns the singleton aspect instance for the given aspect class.
Consider using aspectOf(visibleFrom, qName) if the aspect is used more than once
or if it is used in a class loader which is child of its own classloader.
Parameters: aspectClass - the class of the aspect the singleton aspect instance |
aspectOf | public static Object aspectOf(ClassLoader visibleFrom, String qName)(Code) | | Returns the singleton aspect instance for given aspect qName, with visibility from the given class loader
Parameters: visibleFrom - the class loader from where aspect is visible, likely to be the class loader of theadvised classes, or the one where the system hosting the aspect is deployed. the singleton aspect instance |
aspectOf | public static Object aspectOf(Class aspectClass, Class targetClass)(Code) | | Returns the per class aspect attached to targetClass
Consider using aspectOf(qName, targetClass) if the aspect is used more than once
Parameters: aspectClass - the name of the aspect Parameters: targetClass - the target class the per class aspect instance |
aspectOf | public static Object aspectOf(String qName, Class targetClass)(Code) | | Returns the per class aspect instance for the aspect with the given qualified name for targetClass
Parameters: qName - the qualified name of the aspect Parameters: targetClass - the target class the per class aspect instance |
aspectOf | public static Object aspectOf(Class aspectClass, Object targetInstance)(Code) | | Returns the per instance aspect attached to targetInstance
Consider using aspectOf(qName, targetInstance) if the aspect is used more than once
Parameters: aspectClass - the name of the aspect Parameters: targetInstance - the target instance the per class aspect instance |
aspectOf | public static Object aspectOf(String qName, Object targetInstance)(Code) | | Returns the per instance aspect attached to targetInstance
Parameters: qName - the qualified name of the aspect Parameters: targetInstance - the target instance the per class aspect instance |
hasAspect | public static boolean hasAspect(String qName, Object targetInstance)(Code) | | Test if there is a per instance aspect (per instance, perthis/target) attached to targetInstance
Parameters: qName - Parameters: targetInstance - |
|
|