Top Description Fields Constructors Methods
org.eclipse.persistence.internal.libraries.asm.commons

public abstract Class AdviceAdapter

extends GeneratorAdapter
implements Opcodes
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.internal.libraries.asm.Opcodes
Imports
java.util.ArrayList, .HashMap, .List, .Map, org.eclipse.persistence.internal.libraries.asm.ConstantDynamic, .Handle, .Label, .MethodVisitor, .Opcodes, .Type

A MethodVisitor to insert before, after and around advices in methods and constructors. For constructors, the code keeps track of the elements on the stack in order to detect when the super class constructor is called (note that there can be multiple such calls in different branches). onMethodEnter is called after each super class constructor call, because the object cannot be used before it is properly initialized.
Authors
Eugene Kuleshov, Eric Bruneton

Field Summary

Modifier and TypeField and Description
private Map<Label, List<Object>>
forwardJumpStackFrames

The stack map frames corresponding to the labels of the forward jumps made *before* the super class constructor has been called (note that the Java Virtual Machine forbids backward jumps before the super class constructor is called).

private static final String
INVALID_OPCODE

Prefix of the error message when invalid opcodes are found.

private final boolean
isConstructor

Whether the visited method is a constructor.

protected int
methodAccess

The access flags of the visited method.

protected String
methodDesc

The descriptor of the visited method.

private static final Object
OTHER

Any value other than "uninitialized this".

private List<Object>
stackFrame

The values on the current execution stack frame (long and double are represented by two elements).

private boolean
superClassConstructorCalled

Whether the super class constructor has been called (if the visited method is a constructor), at the current instruction.

private static final Object
Inherited from org.eclipse.persistence.internal.libraries.asm.commons.GeneratorAdapter:
ADDANDDIVEQGEGTLELTMULNENEGORREMSHLSHRSUBUSHRXOR

Constructor Summary

AccessConstructor and Description
protected
AdviceAdapter(final int
the ASM API version implemented by this visitor. Must be one of the ASMx values in Opcodes.
api
,
final MethodVisitor
the method visitor to which this adapter delegates calls.
methodVisitor
,
final int
the method's access flags (see Opcodes).
access
,
final String
the method's name.
name
,
final String
the method's descriptor (see Type).
descriptor
)

Constructs a new AdviceAdapter.

Method Summary

Modifier and TypeMethod and Description
private void
addForwardJump(final Label label)

private void
addForwardJumps(final Label dflt, final Label[] labels)

private void
doVisitMethodInsn(final int opcode, final String name, final String descriptor)

private void
protected void
onMethodEnter()

Generates the "before" advice for the visited method.

protected void
onMethodExit(final int opcode)

Generates the "after" advice for the visited method.

private Object
private Object
private void
pushValue(final Object value)

public void
visitCode()

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitCode.

Starts the visit of the method's code, if any (i.e. non abstract method).
public void
visitFieldInsn(final int
the opcode of the type instruction to be visited. This opcode is either GETSTATIC, PUTSTATIC, GETFIELD or PUTFIELD.
opcode
,
final String
the internal name of the field's owner class (see Type#getInternalName()).
owner
,
final String
the field's name.
name
,
final String
the field's descriptor (see Type).
descriptor
)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitFieldInsn.

Visits a field instruction.
public void
visitInsn(final int
the opcode of the instruction to be visited. This opcode is either NOP, ACONST_NULL, ICONST_M1, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, LCONST_0, LCONST_1, FCONST_0, FCONST_1, FCONST_2, DCONST_0, DCONST_1, IALOAD, LALOAD, FALOAD, DALOAD, AALOAD, BALOAD, CALOAD, SALOAD, IASTORE, LASTORE, FASTORE, DASTORE, AASTORE, BASTORE, CASTORE, SASTORE, POP, POP2, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, SWAP, IADD, LADD, FADD, DADD, ISUB, LSUB, FSUB, DSUB, IMUL, LMUL, FMUL, DMUL, IDIV, LDIV, FDIV, DDIV, IREM, LREM, FREM, DREM, INEG, LNEG, FNEG, DNEG, ISHL, LSHL, ISHR, LSHR, IUSHR, LUSHR, IAND, LAND, IOR, LOR, IXOR, LXOR, I2L, I2F, I2D, L2I, L2F, L2D, F2I, F2L, F2D, D2I, D2L, D2F, I2B, I2C, I2S, LCMP, FCMPL, FCMPG, DCMPL, DCMPG, IRETURN, LRETURN, FRETURN, DRETURN, ARETURN, RETURN, ARRAYLENGTH, ATHROW, MONITORENTER, or MONITOREXIT.
opcode
)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitInsn.

Visits a zero operand instruction.
public void
visitIntInsn(final int
the opcode of the instruction to be visited. This opcode is either BIPUSH, SIPUSH or NEWARRAY.
opcode
,
final int
the operand of the instruction to be visited.
When opcode is BIPUSH, operand value should be between Byte.MIN_VALUE and Byte.MAX_VALUE.
When opcode is SIPUSH, operand value should be between Short.MIN_VALUE and Short.MAX_VALUE.
When opcode is NEWARRAY, operand value should be one of Opcodes#T_BOOLEAN, Opcodes#T_CHAR, Opcodes#T_FLOAT, Opcodes#T_DOUBLE, Opcodes#T_BYTE, Opcodes#T_SHORT, Opcodes#T_INT or Opcodes#T_LONG.
operand
)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitIntInsn.

Visits an instruction with a single int operand.
public void
visitInvokeDynamicInsn(final String
the method's name.
name
,
final String
the method's descriptor (see Type).
descriptor
,
final Handle
the bootstrap method.
bootstrapMethodHandle
,
final Object...
the bootstrap method constant arguments. Each argument must be an Integer, Float, Long, Double, String, Type, Handle or ConstantDynamic value. This method is allowed to modify the content of the array so a caller should expect that this array may change.
bootstrapMethodArguments
)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitInvokeDynamicInsn.

Visits an invokedynamic instruction.
public void
visitJumpInsn(final int
the opcode of the type instruction to be visited. This opcode is either IFEQ, IFNE, IFLT, IFGE, IFGT, IFLE, IF_ICMPEQ, IF_ICMPNE, IF_ICMPLT, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ACMPEQ, IF_ACMPNE, GOTO, JSR, IFNULL or IFNONNULL.
opcode
,
final Label
the operand of the instruction to be visited. This operand is a label that designates the instruction to which the jump instruction may jump.
label
)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitJumpInsn.

Visits a jump instruction.
public void
public void
visitLdcInsn(final Object
the constant to be loaded on the stack. This parameter must be a non null Integer, a Float, a Long, a Double, a String, a Type of OBJECT or ARRAY sort for .class constants, for classes whose version is 49, a Type of METHOD sort for MethodType, a Handle for MethodHandle constants, for classes whose version is 51 or a ConstantDynamic for a constant dynamic for classes whose version is 55.
value
)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitLdcInsn.

Visits a LDC instruction.
public void
visitLookupSwitchInsn(final Label
beginning of the default handler block.
dflt
,
final int[]
the values of the keys.
keys
,
final Label[]
beginnings of the handler blocks. labels[i] is the beginning of the handler block for the keys[i] key.
labels
)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitLookupSwitchInsn.

Visits a LOOKUPSWITCH instruction.
public void
visitMethodInsn(final int
the opcode of the type instruction to be visited. This opcode is either INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or INVOKEINTERFACE.
opcodeAndSource
,
final String
the internal name of the method's owner class (see Type#getInternalName()).
owner
,
final String
the method's name.
name
,
final String
the method's descriptor (see Type).
descriptor
,
final boolean
if the method's owner class is an interface.
isInterface
)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitMethodInsn.

Visits a method instruction.
public void
visitMultiANewArrayInsn(final String
an array type descriptor (see Type).
descriptor
,
final int
the number of dimensions of the array to allocate.
numDimensions
)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitMultiANewArrayInsn.

Visits a MULTIANEWARRAY instruction.
public void
visitTableSwitchInsn(final int
the minimum key value.
min
,
final int
the maximum key value.
max
,
final Label
beginning of the default handler block.
dflt
,
final Label...
beginnings of the handler blocks. labels[i] is the beginning of the handler block for the min + i key.
labels
)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitTableSwitchInsn.

Visits a TABLESWITCH instruction.
public void
visitTryCatchBlock(final Label
the beginning of the exception handler's scope (inclusive).
start
,
final Label
the end of the exception handler's scope (exclusive).
end
,
final Label
the beginning of the exception handler's code.
handler
,
final String
the internal name of the type of exceptions handled by the handler (see Type#getInternalName()), or null to catch any exceptions (for "finally" blocks).
type
)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitTryCatchBlock.

Visits a try catch block.
public void
visitTypeInsn(final int
the opcode of the type instruction to be visited. This opcode is either NEW, ANEWARRAY, CHECKCAST or INSTANCEOF.
opcode
,
final String
the operand of the instruction to be visited. This operand must be the internal name of an object or array class (see Type#getInternalName()).
type
)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitTypeInsn.

Visits a type instruction.
public void
visitVarInsn(final int
the opcode of the local variable instruction to be visited. This opcode is either ILOAD, LLOAD, FLOAD, DLOAD, ALOAD, ISTORE, LSTORE, FSTORE, DSTORE, ASTORE or RET.
opcode
,
final int
the operand of the instruction to be visited. This operand is the index of a local variable.
varIndex
)

Overrides org.eclipse.persistence.internal.libraries.asm.commons.LocalVariablesSorter.visitVarInsn.

Visits a local variable instruction.
Inherited from org.eclipse.persistence.internal.libraries.asm.commons.GeneratorAdapter:
arrayLengtharrayLoadarrayStoreboxcastcatchExceptioncheckCastdupdup2dup2X1dup2X2dupX1dupX2endMethodgetAccessgetArgumentTypesgetFieldgetLocalTypegetNamegetReturnTypegetStaticgoToifCmpifICmpifNonNullifNullifZCmpiincinstanceOfinvokeConstructorinvokeDynamicinvokeInterfaceinvokeStaticinvokeVirtualloadArgloadArgArrayloadArgsloadArgsloadLocalloadLocalloadThismarkmarkmathmonitorEntermonitorExitnewArraynewInstancenewLabelnotpoppop2pushpushpushpushpushpushpushpushpushputFieldputStaticretreturnValuesetLocalTypestoreArgstoreLocalstoreLocalswapswaptableSwitchtableSwitchthrowExceptionthrowExceptionunboxvalueOf

Field Detail

forwardJumpStackFramesback to summary
private Map<Label, List<Object>> forwardJumpStackFrames

The stack map frames corresponding to the labels of the forward jumps made *before* the super class constructor has been called (note that the Java Virtual Machine forbids backward jumps before the super class constructor is called). Note that by definition (cf. the 'before'), when we reach a label from this map, superClassConstructorCalled must be reset to false. This field is only maintained for constructors.

INVALID_OPCODEback to summary
private static final String INVALID_OPCODE

Prefix of the error message when invalid opcodes are found.

isConstructorback to summary
private final boolean isConstructor

Whether the visited method is a constructor.

methodAccessback to summary
protected int methodAccess

The access flags of the visited method.

methodDescback to summary
protected String methodDesc

The descriptor of the visited method.

OTHERback to summary
private static final Object OTHER

Any value other than "uninitialized this".

stackFrameback to summary
private List<Object> stackFrame

The values on the current execution stack frame (long and double are represented by two elements). Each value is either UNINITIALIZED_THIS (for the uninitialized this value), or OTHER (for any other value). This field is only maintained for constructors, in branches where the super class constructor has not been called yet.

superClassConstructorCalledback to summary
private boolean superClassConstructorCalled

Whether the super class constructor has been called (if the visited method is a constructor), at the current instruction. There can be multiple call sites to the super constructor (e.g. for Java code such as super(expr ? value1 : value2);), in different branches. When scanning the bytecode linearly, we can move from one branch where the super constructor has been called to another where it has not been called yet. Therefore, this value can change from false to true, and vice-versa.

UNINITIALIZED_THISback to summary
private static final Object UNINITIALIZED_THIS

Hides org.eclipse.persistence.internal.libraries.asm.Opcodes.UNINITIALIZED_THIS.

The "uninitialized this" value.

Constructor Detail

AdviceAdapterback to summary
protected AdviceAdapter(final int api, final MethodVisitor methodVisitor, final int access, final String name, final String descriptor)

Constructs a new AdviceAdapter.

Parameters
api:int

the ASM API version implemented by this visitor. Must be one of the ASMx values in Opcodes.

methodVisitor:MethodVisitor

the method visitor to which this adapter delegates calls.

access:int

the method's access flags (see Opcodes).

name:String

the method's name.

descriptor:String

the method's descriptor (see Type).

Method Detail

addForwardJumpback to summary
private void addForwardJump(final Label label)
addForwardJumpsback to summary
private void addForwardJumps(final Label dflt, final Label[] labels)
doVisitMethodInsnback to summary
private void doVisitMethodInsn(final int opcode, final String name, final String descriptor)
endConstructorBasicBlockWithoutSuccessorback to summary
private void endConstructorBasicBlockWithoutSuccessor()
onMethodEnterback to summary
protected void onMethodEnter()

Generates the "before" advice for the visited method. The default implementation of this method does nothing. Subclasses can use or change all the local variables, but should not change state of the stack. This method is called at the beginning of the method or after super class constructor has been called (in constructors).

onMethodExitback to summary
protected void onMethodExit(final int opcode)

Generates the "after" advice for the visited method. The default implementation of this method does nothing. Subclasses can use or change all the local variables, but should not change state of the stack. This method is called at the end of the method, just before return and athrow instructions. The top element on the stack contains the return value or the exception instance. For example:

public void onMethodExit(final int opcode) {
  if (opcode == RETURN) {
    visitInsn(ACONST_NULL);
  } else if (opcode == ARETURN || opcode == ATHROW) {
    dup();
  } else {
    if (opcode == LRETURN || opcode == DRETURN) {
      dup2();
    } else {
      dup();
    }
    box(Type.getReturnType(this.methodDesc));
  }
  visitIntInsn(SIPUSH, opcode);
  visitMethodInsn(INVOKESTATIC, owner, "onExit", "(Ljava/lang/Object;I)V");
}

// An actual call back method.
public static void onExit(final Object exitValue, final int opcode) {
  ...
}
Parameters
opcode:int

one of Opcodes#RETURN, Opcodes#IRETURN, Opcodes#FRETURN, Opcodes#ARETURN, Opcodes#LRETURN, Opcodes#DRETURN or Opcodes#ATHROW.

peekValueback to summary
private Object peekValue()
popValueback to summary
private Object popValue()
pushValueback to summary
private void pushValue(final Object value)
visitCodeback to summary
public void visitCode()

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitCode.

Doc from org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitCode.

Starts the visit of the method's code, if any (i.e. non abstract method).

Annotations
@Override
visitFieldInsnback to summary
public void visitFieldInsn(final int opcode, final String owner, final String name, final String descriptor)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitFieldInsn.

Doc from org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitFieldInsn.

Visits a field instruction. A field instruction is an instruction that loads or stores the value of a field of an object.

Parameters
opcode:int

the opcode of the type instruction to be visited. This opcode is either GETSTATIC, PUTSTATIC, GETFIELD or PUTFIELD.

owner:String

the internal name of the field's owner class (see Type#getInternalName()).

name:String

the field's name.

descriptor:String

the field's descriptor (see Type).

Annotations
@Override
visitInsnback to summary
public void visitInsn(final int opcode)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitInsn.

Doc from org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitInsn.

Visits a zero operand instruction.

Parameters
opcode:int

the opcode of the instruction to be visited. This opcode is either NOP, ACONST_NULL, ICONST_M1, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, LCONST_0, LCONST_1, FCONST_0, FCONST_1, FCONST_2, DCONST_0, DCONST_1, IALOAD, LALOAD, FALOAD, DALOAD, AALOAD, BALOAD, CALOAD, SALOAD, IASTORE, LASTORE, FASTORE, DASTORE, AASTORE, BASTORE, CASTORE, SASTORE, POP, POP2, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, SWAP, IADD, LADD, FADD, DADD, ISUB, LSUB, FSUB, DSUB, IMUL, LMUL, FMUL, DMUL, IDIV, LDIV, FDIV, DDIV, IREM, LREM, FREM, DREM, INEG, LNEG, FNEG, DNEG, ISHL, LSHL, ISHR, LSHR, IUSHR, LUSHR, IAND, LAND, IOR, LOR, IXOR, LXOR, I2L, I2F, I2D, L2I, L2F, L2D, F2I, F2L, F2D, D2I, D2L, D2F, I2B, I2C, I2S, LCMP, FCMPL, FCMPG, DCMPL, DCMPG, IRETURN, LRETURN, FRETURN, DRETURN, ARETURN, RETURN, ARRAYLENGTH, ATHROW, MONITORENTER, or MONITOREXIT.

Annotations
@Override
visitIntInsnback to summary
public void visitIntInsn(final int opcode, final int operand)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitIntInsn.

Doc from org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitIntInsn.

Visits an instruction with a single int operand.

Parameters
opcode:int

the opcode of the instruction to be visited. This opcode is either BIPUSH, SIPUSH or NEWARRAY.

operand:int

the operand of the instruction to be visited.
When opcode is BIPUSH, operand value should be between Byte.MIN_VALUE and Byte.MAX_VALUE.
When opcode is SIPUSH, operand value should be between Short.MIN_VALUE and Short.MAX_VALUE.
When opcode is NEWARRAY, operand value should be one of Opcodes#T_BOOLEAN, Opcodes#T_CHAR, Opcodes#T_FLOAT, Opcodes#T_DOUBLE, Opcodes#T_BYTE, Opcodes#T_SHORT, Opcodes#T_INT or Opcodes#T_LONG.

Annotations
@Override
visitInvokeDynamicInsnback to summary
public void visitInvokeDynamicInsn(final String name, final String descriptor, final Handle bootstrapMethodHandle, final Object... bootstrapMethodArguments)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitInvokeDynamicInsn.

Doc from org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitInvokeDynamicInsn.

Visits an invokedynamic instruction.

Parameters
name:String

the method's name.

descriptor:String

the method's descriptor (see Type).

bootstrapMethodHandle:Handle

the bootstrap method.

bootstrapMethodArguments:Object[]

the bootstrap method constant arguments. Each argument must be an Integer, Float, Long, Double, String, Type, Handle or ConstantDynamic value. This method is allowed to modify the content of the array so a caller should expect that this array may change.

Annotations
@Override
visitJumpInsnback to summary
public void visitJumpInsn(final int opcode, final Label label)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitJumpInsn.

Doc from org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitJumpInsn.

Visits a jump instruction. A jump instruction is an instruction that may jump to another instruction.

Parameters
opcode:int

the opcode of the type instruction to be visited. This opcode is either IFEQ, IFNE, IFLT, IFGE, IFGT, IFLE, IF_ICMPEQ, IF_ICMPNE, IF_ICMPLT, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ACMPEQ, IF_ACMPNE, GOTO, JSR, IFNULL or IFNONNULL.

label:Label

the operand of the instruction to be visited. This operand is a label that designates the instruction to which the jump instruction may jump.

Annotations
@Override
visitLabelback to summary
public void visitLabel(final Label label)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitLabel.

Doc from org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitLabel.

Visits a label. A label designates the instruction that will be visited just after it.

Parameters
label:Label

a Label object.

Annotations
@Override
visitLdcInsnback to summary
public void visitLdcInsn(final Object value)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitLdcInsn.

Doc from org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitLdcInsn.

Visits a LDC instruction. Note that new constant types may be added in future versions of the Java Virtual Machine. To easily detect new constant types, implementations of this method should check for unexpected constant types, like this:

if (cst instanceof Integer) {
    // ...
} else if (cst instanceof Float) {
    // ...
} else if (cst instanceof Long) {
    // ...
} else if (cst instanceof Double) {
    // ...
} else if (cst instanceof String) {
    // ...
} else if (cst instanceof Type) {
    int sort = ((Type) cst).getSort();
    if (sort == Type.OBJECT) {
        // ...
    } else if (sort == Type.ARRAY) {
        // ...
    } else if (sort == Type.METHOD) {
        // ...
    } else {
        // throw an exception
    }
} else if (cst instanceof Handle) {
    // ...
} else if (cst instanceof ConstantDynamic) {
    // ...
} else {
    // throw an exception
}
Parameters
value:Object

the constant to be loaded on the stack. This parameter must be a non null Integer, a Float, a Long, a Double, a String, a Type of OBJECT or ARRAY sort for .class constants, for classes whose version is 49, a Type of METHOD sort for MethodType, a Handle for MethodHandle constants, for classes whose version is 51 or a ConstantDynamic for a constant dynamic for classes whose version is 55.

Annotations
@Override
visitLookupSwitchInsnback to summary
public void visitLookupSwitchInsn(final Label dflt, final int[] keys, final Label[] labels)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitLookupSwitchInsn.

Doc from org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitLookupSwitchInsn.

Visits a LOOKUPSWITCH instruction.

Parameters
dflt:Label

beginning of the default handler block.

keys:int[]

the values of the keys.

labels:Label[]

beginnings of the handler blocks. labels[i] is the beginning of the handler block for the keys[i] key.

Annotations
@Override
visitMethodInsnback to summary
public void visitMethodInsn(final int opcodeAndSource, final String owner, final String name, final String descriptor, final boolean isInterface)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitMethodInsn.

Doc from org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitMethodInsn.

Visits a method instruction. A method instruction is an instruction that invokes a method.

Parameters
opcodeAndSource:int

the opcode of the type instruction to be visited. This opcode is either INVOKEVIRTUAL, INVOKESPECIAL, INVOKESTATIC or INVOKEINTERFACE.

owner:String

the internal name of the method's owner class (see Type#getInternalName()).

name:String

the method's name.

descriptor:String

the method's descriptor (see Type).

isInterface:boolean

if the method's owner class is an interface.

Annotations
@Override
visitMultiANewArrayInsnback to summary
public void visitMultiANewArrayInsn(final String descriptor, final int numDimensions)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitMultiANewArrayInsn.

Doc from org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitMultiANewArrayInsn.

Visits a MULTIANEWARRAY instruction.

Parameters
descriptor:String

an array type descriptor (see Type).

numDimensions:int

the number of dimensions of the array to allocate.

Annotations
@Override
visitTableSwitchInsnback to summary
public void visitTableSwitchInsn(final int min, final int max, final Label dflt, final Label... labels)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitTableSwitchInsn.

Doc from org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitTableSwitchInsn.

Visits a TABLESWITCH instruction.

Parameters
min:int

the minimum key value.

max:int

the maximum key value.

dflt:Label

beginning of the default handler block.

labels:Label[]

beginnings of the handler blocks. labels[i] is the beginning of the handler block for the min + i key.

Annotations
@Override
visitTryCatchBlockback to summary
public void visitTryCatchBlock(final Label start, final Label end, final Label handler, final String type)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitTryCatchBlock.

Doc from org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitTryCatchBlock.

Visits a try catch block.

Parameters
start:Label

the beginning of the exception handler's scope (inclusive).

end:Label

the end of the exception handler's scope (exclusive).

handler:Label

the beginning of the exception handler's code.

type:String

the internal name of the type of exceptions handled by the handler (see Type#getInternalName()), or null to catch any exceptions (for "finally" blocks).

Annotations
@Override
visitTypeInsnback to summary
public void visitTypeInsn(final int opcode, final String type)

Overrides org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitTypeInsn.

Doc from org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitTypeInsn.

Visits a type instruction. A type instruction is an instruction that takes the internal name of a class as parameter (see Type#getInternalName()).

Parameters
opcode:int

the opcode of the type instruction to be visited. This opcode is either NEW, ANEWARRAY, CHECKCAST or INSTANCEOF.

type:String

the operand of the instruction to be visited. This operand must be the internal name of an object or array class (see Type#getInternalName()).

Annotations
@Override
visitVarInsnback to summary
public void visitVarInsn(final int opcode, final int varIndex)

Overrides org.eclipse.persistence.internal.libraries.asm.commons.LocalVariablesSorter.visitVarInsn.

Doc from org.eclipse.persistence.internal.libraries.asm.MethodVisitor.visitVarInsn.

Visits a local variable instruction. A local variable instruction is an instruction that loads or stores the value of a local variable.

Parameters
opcode:int

the opcode of the local variable instruction to be visited. This opcode is either ILOAD, LLOAD, FLOAD, DLOAD, ALOAD, ISTORE, LSTORE, FSTORE, DSTORE, ASTORE or RET.

varIndex:int

the operand of the instruction to be visited. This operand is the index of a local variable.

Annotations
@Override