congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
MethodVisitor.visitIntInsn
Code IndexAdd Tabnine 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)

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

  • Reactive rest calls using spring rest template
  • findViewById (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • addToBackStack (FragmentTransaction)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Runner (org.openjdk.jmh.runner)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now