Top Description Inners Methods
org.easymock.bytebuddy.dynamic.loading

public Interface ClassFilePostProcessor

Known Direct Implementers
org.easymock.bytebuddy.dynamic.loading.ClassFilePostProcessor.NoOp, org.easymock.bytebuddy.dynamic.loading.ClassFilePostProcessor.ForClassFileTransformer
Imports
org.easymock.bytebuddy.build.HashCodeAndEqualsPlugin, org.easymock.bytebuddy.utility.nullability.AlwaysNull, .MaybeNull, java.lang.instrument.ClassFileTransformer, .IllegalClassFormatException, java.security.AllPermission, .Permission, .PermissionCollection, .ProtectionDomain, java.util.Collections, .Enumeration

A post processor for class files.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
ClassFilePostProcessor.ForClassFileTransformer

A class file post processor that delegates to an ClassFileTransformer.

public static enum
ClassFilePostProcessor.NoOp

A non-operation class file post processor.

Method Summary

Modifier and TypeMethod and Description
public byte[]

Returns:

The class file to use.
transform
(ClassLoader
The class loader which is used to load a class or null if loaded by the bootstrap loader.
classLoader
,
String
The binary name of the transformed class.
name
,
ProtectionDomain
The protection domain of the transformed class or null if no protection domain is provided.
protectionDomain
,
byte[]
The binary representation of the class file.
binaryRepresentation
)

Transforms a class file for a given class.

Method Detail

transformback to summary
public byte[] transform(ClassLoader classLoader, String name, ProtectionDomain protectionDomain, byte[] binaryRepresentation)

Transforms a class file for a given class.

Parameters
classLoader:ClassLoader

The class loader which is used to load a class or null if loaded by the bootstrap loader.

name:String

The binary name of the transformed class.

protectionDomain:ProtectionDomain

The protection domain of the transformed class or null if no protection domain is provided.

binaryRepresentation:byte[]

The binary representation of the class file.

Returns:byte[]

The class file to use.

org.easymock.bytebuddy.dynamic.loading back to summary

public Class ClassFilePostProcessor.ForClassFileTransformer

extends Object
implements ClassFilePostProcessor
Class Inheritance
  • java.lang.Object
  • org.easymock.bytebuddy.dynamic.loading.ClassFilePostProcessor.ForClassFileTransformer
All Implemented Interfaces
org.easymock.bytebuddy.dynamic.loading.ClassFilePostProcessor
Annotations
@Enhance

A class file post processor that delegates to an ClassFileTransformer.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
ClassFilePostProcessor.ForClassFileTransformer.AllPermissionsCollection

A permission collection that implies all permissions.

Field Summary

Modifier and TypeField and Description
protected static final ProtectionDomain
ALL_PRIVILEGES

A protection domain that represents all permissions.

private final ClassFileTransformer
classFileTransformer

The class file transformer to delegate to.

private static final Class<?>
UNLOADED_TYPE

Indicates that a class is not currently loaded.

Constructor Summary

AccessConstructor and Description
public
ForClassFileTransformer(ClassFileTransformer
The class file transformer to delegate to.
classFileTransformer
)

Creates a new class file post processor for a class file transformer.

Method Summary

Modifier and TypeMethod and Description
public byte[]
transform(ClassLoader
The class loader which is used to load a class or null if loaded by the bootstrap loader.
classLoader
,
String
The binary name of the transformed class.
name
,
ProtectionDomain
The protection domain of the transformed class or null if no protection domain is provided.
protectionDomain
,
byte[]
The binary representation of the class file.
binaryRepresentation
)

Implements org.easymock.bytebuddy.dynamic.loading.ClassFilePostProcessor.transform.

Transforms a class file for a given class.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALL_PRIVILEGESback to summary
protected static final ProtectionDomain ALL_PRIVILEGES

A protection domain that represents all permissions.

classFileTransformerback to summary
private final ClassFileTransformer classFileTransformer

The class file transformer to delegate to.

UNLOADED_TYPEback to summary
private static final Class<?> UNLOADED_TYPE

Indicates that a class is not currently loaded.

Annotations
@AlwaysNull

Constructor Detail

ForClassFileTransformerback to summary
public ForClassFileTransformer(ClassFileTransformer classFileTransformer)

Creates a new class file post processor for a class file transformer.

Parameters
classFileTransformer:ClassFileTransformer

The class file transformer to delegate to.

Method Detail

transformback to summary
public byte[] transform(ClassLoader classLoader, String name, ProtectionDomain protectionDomain, byte[] binaryRepresentation)

Implements org.easymock.bytebuddy.dynamic.loading.ClassFilePostProcessor.transform.

Doc from org.easymock.bytebuddy.dynamic.loading.ClassFilePostProcessor.transform.

Transforms a class file for a given class.

Parameters
classLoader:ClassLoader

The class loader which is used to load a class or null if loaded by the bootstrap loader.

name:String

The binary name of the transformed class.

protectionDomain:ProtectionDomain

The protection domain of the transformed class or null if no protection domain is provided.

binaryRepresentation:byte[]

The binary representation of the class file.

Returns:byte[]

The class file to use.

org.easymock.bytebuddy.dynamic.loading back to summary

protected Class ClassFilePostProcessor.ForClassFileTransformer.AllPermissionsCollection

extends PermissionCollection
Class Inheritance
Annotations
@Enhance

A permission collection that implies all permissions.

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
add(Permission
the Permission object to add.
permission
)

Implements abstract java.security.PermissionCollection.add.

Adds a permission object to the current collection of permission objects.
public Enumeration<Permission>
elements()

Implements abstract java.security.PermissionCollection.elements.

Returns an enumeration of all the Permission objects in the collection.
public boolean
implies(Permission
the Permission object to compare.
permission
)

Implements abstract java.security.PermissionCollection.implies.

Checks to see if the specified permission is implied by the collection of Permission objects held in this PermissionCollection.
Inherited from java.security.PermissionCollection:
elementsAsStreamisReadOnlysetReadOnlytoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.security.PermissionCollection.serialVersionUID.

The serial version UID.

Constructor Detail

AllPermissionsCollectionback to summary
protected AllPermissionsCollection()

Method Detail

addback to summary
public void add(Permission permission)

Implements abstract java.security.PermissionCollection.add.

Doc from java.security.PermissionCollection.add.

Adds a permission object to the current collection of permission objects.

Parameters
permission:Permission

the Permission object to add.

Annotations
@Override
elementsback to summary
public Enumeration<Permission> elements()

Implements abstract java.security.PermissionCollection.elements.

Doc from java.security.PermissionCollection.elements.

Returns an enumeration of all the Permission objects in the collection.

Returns:Enumeration<Permission>

an enumeration of all the Permissions.

Annotations
@Override
impliesback to summary
public boolean implies(Permission permission)

Implements abstract java.security.PermissionCollection.implies.

Doc from java.security.PermissionCollection.implies.

Checks to see if the specified permission is implied by the collection of Permission objects held in this PermissionCollection.

Parameters
permission:Permission

the Permission object to compare.

Returns:boolean

true if "permission" is implied by the permissions in the collection, false if not.

Annotations
@Override
org.easymock.bytebuddy.dynamic.loading back to summary

public final Enum ClassFilePostProcessor.NoOp

extends Enum<ClassFilePostProcessor.NoOp>
implements ClassFilePostProcessor
Class Inheritance
All Implemented Interfaces
org.easymock.bytebuddy.dynamic.loading.ClassFilePostProcessor

A non-operation class file post processor.

Field Summary

Modifier and TypeField and Description
public static final ClassFilePostProcessor.NoOp
INSTANCE

The singleton instance.

Constructor Summary

AccessConstructor and Description
private
NoOp()

Method Summary

Modifier and TypeMethod and Description
public byte[]
transform(ClassLoader
The class loader which is used to load a class or null if loaded by the bootstrap loader.
classLoader
,
String
The binary name of the transformed class.
name
,
ProtectionDomain
The protection domain of the transformed class or null if no protection domain is provided.
protectionDomain
,
byte[]
The binary representation of the class file.
binaryRepresentation
)

Implements org.easymock.bytebuddy.dynamic.loading.ClassFilePostProcessor.transform.

Transforms a class file for a given class.
public static ClassFilePostProcessor.NoOp
public static ClassFilePostProcessor.NoOp[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

INSTANCEback to summary
public static final ClassFilePostProcessor.NoOp INSTANCE

The singleton instance.

Constructor Detail

NoOpback to summary
private NoOp()

Method Detail

transformback to summary
public byte[] transform(ClassLoader classLoader, String name, ProtectionDomain protectionDomain, byte[] binaryRepresentation)

Implements org.easymock.bytebuddy.dynamic.loading.ClassFilePostProcessor.transform.

Doc from org.easymock.bytebuddy.dynamic.loading.ClassFilePostProcessor.transform.

Transforms a class file for a given class.

Parameters
classLoader:ClassLoader

The class loader which is used to load a class or null if loaded by the bootstrap loader.

name:String

The binary name of the transformed class.

protectionDomain:ProtectionDomain

The protection domain of the transformed class or null if no protection domain is provided.

binaryRepresentation:byte[]

The binary representation of the class file.

Returns:byte[]

The class file to use.

valueOfback to summary
public static ClassFilePostProcessor.NoOp valueOf(String name)
valuesback to summary
public static ClassFilePostProcessor.NoOp[] values()