Top Description Inners Fields Constructors Methods
org.easymock.bytebuddy.implementation.bytecode.constant

public final Enum ClassConstant

extends Enum<ClassConstant>
implements StackManipulation
Class Inheritance
All Implemented Interfaces
org.easymock.bytebuddy.implementation.bytecode.StackManipulation
Imports
org.easymock.bytebuddy.ClassFileVersion, org.easymock.bytebuddy.build.HashCodeAndEqualsPlugin, org.easymock.bytebuddy.description.type.TypeDescription, org.easymock.bytebuddy.implementation.Implementation, org.easymock.bytebuddy.implementation.bytecode.StackManipulation, .StackSize, org.easymock.bytebuddy.jar.asm.MethodVisitor, .Opcodes, .Type

Represents a constant representing any loaded Java java.lang.Class.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
ClassConstant.ForReferenceType

A class constant for a non-primitive java.lang.Class.

Field Summary

Modifier and TypeField and Description
public static final ClassConstant
BOOLEAN

The boolean type.

public static final ClassConstant
BYTE

The byte type.

public static final ClassConstant
CHARACTER

The char type.

private static final String
CLASS_TYPE_INTERNAL_NAME

The descriptor of the java.lang.Class type.

public static final ClassConstant
DOUBLE

The double type.

private final String
fieldOwnerInternalName

The internal name of the type owning the field.

public static final ClassConstant
FLOAT

The float type.

public static final ClassConstant
INTEGER

The int type.

public static final ClassConstant
LONG

The long type.

private static final String
PRIMITIVE_TYPE_FIELD

The field name that stores a reference to the primitive type representation.

public static final ClassConstant
SHORT

The short type.

private static final StackManipulation.Size
SIZE

The size of a java.lang.Class on the operand stack.

public static final ClassConstant
VOID

The void type.

Constructor Summary

AccessConstructor and Description
private
ClassConstant(Class<?>
The primitive type to represent.
type
)

Creates a new class constant for a primitive type.

Method Summary

Modifier and TypeMethod and Description
public StackManipulation.Size
apply(MethodVisitor
The method visitor used to write the method implementation to.
methodVisitor
,
Implementation.Context
The context of the current implementation.
implementationContext
)

Implements org.easymock.bytebuddy.implementation.bytecode.StackManipulation.apply.

Applies the stack manipulation that is described by this instance.
public boolean
isValid()

Implements org.easymock.bytebuddy.implementation.bytecode.StackManipulation.isValid.

Determines if this stack manipulation is valid.
public static StackManipulation

Returns:

The corresponding stack manipulation.
of
(TypeDescription
The type to load onto the operand stack.
typeDescription
)

Returns a stack manipulation that loads a java.lang.Class type onto the operand stack which represents the given type.

public static ClassConstant
public static ClassConstant[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

BOOLEANback to summary
public static final ClassConstant BOOLEAN

The boolean type.

BYTEback to summary
public static final ClassConstant BYTE

The byte type.

CHARACTERback to summary
public static final ClassConstant CHARACTER

The char type.

CLASS_TYPE_INTERNAL_NAMEback to summary
private static final String CLASS_TYPE_INTERNAL_NAME

The descriptor of the java.lang.Class type.

DOUBLEback to summary
public static final ClassConstant DOUBLE

The double type.

fieldOwnerInternalNameback to summary
private final String fieldOwnerInternalName

The internal name of the type owning the field.

FLOATback to summary
public static final ClassConstant FLOAT

The float type.

INTEGERback to summary
public static final ClassConstant INTEGER

The int type.

LONGback to summary
public static final ClassConstant LONG

The long type.

PRIMITIVE_TYPE_FIELDback to summary
private static final String PRIMITIVE_TYPE_FIELD

The field name that stores a reference to the primitive type representation.

SHORTback to summary
public static final ClassConstant SHORT

The short type.

SIZEback to summary
private static final StackManipulation.Size SIZE

The size of a java.lang.Class on the operand stack.

VOIDback to summary
public static final ClassConstant VOID

The void type.

Constructor Detail

ClassConstantback to summary
private ClassConstant(Class<?> type)

Creates a new class constant for a primitive type.

Parameters
type:Class<?>

The primitive type to represent.

Method Detail

applyback to summary
public StackManipulation.Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext)

Implements org.easymock.bytebuddy.implementation.bytecode.StackManipulation.apply.

Doc from org.easymock.bytebuddy.implementation.bytecode.StackManipulation.apply.

Applies the stack manipulation that is described by this instance.

Parameters
methodVisitor:MethodVisitor

The method visitor used to write the method implementation to.

implementationContext:Implementation.Context

The context of the current implementation.

Returns:StackManipulation.Size

The changes to the size of the operand stack that are implied by this stack manipulation.

isValidback to summary
public boolean isValid()

Implements org.easymock.bytebuddy.implementation.bytecode.StackManipulation.isValid.

Doc from org.easymock.bytebuddy.implementation.bytecode.StackManipulation.isValid.

Determines if this stack manipulation is valid.

Returns:boolean

If false, this manipulation cannot be applied and should throw an exception.

ofback to summary
public static StackManipulation of(TypeDescription typeDescription)

Returns a stack manipulation that loads a java.lang.Class type onto the operand stack which represents the given type.

Parameters
typeDescription:TypeDescription

The type to load onto the operand stack.

Returns:StackManipulation

The corresponding stack manipulation.

valueOfback to summary
public static ClassConstant valueOf(String name)
valuesback to summary
public static ClassConstant[] values()
org.easymock.bytebuddy.implementation.bytecode.constant back to summary

protected Class ClassConstant.ForReferenceType

extends Object
implements StackManipulation
Class Inheritance
  • java.lang.Object
  • org.easymock.bytebuddy.implementation.bytecode.constant.ClassConstant.ForReferenceType
All Implemented Interfaces
org.easymock.bytebuddy.implementation.bytecode.StackManipulation
Annotations
@Enhance

A class constant for a non-primitive java.lang.Class.

Field Summary

Modifier and TypeField and Description
private final TypeDescription
typeDescription

The type which should be loaded onto the operand stack as a class value.

Constructor Summary

AccessConstructor and Description
protected
ForReferenceType(TypeDescription
A description of the class to load onto the stack.
typeDescription
)

Creates a stack manipulation that represents loading a class constant onto the stack.

Method Summary

Modifier and TypeMethod and Description
public StackManipulation.Size
apply(MethodVisitor
The method visitor used to write the method implementation to.
methodVisitor
,
Implementation.Context
The context of the current implementation.
implementationContext
)

Implements org.easymock.bytebuddy.implementation.bytecode.StackManipulation.apply.

Applies the stack manipulation that is described by this instance.
public boolean
isValid()

Implements org.easymock.bytebuddy.implementation.bytecode.StackManipulation.isValid.

Determines if this stack manipulation is valid.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

typeDescriptionback to summary
private final TypeDescription typeDescription

The type which should be loaded onto the operand stack as a class value.

Constructor Detail

ForReferenceTypeback to summary
protected ForReferenceType(TypeDescription typeDescription)

Creates a stack manipulation that represents loading a class constant onto the stack.

Parameters
typeDescription:TypeDescription

A description of the class to load onto the stack.

Method Detail

applyback to summary
public StackManipulation.Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext)

Implements org.easymock.bytebuddy.implementation.bytecode.StackManipulation.apply.

Doc from org.easymock.bytebuddy.implementation.bytecode.StackManipulation.apply.

Applies the stack manipulation that is described by this instance.

Parameters
methodVisitor:MethodVisitor

The method visitor used to write the method implementation to.

implementationContext:Implementation.Context

The context of the current implementation.

Returns:StackManipulation.Size

The changes to the size of the operand stack that are implied by this stack manipulation.

isValidback to summary
public boolean isValid()

Implements org.easymock.bytebuddy.implementation.bytecode.StackManipulation.isValid.

Doc from org.easymock.bytebuddy.implementation.bytecode.StackManipulation.isValid.

Determines if this stack manipulation is valid.

Returns:boolean

If false, this manipulation cannot be applied and should throw an exception.