org.glassfish.api.deployment
Interface InstrumentableClassLoader


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.


Method Summary
 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 transfomer should be called for each class loading event.

Parameters:
transformer - new class file transformer to do byte code enhancement.


Submit a bug or feature

Copyright © 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.

Generated on 8-December-2009 03:52