public class Aspects14 extends Object
| Constructor and Description |
|---|
Aspects14() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
aspectOf(Class aspectClass)
Returns the singleton aspect or the percflow / percflowbelow associated with the current thread
|
static Object |
aspectOf(Class aspectClass,
Class perTypeWithin)
Returns the pertypewithin aspect
|
static Object |
aspectOf(Class aspectClass,
Object perObject)
Returns the perthis / pertarget aspect
|
static boolean |
hasAspect(Class aspectClass)
Returns true if singleton aspect or percflow / percflowbelow aspect is bound
|
static boolean |
hasAspect(Class aspectClass,
Class perTypeWithin)
Returns true if the pertypewithin aspect is bound
|
static boolean |
hasAspect(Class aspectClass,
Object perObject)
Returns true if the perthis / pertarget aspect is bound
|
public static Object aspectOf(Class aspectClass) throws NoAspectBoundException
aspectClass - aspect class for which to discover the aspect instanceNoAspectBoundException - if no such aspectpublic static Object aspectOf(Class aspectClass, Object perObject) throws NoAspectBoundException
aspectClass - aspect class for which to discover the aspect instanceperObject - object for which to discover the aspect instanceNoAspectBoundException - if no such aspect, or no aspect boundpublic static Object aspectOf(Class aspectClass, Class perTypeWithin) throws NoAspectBoundException
aspectClass - aspect class for which to discover the aspect instanceperTypeWithin - classNoAspectBoundException - if no such aspect, or no aspect boundpublic static boolean hasAspect(Class aspectClass) throws NoAspectBoundException
aspectClass - aspect class for which to check the aspect instanceNoAspectBoundException - if not boundpublic static boolean hasAspect(Class aspectClass, Object perObject) throws NoAspectBoundException
aspectClass - aspect class for which to check the aspect instanceperObject - the this/target for which to check for an aspectNoAspectBoundException - if not boundpublic static boolean hasAspect(Class aspectClass, Class perTypeWithin) throws NoAspectBoundException
aspectClass - aspect class for which to check the aspect instanceperTypeWithin - classNoAspectBoundException - if not boundCopyright © 2020. All rights reserved.