- java.lang.Object
-
- org.jboss.modules.JLIClassTransformer
-
- All Implemented Interfaces:
ClassTransformer
public final class JLIClassTransformer extends Object implements ClassTransformer
A wrapper around aClassFileTransformer.
-
-
Field Summary
-
Fields inherited from interface org.jboss.modules.ClassTransformer
IDENTITY
-
-
Constructor Summary
Constructors Constructor Description JLIClassTransformer(ClassFileTransformer transformer)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBuffertransform(ClassLoader loader, String className, ProtectionDomain protectionDomain, ByteBuffer classBytes)Transform the bytes of a class.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.modules.ClassTransformer
andThen
-
-
-
-
Constructor Detail
-
JLIClassTransformer
public JLIClassTransformer(ClassFileTransformer transformer)
Construct a new instance.- Parameters:
transformer- the delegate transformer (must not benull)
-
-
Method Detail
-
transform
public ByteBuffer transform(ClassLoader loader, String className, ProtectionDomain protectionDomain, ByteBuffer classBytes) throws IllegalArgumentException
Description copied from interface:ClassTransformerTransform the bytes of a class. The position and limit of both the passed-in and returned buffers must mark the start and end of the class bytes.- Specified by:
transformin interfaceClassTransformer- Parameters:
loader- the class loader of the class being transformedclassName- the internal name of the class being transformed (notnull)protectionDomain- the protection domain of the class, if anyclassBytes- the class bytes being transformed (notnull; may be a direct or heap buffer)- Returns:
- the transformation result (may be a direct or heap buffer)
- Throws:
IllegalArgumentException- if the class could not be transformed for some reason
-
-