Package org.aspectj.lang
Class Aspects14
- java.lang.Object
-
- org.aspectj.lang.Aspects14
-
public class Aspects14 extends java.lang.ObjectFor users working on a level of Java prior to Java5, Aspects14 handles generic aspectOf methods when they are not available in the aspects but added later on through load time weaving. Users on Java5 should use the class Aspects instead. Aspects14.aspectOf(..) is doing reflective calls to the aspect aspectOf, so for better performance consider using ajc compilation of the aspects and using them as a binary dependancies in your project.
-
-
Constructor Summary
Constructors Constructor Description Aspects14()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.ObjectaspectOf(java.lang.Class aspectClass)Returns the singleton aspect or the percflow / percflowbelow associated with the current threadstatic java.lang.ObjectaspectOf(java.lang.Class aspectClass, java.lang.Class perTypeWithin)Returns the pertypewithin aspectstatic java.lang.ObjectaspectOf(java.lang.Class aspectClass, java.lang.Object perObject)Returns the perthis / pertarget aspectstatic booleanhasAspect(java.lang.Class aspectClass)Returns true if singleton aspect or percflow / percflowbelow aspect is boundstatic booleanhasAspect(java.lang.Class aspectClass, java.lang.Class perTypeWithin)Returns true if the pertypewithin aspect is boundstatic booleanhasAspect(java.lang.Class aspectClass, java.lang.Object perObject)Returns true if the perthis / pertarget aspect is bound
-
-
-
Method Detail
-
aspectOf
public static java.lang.Object aspectOf(java.lang.Class aspectClass) throws NoAspectBoundExceptionReturns the singleton aspect or the percflow / percflowbelow associated with the current thread- Parameters:
aspectClass-- Returns:
- Throws:
NoAspectBoundException- if no such aspect
-
aspectOf
public static java.lang.Object aspectOf(java.lang.Class aspectClass, java.lang.Object perObject) throws NoAspectBoundExceptionReturns the perthis / pertarget aspect- Parameters:
aspectClass-perObject-- Returns:
- Throws:
NoAspectBoundException- if no such aspect, or no aspect bound
-
aspectOf
public static java.lang.Object aspectOf(java.lang.Class aspectClass, java.lang.Class perTypeWithin) throws NoAspectBoundExceptionReturns the pertypewithin aspect- Parameters:
aspectClass-perTypeWithin- class- Returns:
- Throws:
NoAspectBoundException- if no such aspect, or no aspect bound
-
hasAspect
public static boolean hasAspect(java.lang.Class aspectClass) throws NoAspectBoundExceptionReturns true if singleton aspect or percflow / percflowbelow aspect is bound- Parameters:
aspectClass-- Returns:
- Throws:
NoAspectBoundException- if not bound
-
hasAspect
public static boolean hasAspect(java.lang.Class aspectClass, java.lang.Object perObject) throws NoAspectBoundExceptionReturns true if the perthis / pertarget aspect is bound- Parameters:
aspectClass-perObject-- Returns:
- Throws:
NoAspectBoundException- if not bound
-
hasAspect
public static boolean hasAspect(java.lang.Class aspectClass, java.lang.Class perTypeWithin) throws NoAspectBoundExceptionReturns true if the pertypewithin aspect is bound- Parameters:
aspectClass-perTypeWithin- class- Returns:
- Throws:
NoAspectBoundException- if not bound
-
-