Class SerializedConstant
java.lang.Object
net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase
net.bytebuddy.implementation.bytecode.constant.SerializedConstant
- All Implemented Interfaces:
StackManipulation
A constant that represents a value in its serialized form.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
StackManipulation.AbstractBase, StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Simple, StackManipulation.Size, StackManipulation.Trivial
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
SerializedConstant
(String serialization) Creates a new constant for a serialized value. -
Method Summary
Modifier and TypeMethodDescriptionapply
(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext) Applies the stack manipulation that is described by this instance.static StackManipulation
of
(Serializable value) Creates a new stack manipulation to load the supplied value onto the stack.Methods inherited from class net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase
isValid
-
Field Details
-
CHARSET
A charset that does not change the supplied byte array upon encoding or decoding.- See Also:
-
serialization
The serialized value.
-
-
Constructor Details
-
SerializedConstant
Creates a new constant for a serialized value.- Parameters:
serialization
- The serialized value.
-
-
Method Details
-
of
Creates a new stack manipulation to load the supplied value onto the stack.- Parameters:
value
- The value to serialize ornull
.- Returns:
- A stack manipulation to serialize the supplied value.
-
apply
public StackManipulation.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext) Applies the stack manipulation that is described by this instance.- Parameters:
methodVisitor
- The method visitor used to write the method implementation to.implementationContext
- The context of the current implementation.- Returns:
- The changes to the size of the operand stack that are implied by this stack manipulation.
-