List of usage examples for org.objectweb.asm Opcodes ASM4
int ASM4
To view the source code for org.objectweb.asm Opcodes ASM4.
Click Source Link
From source file:com.netease.hearttouch.hthotfix.inject.HackClassVisitor.java
License:MIT License
public HackClassVisitor(Project project, HotfixInstrumentContext context, ClassVisitor cv) { super(Opcodes.ASM4, cv); this.project = project; this.context = context; }
From source file:com.netease.hearttouch.hthotfix.inject.HackInitMethodVisitor.java
License:MIT License
public HackInitMethodVisitor(Project project, MethodVisitor mv, int access, String name, String desc) { super(Opcodes.ASM4, mv, access, name, desc); this.access = access; this.name = name; this.project = project; }
From source file:com.netease.hearttouch.hthotfix.inject.InjectIgnoreClassVisitor.java
License:MIT License
public InjectIgnoreClassVisitor(Project project, HotfixInstrumentContext context, ClassVisitor cv) { super(Opcodes.ASM4, cv); this.context = context; this.project = project; }
From source file:com.netease.hearttouch.hthotfix.refclass.RefMethodVisitor.java
License:MIT License
public RefMethodVisitor(Project project, MethodVisitor mv, RefScanInstrument.RefScanContext refScanContext) { super(Opcodes.ASM4, mv); this.project = project; this.context = refScanContext; }
From source file:com.netease.hearttouch.hthotfix.refclass.RefScanClassVisitor.java
License:MIT License
public RefScanClassVisitor(Project project, RefScanContext refScanContext) { super(Opcodes.ASM4); this.project = project; this.refScanContext = refScanContext; }
From source file:com.sun.tdk.jcov.instrument.DeferringMethodClassAdapter.java
License:Open Source License
@Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { if (!params.isInstrumentSynthetic() && (access & ACC_SYNTHETIC) != 0) { return super.visitMethod(access, name, desc, signature, exceptions); // return null; }/* ww w . j av a2s .co m*/ MethodVisitor mv = visitMethodCoverage(access, name, desc, signature, exceptions); if ("<clinit>".equals(name) && !params.isDynamicCollect() && (k.getPackageName().startsWith("java/lang/"))) { mv = new MethodVisitor(Opcodes.ASM4, mv) { public void visitCode() { mv.visitMethodInsn(INVOKESTATIC, "com/sun/tdk/jcov/runtime/Collect", "init", "()V"); super.visitCode(); } }; } if (params.isCallerFilterOn() && params.isCallerFilterAccept(k.getFullname()) && !params.isDynamicCollect()) { if (name.equals("<clinit>")) { int id = (name + desc).hashCode(); mv.visitLdcInsn(id); mv.visitMethodInsn(INVOKESTATIC, "com/sun/tdk/jcov/runtime/CollectDetect", "setExpected", "(I)V"); } } if (params.isInnerInvacationsOff() && Utils.isAdvanceStaticInstrAllowed(k.getFullname(), name)) { if (name.equals("<clinit>")) { mv.visitMethodInsn(INVOKESTATIC, "com/sun/tdk/jcov/runtime/CollectDetect", "enterClinit", "()V"); } } // System.out.println("Seeing " + k.fullname + "." + name); if (params.isDataSaveFilterAccept(k.getFullname(), name, true)) { mv = new SavePointsMethodAdapter(mv, true); } if (params.isDataSaveFilterAccept(k.getFullname(), name, false)) { mv = new SavePointsMethodAdapter(mv, false); } mv = new MethodVisitor(Opcodes.ASM4, mv) { @Override public void visitLocalVariable(String arg0, String arg1, String arg2, Label arg3, Label arg4, int arg5) { //super.visitLocalVariable(arg0, arg1, arg2, arg3, arg4, arg5); } }; if (params.isDynamicCollect()) { mv = new InvokeMethodAdapter(mv, k.getFullname(), params); } else { mv = new StaticInvokeMethodAdapter(mv, k.getFullname(), name, access, params); } return mv; }
From source file:com.sun.tdk.jcov.instrument.EntryCodeMethodAdapter.java
License:Open Source License
EntryCodeMethodAdapter(final MethodVisitor mv, final DataMethodEntryOnly method, final InstrumentationParams params) { super(Opcodes.ASM4, mv); this.method = method; this.params = params; }
From source file:com.sun.tdk.jcov.instrument.FieldAnnotationVisitor.java
License:Open Source License
FieldAnnotationVisitor(final FieldVisitor fv, final DataField field) { super(Opcodes.ASM4, fv); this.fv = fv; this.field = field; }
From source file:com.sun.tdk.jcov.instrument.ForkingMethodAdapter.java
License:Open Source License
/** * Constructs a new {@link MethodAdapter} object. * * @param mv the code visitor to which this adapter must delegate calls. *//*from w w w .ja v a 2 s . com*/ public ForkingMethodAdapter(final MethodVisitor mv1, final MethodVisitor mv2) { super(Opcodes.ASM4); this.mv1 = mv1; this.mv2 = mv2; }
From source file:com.sun.tdk.jcov.instrument.InstrumentedAttributeClassAdapter.java
License:Open Source License
public InstrumentedAttributeClassAdapter(final ClassVisitor cv) { super(Opcodes.ASM4, cv); }