| Modifier and Type | Class and Description |
|---|---|
| private static class | Aj.AdaptorKey
An AdaptorKey is a WeakReference wrapping a classloader reference that will enqueue to a specified queue when the classloader is GC'd. |
| pack-priv static class | |
| pack-priv static class | Aj.WeaverContainer
Cache of weaver There is one weaver per classloader |
| Modifier and Type | Field and Description |
|---|---|
| private static ReferenceQueue | adaptorQueue
References are added to this queue when their associated classloader is removed, and once on here that indicates that we should tidy up the adaptor map and remove the adaptor (weaver) from the map we are maintaining from adaptorkey > adaptor (weaver) |
| private static final String | |
| private static final String | |
| public static SimpleCache | |
| public static List | |
| private static Trace | |
| private IWeavingContext |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| 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 |
| public void | |
| public boolean | Returns: true if classes have been generated.the class cloder loader)Check to see if any classes have been generated for a particular classes loader. |
| public static int | |
| public String | |
| public void | |
| public void | prepareForRedefinition(ClassLoader loader, String className)
Implements org. |
| public byte[] | preProcess(String className, byte[] bytes, ClassLoader loader, ProtectionDomain protectionDomain)
Implements org. |
| public static int | Returns: number of stale weavers removedproduce System.err info on the tidying up process displayProgress)The reference queue is only processed when a request is made for a weaver adaptor. |
| adaptorQueue | back to summary |
|---|---|
| private static ReferenceQueue<ClassLoader> adaptorQueue References are added to this queue when their associated classloader is removed, and once on here that indicates that we should tidy up the adaptor map and remove the adaptor (weaver) from the map we are maintaining from adaptorkey > adaptor (weaver) | |
| deleLoader | back to summary |
|---|---|
| private static final String deleLoader | |
| deleLoader2 | back to summary |
|---|---|
| private static final String deleLoader2 | |
| laCache | back to summary |
|---|---|
| public static SimpleCache laCache | |
| loadersToSkip | back to summary |
|---|---|
| public static List<String> loadersToSkip | |
| trace | back to summary |
|---|---|
| private static Trace trace | |
| weavingContext | back to summary |
|---|---|
| private IWeavingContext weavingContext | |
| Aj | back to summary |
|---|---|
| public Aj() | |
| Aj | back to summary |
|---|---|
| public Aj(IWeavingContext context) | |
| checkQ | back to summary |
|---|---|
| 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 | |
| flushGeneratedClasses | back to summary |
|---|---|
| public void flushGeneratedClasses(ClassLoader loader) | |
| generatedClassesExist | back to summary |
|---|---|
| public boolean generatedClassesExist(ClassLoader loader) Check to see if any classes have been generated for a particular classes loader. Calls ClassLoaderWeavingAdaptor.generatedClassesExist()
| |
| getActiveAdaptorCount | back to summary |
|---|---|
public static int getActiveAdaptorCount()
| |
| getNamespace | back to summary |
|---|---|
| public String getNamespace(ClassLoader loader) Returns a namespace based on the contest of the aspects available | |
| initialize | back to summary |
|---|---|
| public void initialize() Implements org. Initialization
| |
| prepareForRedefinition | back to summary |
|---|---|
| public void prepareForRedefinition(ClassLoader loader, String className) Implements org.
| |
| preProcess | back to summary |
|---|---|
| public byte[] preProcess(String className, byte[] bytes, ClassLoader loader, ProtectionDomain protectionDomain) Implements org.
| |
| removeStaleAdaptors | back to summary |
|---|---|
| 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.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final String | |
| private final int | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public ClassLoader | |
| public int |
| hashValue | back to summary |
|---|---|
| private final int hashValue | |
| loaderClass | back to summary |
|---|---|
| private final String loaderClass | |
| loaderHashCode | back to summary |
|---|---|
| private final int loaderHashCode | |
| sysHashCode | back to summary |
|---|---|
| private final int sysHashCode | |
| AdaptorKey | back to summary |
|---|---|
| public AdaptorKey(ClassLoader loader) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getClassLoader | back to summary |
|---|---|
| public ClassLoader getClassLoader() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private final ClassLoaderWeavingAdaptor |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ClassLoaderWeavingAdaptor | |
| private void |
| isInitialized | back to summary |
|---|---|
| private boolean isInitialized | |
| weavingAdaptor | back to summary |
|---|---|
| private final ClassLoaderWeavingAdaptor weavingAdaptor | |
| ExplicitlyInitializedClassLoaderWeavingAdaptor | back to summary |
|---|---|
| public ExplicitlyInitializedClassLoaderWeavingAdaptor(ClassLoaderWeavingAdaptor weavingAdaptor) | |
| getWeavingAdaptor | back to summary |
|---|---|
| public ClassLoaderWeavingAdaptor getWeavingAdaptor(ClassLoader loader, IWeavingContext weavingContext) | |
| initialize | back to summary |
|---|---|
| private void initialize(ClassLoader loader, IWeavingContext weavingContext) | |
| Modifier and Type | Field and Description |
|---|---|
| private static final ClassLoader | |
| private static Aj. | |
| pack-priv static final Map |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static WeavingAdaptor |
| myClassLoader | back to summary |
|---|---|
| private static final ClassLoader myClassLoader | |
| myClassLoaderAdaptor | back to summary |
|---|---|
| private static Aj. | |
| weavingAdaptors | back to summary |
|---|---|
| pack-priv static final Map<Aj. | |
| WeaverContainer | back to summary |
|---|---|
| pack-priv WeaverContainer() | |
| getWeaver | back to summary |
|---|---|
| pack-priv static WeavingAdaptor getWeaver(ClassLoader loader, IWeavingContext weavingContext) | |