Package org.aspectj.weaver.loadtime
Klasse Aj
java.lang.Object
org.aspectj.weaver.loadtime.Aj
- Alle implementierten Schnittstellen:
ClassPreProcessor
Adapter between the generic class pre processor interface and the AspectJ weaver Load time weaving consistency relies on
Bcel.setRepository
- Autor:
- Alexandre Vasseur (alex AT gnilux DOT com)
-
Feldübersicht
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic void
checkQ()
Process the reference queue that contains stale AdaptorKeys - the keys are put on the queue when their classloader referent is garbage collected and so the associated adaptor (weaver) should be removed from the mapvoid
flushGeneratedClasses
(ClassLoader loader) boolean
generatedClassesExist
(ClassLoader loader) Check to see if any classes have been generated for a particular classes loader.static int
getNamespace
(ClassLoader loader) Returns a namespace based on the contest of the aspects availablevoid
Initializationvoid
prepareForRedefinition
(ClassLoader loader, String className) byte[]
preProcess
(String className, byte[] bytes, ClassLoader loader, ProtectionDomain protectionDomain) static int
removeStaleAdaptors
(boolean displayProgress) The reference queue is only processed when a request is made for a weaver adaptor.
-
Felddetails
-
laCache
-
loadersToSkip
-
-
Konstruktordetails
-
Aj
public Aj() -
Aj
-
-
Methodendetails
-
initialize
public void initialize()Initialization- Angegeben von:
initialize
in SchnittstelleClassPreProcessor
-
preProcess
public byte[] preProcess(String className, byte[] bytes, ClassLoader loader, ProtectionDomain protectionDomain) - Angegeben von:
preProcess
in SchnittstelleClassPreProcessor
-
removeStaleAdaptors
public static int removeStaleAdaptors(boolean displayProgress) The reference queue is only processed when a request is made for a weaver adaptor. This means there can be one or two stale weavers left around. If the user knows they have finished all their weaving, they might wish to call removeStaleAdaptors which will process anything left on the reference queue containing adaptorKeys for garbage collected classloaders.- Parameter:
displayProgress
- produce System.err info on the tidying up process- Gibt zurück:
- number of stale weavers removed
-
getActiveAdaptorCount
public static int getActiveAdaptorCount()- Gibt zurück:
- the number of entries still in the weavingAdaptors map
-
checkQ
public static void checkQ()Process the reference queue that contains stale AdaptorKeys - the keys are put on the queue when their classloader referent is garbage collected and so the associated adaptor (weaver) should be removed from the map -
getNamespace
Returns a namespace based on the contest of the aspects available -
generatedClassesExist
Check to see if any classes have been generated for a particular classes loader. Calls ClassLoaderWeavingAdaptor.generatedClassesExist()- Parameter:
loader
- the class cloder- Gibt zurück:
- true if classes have been generated.
-
flushGeneratedClasses
-
prepareForRedefinition
- Angegeben von:
prepareForRedefinition
in SchnittstelleClassPreProcessor
-