private abstract class FieldAccess.AccessDispatcher.AbstractFieldInstruction extends java.lang.Object implements StackManipulation
StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Size, StackManipulation.Trivial
Modifier | Constructor and Description |
---|---|
private |
AbstractFieldInstruction() |
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.
|
protected abstract int |
getOpcode()
Returns the opcode for implementing the field access.
|
boolean |
isValid()
Determines if this stack manipulation is valid.
|
protected abstract StackManipulation.Size |
resolveSize(StackSize fieldSize)
Resolves the actual size of this field access operation.
|
public boolean isValid()
isValid
in interface StackManipulation
false
, 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 StackManipulation
methodVisitor
- The method visitor used to write the method implementation to.implementationContext
- The context of the current implementation.protected abstract int getOpcode()
protected abstract StackManipulation.Size resolveSize(StackSize fieldSize)
fieldSize
- The size of the accessed field.