Package org.glassfish.api.deployment
Interface InstrumentableClassLoader
-
- All Known Implementing Classes:
ASURLClassLoader
,ConnectorClassFinder
,ConnectorClassLoader
,EarClassLoader
,EarLibClassLoader
,WebappClassLoader
public interface InstrumentableClassLoader
Providers of class loaders for GlassFish applications can optionally implements this interface to indicate their class loader is capable of byte code enhancement.- Author:
- Persistence Team
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addTransformer(ClassFileTransformer transformer)
Add a new ClassFileTransformer to this class loader.ClassLoader
copy()
Create and return a temporary loader with the same visibility as this loader.
-
-
-
Method Detail
-
copy
ClassLoader copy()
Create and return a temporary loader with the same visibility as this loader. The temporary loader may be used to load resources or any other application classes for the purposes of introspecting them for annotations. The persistence provider should not maintain any references to the temporary loader, or any objects loaded by it.- Returns:
- A temporary classloader with the same classpath as this loader
-
addTransformer
void addTransformer(ClassFileTransformer transformer)
Add a new ClassFileTransformer to this class loader. This transformer should be called for each class loading event.- Parameters:
transformer
- new class file transformer to do byte code enhancement.
-
-