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

public Class SerializedConstant

extends AbstractBase
Class Inheritance
Annotations
@Enhance
Imports
org.easymock.bytebuddy.build.HashCodeAndEqualsPlugin, org.easymock.bytebuddy.description.method.MethodDescription, org.easymock.bytebuddy.description.type.TypeDescription, org.easymock.bytebuddy.implementation.Implementation, org.easymock.bytebuddy.implementation.bytecode.Duplication, .StackManipulation, .TypeCreation, org.easymock.bytebuddy.implementation.bytecode.member.MethodInvocation, org.easymock.bytebuddy.utility.nullability.MaybeNull, org.easymock.bytebuddy.jar.asm.MethodVisitor, java.io.*

A constant that represents a value in its serialized form.

Field Summary

Modifier and TypeField and Description
private static final String
CHARSET

A charset that does not change the supplied byte array upon encoding or decoding.

private final String
serialization

The serialized value.

Constructor Summary

AccessConstructor and Description
protected
SerializedConstant(String
The serialized value.
serialization
)

Creates a new constant for a serialized value.

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 static StackManipulation

Returns:

A stack manipulation to serialize the supplied value.
of
(Serializable
The value to serialize or null.
value
)

Creates a new stack manipulation to load the supplied value onto the stack.

Inherited from org.easymock.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase:
isValid

Field Detail

CHARSETback to summary
private static final String CHARSET

A charset that does not change the supplied byte array upon encoding or decoding.

serializationback to summary
private final String serialization

The serialized value.

Constructor Detail

SerializedConstantback to summary
protected SerializedConstant(String serialization)

Creates a new constant for a serialized value.

Parameters
serialization:String

The serialized value.

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.

ofback to summary
public static StackManipulation of(Serializable value)

Creates a new stack manipulation to load the supplied value onto the stack.

Parameters
value:Serializable

The value to serialize or null.

Returns:StackManipulation

A stack manipulation to serialize the supplied value.