| java.lang.Object java.lang.ClassLoader org.springframework.core.OverridingClassLoader
All known Subclasses: org.springframework.instrument.classloading.SimpleInstrumentableClassLoader, org.springframework.instrument.classloading.SimpleThrowawayClassLoader,
OverridingClassLoader | public class OverridingClassLoader extends ClassLoader (Code) | | ClassLoader that does not always delegate to the
parent loader, as normal class loaders do. This enables, for example,
instrumentation to be forced in the overriding ClassLoader, or a
"throwaway" class loading behavior, where selected classes are
temporarily loaded in the overriding ClassLoader, in order to be load
an instrumented version of the class in the parent ClassLoader later on.
author: Rod Johnson author: Juergen Hoeller since: 2.0.1 |
OverridingClassLoader | public OverridingClassLoader(ClassLoader parent)(Code) | | Create a new OverridingClassLoader for the given class loader.
Parameters: parent - the ClassLoader to build an overriding ClassLoader for |
excludeClass | public void excludeClass(String className)(Code) | | Add a class name to exclude from overriding.
Any class name registered here will be handled by
the parent ClassLoader in the usual fashion.
Parameters: className - the class name to exclude |
excludePackage | public void excludePackage(String packageName)(Code) | | Add a package name to exclude from overriding.
Any class whose fully-qualified name starts with the name registered
here will be handled by the parent ClassLoader in the usual fashion.
Parameters: packageName - the package name to exclude |
isEligibleForOverriding | protected boolean isEligibleForOverriding(String className)(Code) | | Determine whether the specified class is eligible for overriding
by this class loader.
The default implementation checks against excluded packages and classes.
Parameters: className - the class name to check whether the specified class is eligible See Also: OverridingClassLoader.excludePackage See Also: OverridingClassLoader.excludeClass |
transformIfNecessary | protected byte[] transformIfNecessary(String name, byte[] bytes)(Code) | | Transformation hook to be implemented by subclasses.
The default implementation simply returns the given bytes as-is.
Parameters: name - the fully-qualified name of the class being transformed Parameters: bytes - the raw bytes of the class the transformed bytes (never null ;same as the input bytes if the transformation produced no changes) |
Methods inherited from java.lang.ClassLoader | public synchronized void clearAssertionStatus()(Code)(Java Doc) final protected Class> defineClass(byte[] b, int off, int len) throws ClassFormatError(Code)(Java Doc) final protected Class> defineClass(String name, byte[] b, int off, int len) throws ClassFormatError(Code)(Java Doc) final protected Class> defineClass(String name, byte[] b, int off, int len, ProtectionDomain protectionDomain) throws ClassFormatError(Code)(Java Doc) final protected Class> defineClass(String name, java.nio.ByteBuffer b, ProtectionDomain protectionDomain) throws ClassFormatError(Code)(Java Doc) protected Package definePackage(String name, String specTitle, String specVersion, String specVendor, String implTitle, String implVersion, String implVendor, URL sealBase) throws IllegalArgumentException(Code)(Java Doc) protected Class> findClass(String name) throws ClassNotFoundException(Code)(Java Doc) protected String findLibrary(String libname)(Code)(Java Doc) final protected Class> findLoadedClass(String name)(Code)(Java Doc) protected URL findResource(String name)(Code)(Java Doc) protected Enumeration<URL> findResources(String name) throws IOException(Code)(Java Doc) final protected Class> findSystemClass(String name) throws ClassNotFoundException(Code)(Java Doc) protected Package getPackage(String name)(Code)(Java Doc) protected Package[] getPackages()(Code)(Java Doc) final public ClassLoader getParent()(Code)(Java Doc) public URL getResource(String name)(Code)(Java Doc) public InputStream getResourceAsStream(String name)(Code)(Java Doc) public Enumeration<URL> getResources(String name) throws IOException(Code)(Java Doc) public static ClassLoader getSystemClassLoader()(Code)(Java Doc) public static URL getSystemResource(String name)(Code)(Java Doc) public static InputStream getSystemResourceAsStream(String name)(Code)(Java Doc) public static Enumeration<URL> getSystemResources(String name) throws IOException(Code)(Java Doc) public Class> loadClass(String name) throws ClassNotFoundException(Code)(Java Doc) protected synchronized Class> loadClass(String name, boolean resolve) throws ClassNotFoundException(Code)(Java Doc) final protected void resolveClass(Class> c)(Code)(Java Doc) public synchronized void setClassAssertionStatus(String className, boolean enabled)(Code)(Java Doc) public synchronized void setDefaultAssertionStatus(boolean enabled)(Code)(Java Doc) public synchronized void setPackageAssertionStatus(String packageName, boolean enabled)(Code)(Java Doc) final protected void setSigners(Class> c, Object[] signers)(Code)(Java Doc)
|
|
|