Codota Logo
MethodVisitor.visitIntInsn
Code IndexAdd Codota to your IDE (free)

How to use
visitIntInsn
method
in
org.objectweb.asm.MethodVisitor

Best Java code snippets using org.objectweb.asm.MethodVisitor.visitIntInsn (Showing top 20 results out of 936)

  • Common ways to obtain MethodVisitor
private void myMethod () {
MethodVisitor m =
  • Codota IconClassVisitor zuper;zuper.visitMethod(access, name, desc, signature, exceptions)
  • Codota IconClassVisitor cv;String name;String desc;String signature;String[] exceptions;cv.visitMethod(access, name, desc, signature, exceptions)
  • Codota IconClassVisitor cv;cv.visitMethod(access, "<init>", "()V", null, null)
  • Smart code suggestions by Codota
}
origin: cglib/cglib

public void visitIntInsn(int opcode, int operand) {
  mv1.visitIntInsn(opcode, operand);
  mv2.visitIntInsn(opcode, operand);
}

origin: cglib/cglib

public void visitIntInsn(int opcode, int operand) {
  mv1.visitIntInsn(opcode, operand);
  mv2.visitIntInsn(opcode, operand);
}

origin: org.ow2.asm/asm

/**
 * Visits an instruction with a single int operand.
 *
 * @param opcode the opcode of the instruction to be visited. This opcode is either BIPUSH, SIPUSH
 *     or NEWARRAY.
 * @param operand the operand of the instruction to be visited.<br>
 *     When opcode is BIPUSH, operand value should be between Byte.MIN_VALUE and Byte.MAX_VALUE.
 *     <br>
 *     When opcode is SIPUSH, operand value should be between Short.MIN_VALUE and Short.MAX_VALUE.
 *     <br>
 *     When opcode is NEWARRAY, operand value should be one of {@link Opcodes#T_BOOLEAN}, {@link
 *     Opcodes#T_CHAR}, {@link Opcodes#T_FLOAT}, {@link Opcodes#T_DOUBLE}, {@link Opcodes#T_BYTE},
 *     {@link Opcodes#T_SHORT}, {@link Opcodes#T_INT} or {@link Opcodes#T_LONG}.
 */
public void visitIntInsn(final int opcode, final int operand) {
 if (mv != null) {
  mv.visitIntInsn(opcode, operand);
 }
}
origin: scouter-project/scouter

public static void PUSH(MethodVisitor mv, int value) {
  if ((value >= -1) && (value <= 5)) // Use ICONST_n
    mv.visitInsn(ICONST_0 + value);
  else if ((value >= -128) && (value <= 127)) // Use BIPUSH
    mv.visitIntInsn(BIPUSH, value);
  else if ((value >= -32768) && (value <= 32767)) // Use SIPUSH
    mv.visitIntInsn(SIPUSH, value);
  else
    mv.visitLdcInsn(new Integer(value));
}
origin: cglib/cglib

public void push(int i) {
  if (i < -1) {
    mv.visitLdcInsn(new Integer(i));
  } else if (i <= 5) {
    mv.visitInsn(TypeUtils.ICONST(i));
  } else if (i <= Byte.MAX_VALUE) {
    mv.visitIntInsn(Constants.BIPUSH, i);
  } else if (i <= Short.MAX_VALUE) {
    mv.visitIntInsn(Constants.SIPUSH, i);
  } else {
    mv.visitLdcInsn(new Integer(i));
  }
}

origin: cglib/cglib

public void push(int i) {
  if (i < -1) {
    mv.visitLdcInsn(new Integer(i));
  } else if (i <= 5) {
    mv.visitInsn(TypeUtils.ICONST(i));
  } else if (i <= Byte.MAX_VALUE) {
    mv.visitIntInsn(Constants.BIPUSH, i);
  } else if (i <= Short.MAX_VALUE) {
    mv.visitIntInsn(Constants.SIPUSH, i);
  } else {
    mv.visitLdcInsn(new Integer(i));
  }
}

origin: Meituan-Dianping/Robust

  mv.visitIntInsn(Opcodes.BIPUSH, argsCount);
} else {
  mv.visitInsn(Opcodes.ICONST_0 + argsCount);
    mv.visitInsn(Opcodes.ICONST_0 + i);
  } else {
    mv.visitIntInsn(Opcodes.BIPUSH, i);
origin: pxb1988/dex2jar

  break;
case 'Z':
  asm.visitIntInsn(NEWARRAY, T_BOOLEAN);
  break;
case 'B':
  asm.visitIntInsn(NEWARRAY, T_BYTE);
  break;
case 'S':
  asm.visitIntInsn(NEWARRAY, T_SHORT);
  break;
case 'C':
  asm.visitIntInsn(NEWARRAY, T_CHAR);
  break;
case 'I':
  asm.visitIntInsn(NEWARRAY, T_INT);
  break;
case 'F':
  asm.visitIntInsn(NEWARRAY, T_FLOAT);
  break;
case 'J':
  asm.visitIntInsn(NEWARRAY, T_LONG);
  break;
case 'D':
  asm.visitIntInsn(NEWARRAY, T_DOUBLE);
  break;
origin: pxb1988/dex2jar

  super.visitInsn(ICONST_0 + value);
} else if (value <= Byte.MAX_VALUE && value >= Byte.MIN_VALUE) {
  super.visitIntInsn(BIPUSH, value);
} else if (value <= Short.MAX_VALUE && value >= Short.MIN_VALUE) {
  super.visitIntInsn(SIPUSH, value);
} else {
  super.visitLdcInsn(cst);
origin: kilim/kilim

  return;
} else if (i >= Byte.MIN_VALUE && i <= Byte.MAX_VALUE) {
  mv.visitIntInsn(BIPUSH, i);
  return;
} else if (i >= Short.MIN_VALUE && i <= Short.MAX_VALUE) {
  mv.visitIntInsn(SIPUSH, i);
  return;
origin: cglib/cglib

public void newarray(Type type) {
  if (TypeUtils.isPrimitive(type)) {
    mv.visitIntInsn(Constants.NEWARRAY, TypeUtils.NEWARRAY(type));
  } else {
    emit_type(Constants.ANEWARRAY, type);
  }
}

origin: cglib/cglib

public void newarray(Type type) {
  if (TypeUtils.isPrimitive(type)) {
    mv.visitIntInsn(Constants.NEWARRAY, TypeUtils.NEWARRAY(type));
  } else {
    emit_type(Constants.ANEWARRAY, type);
  }
}

origin: CalebFenton/simplify

  mv.visitInsn(Opcodes.DUP);
  mv.visitLdcInsn(fieldName);
  mv.visitIntInsn(Opcodes.BIPUSH, i);
  mv.visitMethodInsn(Opcodes.INVOKESPECIAL, name, "<init>", "(Ljava/lang/String;I)V",
            false);
mv.visitIntInsn(Opcodes.BIPUSH, fieldCount);
mv.visitTypeInsn(Opcodes.ANEWARRAY, name);
  String fieldName = fieldNames.get(i);
  mv.visitInsn(Opcodes.DUP);
  mv.visitIntInsn(Opcodes.BIPUSH, i);
  mv.visitFieldInsn(Opcodes.GETSTATIC, name, fieldName, classDef.getType());
  mv.visitInsn(Opcodes.AASTORE);
origin: fengjiachun/Jupiter

for (int p_index = 0; p_index < parameterTypes.length; p_index++) {
  mv.visitVarInsn(ALOAD, 3);
  mv.visitIntInsn(BIPUSH, p_index);
  mv.visitInsn(AALOAD);
origin: fengjiachun/Jupiter

for (int p_index = 0; p_index < parameterTypes.length; p_index++) {
  mv.visitVarInsn(ALOAD, 3);
  mv.visitIntInsn(BIPUSH, p_index);
  mv.visitInsn(AALOAD);
origin: Sable/soot

 throw new RuntimeException("invalid type");
mv.visitIntInsn(Opcodes.NEWARRAY, type);
origin: Sable/soot

default:
 if (v >= Byte.MIN_VALUE && v <= Byte.MAX_VALUE) {
  mv.visitIntInsn(Opcodes.BIPUSH, v);
 } else if (v >= Short.MIN_VALUE && v <= Short.MAX_VALUE) {
  mv.visitIntInsn(Opcodes.SIPUSH, v);
 } else {
  mv.visitLdcInsn(v);
origin: kilim/kilim

  mv.visitInsn(ICONST_0 + pc);
} else {
  mv.visitIntInsn(BIPUSH, pc);
origin: kilim/kilim

mv.visitIntInsn(opcode, op);
break;
origin: org.ow2.asm/asm

case Constants.BIPUSH:
case Constants.NEWARRAY:
 methodVisitor.visitIntInsn(opcode, classFileBuffer[currentOffset + 1]);
 currentOffset += 2;
 break;
case Constants.SIPUSH:
 methodVisitor.visitIntInsn(opcode, readShort(currentOffset + 1));
 currentOffset += 3;
 break;
org.objectweb.asmMethodVisitorvisitIntInsn

Javadoc

Visits an instruction with a single int operand.

Popular methods of MethodVisitor

  • visitMethodInsn
    Visits a method instruction. A method instruction is an instruction that invokes a method.
  • visitInsn
    Visits a zero operand instruction.
  • visitVarInsn
    Visits a local variable instruction. A local variable instruction is an instruction that loads or st
  • visitMaxs
    Visits the maximum stack size and the maximum number of local variables of the method.
  • visitEnd
    Visits the end of the method. This method, which is the last one to be called, is used to inform the
  • visitCode
    Starts the visit of the method's code, if any (i.e. non abstract method).
  • visitFieldInsn
    Visits a field instruction. A field instruction is an instruction that loads or stores the value of
  • visitTypeInsn
    Visits a type instruction. A type instruction is an instruction that takes the internal name of a cl
  • visitLabel
    Visits a label. A label designates the instruction that will be visited just after it.
  • visitLdcInsn
    Visits a LDC instruction. Note that new constant types may be added in future versions of the Java V
  • visitJumpInsn
    Visits a jump instruction. A jump instruction is an instruction that may jump to another instruction
  • visitLocalVariable
    Visits a local variable declaration.
  • visitJumpInsn,
  • visitLocalVariable,
  • visitAnnotation,
  • visitTryCatchBlock,
  • visitLineNumber,
  • visitFrame,
  • visitTableSwitchInsn,
  • visitParameterAnnotation,
  • visitIincInsn

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • getExternalFilesDir (Context)
  • onRequestPermissionsResult (Fragment)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now