示例#1
0
 /**
  * Generates an invoke method instruction.
  *
  * @param opcode the instruction's opcode.
  * @param type the class in which the method is defined.
  * @param method the method to be invoked.
  */
 private void invokeInsn(final int opcode, final Type type, final Method method) {
   String owner = type.getSort() == Type.ARRAY ? type.getDescriptor() : type.getInternalName();
   mv.visitMethodInsn(opcode, owner, method.getName(), method.getDescriptor());
 }
示例#2
0
 /**
  * Generates a get field or set field instruction.
  *
  * @param opcode the instruction's opcode.
  * @param ownerType the class in which the field is defined.
  * @param name the name of the field.
  * @param fieldType the type of the field.
  */
 private void fieldInsn(
     final int opcode, final Type ownerType, final String name, final Type fieldType) {
   mv.visitFieldInsn(opcode, ownerType.getInternalName(), name, fieldType.getDescriptor());
 }