public void tagBranchExit() { Label dummyTag = new AnnotatedLabel(false, false); // dummyTag.info = Boolean.FALSE; super.visitLabel(dummyTag); }
/** * {@inheritDoc} * * Returns the LabelNode corresponding to the given Label. Creates a new * LabelNode if necessary. The default implementation of this method uses * the {@link Label#info} field to store associations between labels and * label nodes. */ @Override protected LabelNode getLabelNode(final Label l) { if (l instanceof AnnotatedLabel) { AnnotatedLabel al = (AnnotatedLabel) l; al.setParent(new LabelNode(al)); return al.getParent(); } else { if (!(l.info instanceof LabelNode)) { l.info = new LabelNode(l); } return (LabelNode) l.info; } } }
@Override public void visitLabel(Label label) { if (label instanceof AnnotatedLabel) { AnnotatedLabel aLabel = (AnnotatedLabel) label; if (aLabel.isStartTag()) { inInstrumentation = true; } else { inInstrumentation = false; } } super.visitLabel(label); }
if (label.getLabel() instanceof AnnotatedLabel) { AnnotatedLabel aLabel = (AnnotatedLabel) label.getLabel(); if(aLabel.isStartTag()) { if(!aLabel.shouldIgnore()) { logger.debug("Found artificial branch: "+v); Branch b = BranchPool.getInstance(classLoader).getBranchForInstruction(v); b.setInstrumented(true); if(aLabel.shouldIgnoreFalse()) b.setIgnoreFalse(true); } else {
loadLocal(exceptionInstanceVar); Label startTag = new AnnotatedLabel(false, true); ((AnnotatedLabel) startTag).setIgnoreFalse(true); super.visitLabel(startTag); Label endTag = new AnnotatedLabel(false, false); ((AnnotatedLabel) startTag).setIgnoreFalse(true); super.visitLabel(endTag);
if (ln.getLabel() instanceof AnnotatedLabel) { AnnotatedLabel aLabel = (AnnotatedLabel) ln.getLabel(); if(aLabel.isStartTag()) { if(aLabel.shouldIgnore()) { logger.debug("Ignoring artificial branch: "+instruction); return;
public void tagBranch() { Label dummyTag = new AnnotatedLabel(false, true); // dummyTag.info = Boolean.TRUE; super.visitLabel(dummyTag); }
if (aLabel.isStartTag()) { inInstrumentation = true; } else {
public void tagBranch() { Label dummyTag = new AnnotatedLabel(false, true); // dummyTag.info = Boolean.TRUE; super.visitLabel(dummyTag); }
public void tagBranchExit() { Label dummyTag = new AnnotatedLabel(false, false); // dummyTag.info = Boolean.FALSE; super.visitLabel(dummyTag); }
Label annotationStartTag = new AnnotatedLabel(true, true); annotationStartTag.info = Boolean.TRUE; mv.visitLabel(annotationStartTag); mv.visitJumpInsn(Opcodes.IFEQ, origCallLabel); Label annotationEndTag = new AnnotatedLabel(true, false); annotationEndTag.info = Boolean.FALSE; mv.visitLabel(annotationEndTag);
Label afterOrigCallLabel = new Label(); Label annotationStartTag = new AnnotatedLabel(true, true); annotationStartTag.info = Boolean.TRUE; mv.visitLabel(annotationStartTag); mv.visitJumpInsn(Opcodes.IFEQ, origCallLabel); Label annotationEndTag = new AnnotatedLabel(true, false); annotationEndTag.info = Boolean.FALSE; mv.visitLabel(annotationEndTag);