| Modifier and Type | Field and Description |
|---|---|
| public static final ClassTransformer | IDENTITY
The identity transformation, which does not modify the class bytes at all. |
| Modifier and Type | Method and Description |
|---|---|
| public static ClassTransformer | Returns: the new transformer (notnull)the transformer collection (must not be transformers)null)Get a new transformer which applies all the transformations in the given collection. |
| public default ClassTransformer | Returns: the new transformer (notnull)the other transformation (must not be other)null)Get a new transformer which applies this transformation followed by another transformation. |
| public ByteBuffer | Returns: the transformation result (may be a direct or heap buffer)the class loader of the class being transformed loader, String the internal name of the class being transformed (not className, ProtectionDomain null)the protection domain of the class, if any protectionDomain, ByteBuffer the class bytes being transformed (not classBytes)null; may be a direct or heap buffer)Transform the bytes of a class. |
| IDENTITY | back to summary |
|---|---|
| public static final ClassTransformer IDENTITY The identity transformation, which does not modify the class bytes at all. | |
| allOf | back to summary |
|---|---|
| public static ClassTransformer allOf(Collection<? extends ClassTransformer> transformers) Get a new transformer which applies all the transformations in the given collection. The collection should either be immutable or safe for concurrent iteration. A synchronized collection is insufficiently thread-safe.
| |
| andThen | back to summary |
|---|---|
| public default ClassTransformer andThen(ClassTransformer other) Get a new transformer which applies this transformation followed by another transformation.
| |
| transform | back to summary |
|---|---|
| public ByteBuffer transform(ClassLoader loader, String className, ProtectionDomain protectionDomain, ByteBuffer classBytes) throws IllegalArgumentException Transform 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.
| |