public static class Instrumentation.SpecialMethodInvocation.Simple extends Object implements Instrumentation.SpecialMethodInvocation
Instrumentation.SpecialMethodInvocation
.Instrumentation.SpecialMethodInvocation.Illegal, Instrumentation.SpecialMethodInvocation.Simple
StackManipulation.Compound, StackManipulation.LegalTrivial, StackManipulation.Size
Modifier and Type | Method and Description |
---|---|
StackManipulation.Size |
apply(org.objectweb.asm.MethodVisitor methodVisitor,
Instrumentation.Context instrumentationContext)
Applies the stack manipulation that is described by this instance.
|
boolean |
equals(Object other) |
MethodDescription |
getMethodDescription()
Returns the method that represents this special method invocation.
|
TypeDescription |
getTypeDescription()
Returns the target type the represented method is invoked on.
|
int |
hashCode() |
boolean |
isValid()
Determines if this stack manipulation is valid.
|
static Instrumentation.SpecialMethodInvocation |
of(MethodDescription methodDescription,
TypeDescription typeDescription)
Creates a special method invocation for a given invocation target.
|
String |
toString() |
public static Instrumentation.SpecialMethodInvocation of(MethodDescription methodDescription, TypeDescription typeDescription)
methodDescription
- The method that represents the special method invocation.typeDescription
- The type on which the method should be invoked on by an INVOKESPECIAL
invocation.public MethodDescription getMethodDescription()
Instrumentation.SpecialMethodInvocation
Instrumentation.Target
.getMethodDescription
in interface Instrumentation.SpecialMethodInvocation
public TypeDescription getTypeDescription()
Instrumentation.SpecialMethodInvocation
getTypeDescription
in interface Instrumentation.SpecialMethodInvocation
public boolean isValid()
StackManipulation
isValid
in interface StackManipulation
false
, this manipulation cannot be applied and should throw an exception.public StackManipulation.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Instrumentation.Context instrumentationContext)
StackManipulation
apply
in interface StackManipulation
methodVisitor
- The method visitor used to write the method implementation to.instrumentationContext
- The context of the current instrumentation.Copyright © 2014. All rights reserved.