@Override protected Void process(String file) throws IOException { injectProfilerStubs(meta); ClassVisitor cv = new ProfileVisitor(cw, meta); cv = new ProfileAnnotationRemoverWeaver(cv); cr.accept(cv, ClassReader.EXPAND_FRAMES); ClassUtil.writeClass(cw, file); return null; }
if (file != null) ClassUtil.writeClass(cw, file); } catch (Exception e) { e.printStackTrace();
@Override protected Void process(String file) throws IOException { injectProfilerStubs(meta); ClassVisitor cv = new ProfileVisitor(cw, meta); cv = new ProfileAnnotationRemoverWeaver(cv); cr.accept(cv, ClassReader.EXPAND_FRAMES); ClassUtil.writeClass(cw, file); return null; }
if (file != null) ClassUtil.writeClass(cw, file); } catch (Exception e) { e.printStackTrace();
if (file != null) ClassUtil.writeClass(cw, file); } catch (Exception e) { throw new WeaverException(e);
if (file != null) ClassUtil.writeClass(cw, file); } catch (Exception e) { throw new WeaverException(e);
@Override protected Void process(String file) throws IOException { cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES); ClassVisitor cv = cw; cv = new ClassVisitor(ASM5, cv) { @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); // method is injected by the transplant adapter below if ("processSystem".equals(name) && "()V".equals(desc)) mv = new ProcessInvocationOptimizer(meta, mv); return mv; } }; cv = new ClassMethodTransplantAdapter( sourceType(meta), cv, meta).addMethod("processSystem", "()V"); cv = new OptimizingSystemWeaver(cv, meta); try { cr.accept(cv, ClassReader.EXPAND_FRAMES); if (file != null) ClassUtil.writeClass(cw, file); } catch (Exception e) { throw new WeaverException(e); } return null; }
@Override protected Void process(String file) throws IOException { cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES); ClassVisitor cv = cw; cv = new ClassVisitor(ASM5, cv) { @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); // method is injected by the transplant adapter below if ("processSystem".equals(name) && "()V".equals(desc)) mv = new ProcessInvocationOptimizer(meta, mv); return mv; } }; cv = new ClassMethodTransplantAdapter( sourceType(meta), cv, meta).addMethod("processSystem", "()V"); cv = new OptimizingSystemWeaver(cv, meta); try { cr.accept(cv, ClassReader.EXPAND_FRAMES); if (file != null) ClassUtil.writeClass(cw, file); } catch (Exception e) { throw new WeaverException(e); } return null; }
sourceClassReader.accept(cv, ClassReader.EXPAND_FRAMES); if (file != null) ClassUtil.writeClass(cw, file);
sourceClassReader.accept(cv, ClassReader.EXPAND_FRAMES); if (file != null) ClassUtil.writeClass(cw, file);