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

public final Enum MethodReturn

extends Enum<MethodReturn>
implements StackManipulation
Class Inheritance
All Implemented Interfaces
net.bytebuddy.implementation.bytecode.StackManipulation
Imports
net.bytebuddy.description.type.TypeDefinition, net.bytebuddy.implementation.Implementation, net.bytebuddy.implementation.bytecode.StackManipulation, .StackSize, net.bytebuddy.jar.asm.MethodVisitor, .Opcodes

A stack manipulation returning a value of a given type.

Field Summary

Modifier and TypeField and Description
public static final MethodReturn
DOUBLE

The method return handler for returning a double.

public static final MethodReturn
FLOAT

The method return handler for returning a float.

public static final MethodReturn
INTEGER

The method return handler for returning a JVM-integer.

public static final MethodReturn
LONG

The method return handler for returning a long.

public static final MethodReturn
REFERENCE

The method return handler for returning a reference type.

private final int
returnOpcode

The opcode of this operation.

private final StackManipulation.Size
size

The operand stack size change that is implied by this operation.

public static final MethodReturn
VOID

The method return handler for returning void.

Constructor Summary

AccessConstructor and Description
private
MethodReturn(int
The opcode of this operation.
returnOpcode
,
StackSize
The operand stack size change that is implied by this operation.
stackSize
)

Creates a new method return manipulation.

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.
public boolean
isValid()

Implements net.bytebuddy.implementation.bytecode.StackManipulation.isValid.

Determines if this stack manipulation is valid.
public static StackManipulation

Returns:

The stack manipulation representing the method return.
of
(TypeDefinition
The type to be returned.
typeDefinition
)

Returns a method return corresponding to a given type.

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

Field Detail

DOUBLEback to summary
public static final MethodReturn DOUBLE

The method return handler for returning a double.

FLOATback to summary
public static final MethodReturn FLOAT

The method return handler for returning a float.

INTEGERback to summary
public static final MethodReturn INTEGER

The method return handler for returning a JVM-integer.

LONGback to summary
public static final MethodReturn LONG

The method return handler for returning a long.

REFERENCEback to summary
public static final MethodReturn REFERENCE

The method return handler for returning a reference type.

returnOpcodeback to summary
private final int returnOpcode

The opcode of this operation.

sizeback to summary
private final StackManipulation.Size size

The operand stack size change that is implied by this operation.

VOIDback to summary
public static final MethodReturn VOID

The method return handler for returning void.

Constructor Detail

MethodReturnback to summary
private MethodReturn(int returnOpcode, StackSize stackSize)

Creates a new method return manipulation.

Parameters
returnOpcode:int

The opcode of this operation.

stackSize:StackSize

The operand stack size change that is implied by this operation.

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.

isValidback to summary
public boolean isValid()

Implements net.bytebuddy.implementation.bytecode.StackManipulation.isValid.

Doc from net.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(TypeDefinition typeDefinition)

Returns a method return corresponding to a given type.

Parameters
typeDefinition:TypeDefinition

The type to be returned.

Returns:StackManipulation

The stack manipulation representing the method return.

valueOfback to summary
public static MethodReturn valueOf(String name)
valuesback to summary
public static MethodReturn[] values()