Package org.apache.tapestry5.internal.plastic.asm

Examples of org.apache.tapestry5.internal.plastic.asm.Label


        check();

        assert condition != null;
        assert callback != null;

        Label doCheck = state.newLabel();

        Label exitLoop = new Label();

        new InstructionBuilderCallback()
        {
            public void doBuild(InstructionBuilder builder)
            {
View Full Code Here


        this.builder = builder;
        this.state = state;
        this.min = min;
        this.max = max;

        defaultLabel = new Label();
        endSwitchLabel = new Label();

        caseLabels = new Label[max - min + 1];

        for (int i = min; i <= max; i++)
        {
            caseLabels[i - min] = new Label();
        }

        state.visitor.visitTableSwitchInsn(min, max, defaultLabel, caseLabels);
    }
View Full Code Here

    }

    /** Creates a new Label and adds it to the method. */
    Label newLabel()
    {
        Label result = new Label();

        visitor.visitLabel(result);

        return result;
    }
View Full Code Here

        return result;
    }

    LocalVariable startVariable(String type)
    {
        Label start = newLabel();
        Label end = new Label();

        PrimitiveType ptype = PrimitiveType.getByName(type);

        int width = (ptype != null && ptype.isWide()) ? 2 : 1;
View Full Code Here

    TryCatchBlockImpl(InstructionBuilder builder, InstructionBuilderState state)
    {
        this.builder = builder;
        this.state = state;

        this.startLabel = new Label();
        this.endLabel = new Label();
    }
View Full Code Here

    private void doCatch(String exceptionInternalName, InstructionBuilderCallback callback)
    {
        check();

        Label handler = state.newLabel();

        callback.doBuild(builder);

        state.visitor.visitTryCatchBlock(startLabel, endLabel, handler, exceptionInternalName);
    }
View Full Code Here

        return LABEL;
    }

    public Label getLabel() {
        if (label == null) {
            label = new Label();
        }
        return label;
    }
View Full Code Here

        return LABEL;
    }

    public Label getLabel() {
        if (label == null) {
            label = new Label();
        }
        return label;
    }
View Full Code Here

    @Override
    public void visitTypeInsn(final int opcode, final String type) {
        if (opcode == Opcodes.NEW) {
            if (labels == null) {
                Label l = new Label();
                labels = new ArrayList<Label>(3);
                labels.add(l);
                if (mv != null) {
                    mv.visitLabel(l);
                }
View Full Code Here

            }
            return sb.toString();
        }

        protected final Label getLabel(final Object label) {
            Label lbl = labels.get(label);
            if (lbl == null) {
                lbl = new Label();
                labels.put(label, lbl);
            }
            return lbl;
        }
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.internal.plastic.asm.Label

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.