addTransformer, org.springframework.core.OverridingClassLoader
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final List | |
| public static final String[] | DEFAULT_EXCLUDED_PACKAGES
Packages that are excluded by default. |
| private final ClassLoader |
| Access | Constructor and Description |
|---|---|
| public | ShadowingClassLoader(ClassLoader
the ClassLoader to decorate enclosingClassLoader)Create a new ShadowingClassLoader, decorating the given ClassLoader,
applying |
| public | ShadowingClassLoader(ClassLoader
the ClassLoader to decorate enclosingClassLoader, boolean whether to apply defaultExcludes)DEFAULT_EXCLUDED_PACKAGESCreate a new ShadowingClassLoader, decorating the given ClassLoader. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addTransformer(ClassFileTransformer
the ClassFileTransformer transformer)Add the given ClassFileTransformer to the list of transformers that this ClassLoader will apply. |
| private byte[] | |
| public void | copyTransformers(ShadowingClassLoader
the ClassLoader to copy from other)Copy all ClassFileTransformers from the given ClassLoader to the list of transformers that this ClassLoader will apply. |
| private Class | |
| public URL | getResource(String
The resource name name)Overrides java. Finds the resource with the given name. |
| public InputStream | getResourceAsStream(String
The resource name name)Overrides java. Returns an input stream for reading the specified resource. |
| public Enumeration | getResources(String
The resource name name)Overrides java. Finds all the resources with the given name. |
| protected boolean | Returns: whether the specified class is eligiblethe class name to check className)Determine whether the specified class is eligible for shadowing by this class loader. |
| public Class | loadClass(String
The binary name of the class name)Overrides java. Loads the class with the specified binary name. |
| private boolean | Returns: whether the specified class should be shadowedthe name of the class className)Determine whether the given class should be excluded from shadowing. |
| classCache | back to summary |
|---|---|
| private final Map<String, Class<?>> classCache | |
| classFileTransformers | back to summary |
|---|---|
| private final List<ClassFileTransformer> classFileTransformers | |
| DEFAULT_EXCLUDED_PACKAGES | back to summary |
|---|---|
| public static final String[] DEFAULT_EXCLUDED_PACKAGES Packages that are excluded by default. | |
| enclosingClassLoader | back to summary |
|---|---|
| private final ClassLoader enclosingClassLoader | |
| ShadowingClassLoader | back to summary |
|---|---|
| public ShadowingClassLoader(ClassLoader enclosingClassLoader) Create a new ShadowingClassLoader, decorating the given ClassLoader,
applying
| |
| ShadowingClassLoader | back to summary |
|---|---|
| public ShadowingClassLoader(ClassLoader enclosingClassLoader, boolean defaultExcludes) Create a new ShadowingClassLoader, decorating the given ClassLoader.
| |
| addTransformer | back to summary |
|---|---|
| public void addTransformer(ClassFileTransformer transformer) Add the given ClassFileTransformer to the list of transformers that this ClassLoader will apply.
| |
| applyTransformers | back to summary |
|---|---|
| private byte[] applyTransformers(String name, byte[] bytes) | |
| copyTransformers | back to summary |
|---|---|
| public void copyTransformers(ShadowingClassLoader other) Copy all ClassFileTransformers from the given ClassLoader to the list of transformers that this ClassLoader will apply.
| |
| doLoadClass | back to summary |
|---|---|
| private Class | |
| getResource | back to summary |
|---|---|
| public URL getResource(String name) Overrides java. Doc from java. Finds the resource with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code. The name of a resource is a ' Resources in named modules are subject to the encapsulation rules
specified by
| |
| getResourceAsStream | back to summary |
|---|---|
| public InputStream getResourceAsStream(String name) Overrides java. Doc from java. Returns an input stream for reading the specified resource. The search order is described in the documentation for Resources in named modules are subject to the encapsulation rules
specified by
| |
| getResources | back to summary |
|---|---|
| public Enumeration Overrides java. Doc from java. Finds all the resources with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code. The name of a resource is a Resources in named modules are subject to the encapsulation rules
specified by
| |
| isEligibleForShadowing | back to summary |
|---|---|
| protected boolean isEligibleForShadowing(String className) Determine whether the specified class is eligible for shadowing by this class loader.
| |
| loadClass | back to summary |
|---|---|
| public Class Overrides java. Doc from java. Loads the class with the specified binary name.
This method searches for classes in the same manner as the
| |
| shouldShadow | back to summary |
|---|---|
| private boolean shouldShadow(String className) Determine whether the given class should be excluded from shadowing.
| |