Package org.aspectj.lang
Klasse Aspects14
java.lang.Object
org.aspectj.lang.Aspects14
For 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.
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic Object
Returns the singleton aspect or the percflow / percflowbelow associated with the current threadstatic Object
Returns the pertypewithin aspectstatic Object
Returns the perthis / pertarget aspectstatic boolean
Returns true if singleton aspect or percflow / percflowbelow aspect is boundstatic boolean
Returns true if the pertypewithin aspect is boundstatic boolean
Returns true if the perthis / pertarget aspect is bound
-
Konstruktordetails
-
Aspects14
public Aspects14()
-
-
Methodendetails
-
aspectOf
Returns the singleton aspect or the percflow / percflowbelow associated with the current thread- Parameter:
aspectClass
- aspect class for which to discover the aspect instance- Gibt zurück:
- an aspect instance
- Löst aus:
NoAspectBoundException
- if no such aspect
-
aspectOf
Returns the perthis / pertarget aspect- Parameter:
aspectClass
- aspect class for which to discover the aspect instanceperObject
- object for which to discover the aspect instance- Gibt zurück:
- an aspect instance
- Löst aus:
NoAspectBoundException
- if no such aspect, or no aspect bound
-
aspectOf
Returns the pertypewithin aspect- Parameter:
aspectClass
- aspect class for which to discover the aspect instanceperTypeWithin
- class- Gibt zurück:
- the aspect instance
- Löst aus:
NoAspectBoundException
- if no such aspect, or no aspect bound
-
hasAspect
Returns true if singleton aspect or percflow / percflowbelow aspect is bound- Parameter:
aspectClass
- aspect class for which to check the aspect instance- Gibt zurück:
- true if an aspect instance is bound
- Löst aus:
NoAspectBoundException
- if not bound
-
hasAspect
Returns true if the perthis / pertarget aspect is bound- Parameter:
aspectClass
- aspect class for which to check the aspect instanceperObject
- the this/target for which to check for an aspect- Gibt zurück:
- true if aspect instance exists for the class/object combination
- Löst aus:
NoAspectBoundException
- if not bound
-
hasAspect
public static boolean hasAspect(Class aspectClass, Class perTypeWithin) throws NoAspectBoundException Returns true if the pertypewithin aspect is bound- Parameter:
aspectClass
- aspect class for which to check the aspect instanceperTypeWithin
- class- Gibt zurück:
- true if aspect instance exists for this aspect class/pertypewithin class combination
- Löst aus:
NoAspectBoundException
- if not bound
-