@HashCodeAndEqualsPlugin.Enhance public static class MethodVariableAccess.MethodLoading extends Object implements StackManipulation
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
MethodVariableAccess.MethodLoading.TypeCastingHandler
A type casting handler allows a type transformation of all arguments of a method after loading them onto the operand stack.
|
StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Simple, StackManipulation.Size, StackManipulation.Trivial| Modifier | Constructor and Description |
|---|---|
protected |
MethodLoading(MethodDescription methodDescription,
MethodVariableAccess.MethodLoading.TypeCastingHandler typeCastingHandler)
Creates a new method loading stack manipulation.
|
| Modifier and Type | Method and Description |
|---|---|
StackManipulation.Size |
apply(org.objectweb.asm.MethodVisitor methodVisitor,
Implementation.Context implementationContext)
Applies the stack manipulation that is described by this instance.
|
MethodVariableAccess.MethodLoading |
asBridgeOf(MethodDescription bridgeTarget)
Applies a transformation to all loaded arguments of the method being loaded to be casted to the corresponding parameter of
the provided method.
|
boolean |
isValid()
Determines if this stack manipulation is valid.
|
StackManipulation |
prependThisReference()
Prepends a reference to the
this instance to the loaded parameters if the represented method is non-static. |
protected MethodLoading(MethodDescription methodDescription, MethodVariableAccess.MethodLoading.TypeCastingHandler typeCastingHandler)
methodDescription - The method for which all parameters are loaded onto the operand stack.typeCastingHandler - A type casting handler which is capable of transforming all method parameters.public boolean isValid()
isValid in interface StackManipulationfalse, this manipulation cannot be applied and should throw an exception.public StackManipulation.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext)
apply in interface StackManipulationmethodVisitor - The method visitor used to write the method implementation to.implementationContext - The context of the current implementation.public StackManipulation prependThisReference()
this instance to the loaded parameters if the represented method is non-static.this if the represented is non-static. Any potential parameter transformation is preserved.public MethodVariableAccess.MethodLoading asBridgeOf(MethodDescription bridgeTarget)
bridgeTarget - The method that is the target of the bridge method for which the parameters are being loaded.Copyright © 2014–2021. All rights reserved.