Top Description Fields Constructors Methods
net.bytebuddy.implementation.bytecode.constant

public Class TextConstant

extends AbstractBase
Class Inheritance
Annotations
@Enhance
Imports
net.bytebuddy.build.HashCodeAndEqualsPlugin, net.bytebuddy.implementation.Implementation, net.bytebuddy.implementation.bytecode.StackManipulation, .StackSize, net.bytebuddy.jar.asm.MethodVisitor

Represents a java.lang.String value that is stored in a type's constant pool.

Field Summary

Modifier and TypeField and Description
private final String
text

The text value to load onto the operand stack.

Constructor Summary

AccessConstructor and Description
public
TextConstant(String
The value of the String to be loaded.
text
)

Creates a new stack manipulation to load a String constant onto the operand 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 net.bytebuddy.implementation.bytecode.StackManipulation.apply.

Applies the stack manipulation that is described by this instance.
Inherited from net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase:
isValid

Field Detail

textback to summary
private final String text

The text value to load onto the operand stack.

Constructor Detail

TextConstantback to summary
public TextConstant(String text)

Creates a new stack manipulation to load a String constant onto the operand stack.

Parameters
text:String

The value of the String to be loaded.

Method Detail

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

Implements net.bytebuddy.implementation.bytecode.StackManipulation.apply.

Doc from net.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.