public class MethodTypeConstant extends Object implements StackManipulation
java.lang.invoke.MethodType.StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Size, StackManipulation.Trivial| Modifier | Constructor and Description |
|---|---|
protected |
MethodTypeConstant(Type methodType)
Creates a method type constant for the given method type.
|
| Modifier and Type | Method and Description |
|---|---|
StackManipulation.Size |
apply(MethodVisitor methodVisitor,
Implementation.Context implementationContext)
Applies the stack manipulation that is described by this instance.
|
boolean |
equals(Object other) |
int |
hashCode() |
boolean |
isValid()
Determines if this stack manipulation is valid.
|
static StackManipulation |
of(JavaInstance.MethodType methodType)
Transforms the given method type into a stack manipulation that loads its type onto the operand stack.
|
static StackManipulation |
of(MethodDescription.InDefinedShape methodDescription)
Transforms the given method into a stack manipulation that loads its type onto the operand stack.
|
String |
toString() |
protected MethodTypeConstant(Type methodType)
methodType - The represented method type.public static StackManipulation of(MethodDescription.InDefinedShape methodDescription)
methodDescription - The method of which the method type should be loaded onto the operand stack.public static StackManipulation of(JavaInstance.MethodType methodType)
methodType - The method type that should be loaded onto the operand stack.public boolean isValid()
StackManipulationisValid in interface StackManipulationfalse, this manipulation cannot be applied and should throw an exception.public StackManipulation.Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext)
StackManipulationapply in interface StackManipulationmethodVisitor - The method visitor used to write the method implementation to.implementationContext - The context of the current implementation.Copyright © 2014–2016. All rights reserved.