congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
MethodVisitor.visitFrame
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: cglib/cglib

public void visitFrame(int type, int nLocal, Object[] local, int nStack, Object[] stack) {
  mv1.visitFrame(type, nLocal, local, nStack, stack);
  mv2.visitFrame(type, nLocal, local, nStack, stack);
}
origin: cglib/cglib

public void visitFrame(int type, int nLocal, Object[] local, int nStack, Object[] stack) {
  mv1.visitFrame(type, nLocal, local, nStack, stack);
  mv2.visitFrame(type, nLocal, local, nStack, stack);
}
origin: org.ow2.asm/asm

 final Object[] stack) {
if (mv != null) {
 mv.visitFrame(type, numLocal, local, numStack, stack);
origin: fengjiachun/Jupiter

  mv.visitLabel(labels[i]);
  if (i == 0) {
    mv.visitFrame(Opcodes.F_APPEND, 1, new Object[] { classNameInternal }, 0, null);
  } else {
    mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
origin: fengjiachun/Jupiter

  mv.visitLabel(labels[i]);
  if (i == 0) {
    mv.visitFrame(Opcodes.F_APPEND, 1, new Object[] { classNameInternal }, 0, null);
  } else {
    mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
origin: glowroot/glowroot

@Override
public void visitFrame(int type, int nLocal, Object/*@Nullable*/[] local, int nStack,
    Object/*@Nullable*/[] stack) {
  if (!skipNextFrame) {
    super.visitFrame(type, nLocal, local, nStack, stack);
  }
  skipNextFrame = true;
}
origin: com.google.gwt/gwt-servlet

@Override
public void visitFrame(int type, int nLocal, Object[] local, int nStack, Object[] stack) {
 for (int i = 0, j = local.length; i < j; i++) {
  if (local[i] instanceof String) {
   local[i] = processInternalName(sourceType, (String) local[i]);
  }
 }
 for (int i = 0, j = stack.length; i < j; i++) {
  if (stack[i] instanceof String) {
   stack[i] = processInternalName(sourceType, (String) stack[i]);
  }
 }
 super.visitFrame(type, nLocal, local, nStack, stack);
}
origin: org.ow2.asm/asm

methodVisitor.visitFrame(Opcodes.F_NEW, maxLocals, null, 0, null);
   methodVisitor.visitFrame(
     Opcodes.F_NEW,
     context.currentFrameLocalCount,
     context.currentFrameStackTypes);
  } else {
   methodVisitor.visitFrame(
     context.currentFrameType,
     context.currentFrameLocalCountDelta,
  methodVisitor.visitFrame(Constants.F_INSERT, 0, null, 0, null);
origin: hcoles/pitest

@Test
public void shouldForwardVisitFrameCallsToChild() {
 final Object[] f1 = { 1, 2, 3 };
 final Object[] f2 = { 2, 4, 6 };
 getTesteeVisitor().visitFrame(1, 2, f1, 3, f2);
 verify(this.mv).visitFrame(1, 2, f1, 3, f2);
}
origin: apache/asterixdb

@Override
public void visitFrame(int type, int nLocal, Object[] local, int nStack, Object[] stack) {
  if (local != null) {
    for (int index = 0; index < local.length; ++index) {
      if (local[index] instanceof String) {
        local[index] = applyMapping((String) local[index]);
      }
    }
  }
  mv.visitFrame(type, nLocal, local, nStack, stack);
}
origin: org.jacoco/org.jacoco.core

public void accept(final MethodVisitor mv) {
  if (locals != null) {
    mv.visitFrame(Opcodes.F_NEW, locals.length, locals, stack.length,
        stack);
  }
}
origin: net.onedaybeard.artemis/artemis-odb-weaver

@Override
public void visitFrame(int type, int nLocal, Object[] local, int nStack, Object[] stack) {
  if (local.length > 0 && oldOwner.getInternalName().equals(local[0]))
    local[0] = owner;
  super.visitFrame(type, nLocal, local, nStack, stack);
}
origin: junkdog/artemis-odb

@Override
public void visitFrame(int type, int nLocal, Object[] local, int nStack, Object[] stack) {
  if (local.length > 0 && oldOwner.getInternalName().equals(local[0]))
    local[0] = owner;
  super.visitFrame(type, nLocal, local, nStack, stack);
}
origin: org.apache.drill.exec/drill-java-exec

@Override
public void visitFrame(final int type, final int nLocal,
  final Object[] local, final int nStack, final Object[] stack) {
 fsmCursor.transition("visitFrame");
 super.visitFrame(type, nLocal, local, nStack, stack);
}
origin: openl-tablets/openl-tablets

private void falseIfDifferentClassNames(MethodVisitor mv) {
  Label endif = new Label();
  mv.visitVarInsn(Opcodes.ALOAD, 0);
  mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/Object", "getClass", "()Ljava/lang/Class;");
  mv.visitVarInsn(Opcodes.ALOAD, 1);
  mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/Object", "getClass", "()Ljava/lang/Class;");
  mv.visitJumpInsn(Opcodes.IF_ACMPEQ, endif); // this.class != other.class
  mv.visitInsn(Opcodes.ICONST_0);// false
  mv.visitInsn(Opcodes.IRETURN);
  mv.visitLabel(endif);
  mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
}
origin: youtongluan/sumk

  private void visitFullFrame() {
    String currentClz = asmMethod.currentClz.replace('.', '/');
    List<Object> argTypes = AsmUtils.getImplicitFrame(
        asmMethod.desc.substring(asmMethod.desc.indexOf("(") + 1, asmMethod.desc.indexOf(")")));
    List<Object> list = new ArrayList<Object>();
    list.add(currentClz);
    list.addAll(argTypes);
    list.add("org/yx/common/AopExcutor");
    Object[] frames = list.toArray(new Object[list.size()]);
    mv.visitFrame(Opcodes.F_FULL, frames.length, frames, 1, new Object[] { "java/lang/Throwable" });
  }
}
origin: org.ow2.asm/asm-debug-all

@Override
public void visitFrame(final int type, final int nLocal,
    final Object[] local, final int nStack, final Object[] stack) {
  p.visitFrame(type, nLocal, local, nStack, stack);
  super.visitFrame(type, nLocal, local, nStack, stack);
}
origin: nailperry-zd/LazierTracker

@Override
public void visitFrame(int type, int nLocal, Object[] local, int nStack, Object[] stack) {
  Log.logEach("visitFrame", type, local, nLocal, nStack, stack);
  super.visitFrame(type, nLocal, local, nStack, stack);
}
origin: org.ow2.asm/asm-debug-all

@Override
public void visitFrame(int type, int nLocal, Object[] local, int nStack,
    Object[] stack) {
  super.visitFrame(type, nLocal, remapEntries(nLocal, local), nStack,
      remapEntries(nStack, stack));
}
origin: net.sourceforge.cobertura/cobertura

@Override
public void visitFrame(int arg0, int arg1, Object[] arg2, int arg3,
    Object[] arg4) {
  super.visitFrame(arg0, arg1, arg2, arg3, arg4);
  appendToBacklog(new FrameNode(arg0, arg1, arg2, arg3, arg4));
}
org.objectweb.asmMethodVisitorvisitFrame

Javadoc

Visits the current state of the local variables and operand stack elements. This method must(*) be called just before any instruction i that follows an unconditional branch instruction such as GOTO or THROW, that is the target of a jump instruction, or that starts an exception handler block. The visited types must describe the values of the local variables and of the operand stack elements just before i is executed.

(*) this is mandatory only for classes whose version is greater than or equal to Opcodes#V1_6.

The frames of a method must be given either in expanded form, or in compressed form (all frames must use the same format, i.e. you must not mix expanded and compressed frames within a single method):
  • In expanded form, all frames must have the F_NEW type.
  • In compressed form, frames are basically "deltas" from the state of the previous frame:
    • Opcodes#F_SAME representing frame with exactly the same locals as the previous frame and with the empty stack.
    • Opcodes#F_SAME1 representing frame with exactly the same locals as the previous frame and with single value on the stack ( nStack is 1 and stack[0] contains value for the type of the stack item).
    • Opcodes#F_APPEND representing frame with current locals are the same as the locals in the previous frame, except that additional locals are defined (nLocal is 1, 2 or 3 and local elements contains values representing added types).
    • Opcodes#F_CHOP representing frame with current locals are the same as the locals in the previous frame, except that the last 1-3 locals are absent and with the empty stack (nLocals is 1, 2 or 3).
    • Opcodes#F_FULL representing complete frame data.

In both cases the first frame, corresponding to the method's parameters and access flags, is implicit and must not be visited. Also, it is illegal to visit two or more frames for the same code location (i.e., at least one instruction must be visited between two calls to visitFrame).

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
  • visitIntInsn
    Visits an instruction with a single int operand.
  • visitJumpInsn,
  • visitIntInsn,
  • visitLocalVariable,
  • visitAnnotation,
  • visitTryCatchBlock,
  • visitLineNumber,
  • visitTableSwitchInsn,
  • visitParameterAnnotation,
  • visitIincInsn

Popular in Java

  • Running tasks concurrently on multiple threads
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (Timer)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • JTextField (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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