Package org.apache.xbean.asm4

Examples of org.apache.xbean.asm4.Label


    map.panTo(center);

    // UI
    cp5 = new ControlP5(this);
    cp5.addSlider("simplificationTolerance").setPosition(20, 25).setRange(0, 25).setCaptionLabel("Simplification");
    Label label = cp5.addSlider("averageNumber").setPosition(20, 40).setRange(1, 10).setCaptionLabel("Average")
        .getCaptionLabel();

    cp5.addTextlabel("original").setText("ORIGINAL").setPosition(144, 12).setFont(label.getFont())
        .setColorValue(color(255));
    cp5.addTextlabel("combined").setText("SIMPL+AVG").setPosition(131, 55).setFont(label.getFont())
        .setColorValue(color(255));

    cp5.addToggle("showOriginal").setPosition(190, 10).setSize(10, 10).setLabelVisible(false);
    cp5.addToggle("showSimplified").setPosition(190, 25).setSize(10, 10).setLabelVisible(false);
    cp5.addToggle("showAveraged").setPosition(190, 40).setSize(10, 10).setLabelVisible(false);
View Full Code Here


        break;

      case 'B':
        if (isLast == true) {
          mv.visitInsn(DUP);
          Label label = new Label();
          mv.visitJumpInsn(IFNONNULL, label);
            mv.visitInsn(POP);
            mv.visitInsn(ICONST_0);
            mv.visitInsn(IRETURN);
          mv.visitLabel(label);

          AsmUtil.byteValue(mv);
        }
        mv.visitInsn(IRETURN);
        break;

      case 'C':
        if (isLast == true) {
          mv.visitInsn(DUP);
          Label label = new Label();
          mv.visitJumpInsn(IFNONNULL, label);
            mv.visitInsn(POP);
            mv.visitInsn(ICONST_0);
            mv.visitInsn(IRETURN);
          mv.visitLabel(label);

          AsmUtil.charValue(mv);
        }
        mv.visitInsn(IRETURN);
        break;

      case 'S':
        if (isLast == true) {
          mv.visitInsn(DUP);
          Label label = new Label();
          mv.visitJumpInsn(IFNONNULL, label);
            mv.visitInsn(POP);
            mv.visitInsn(ICONST_0);
            mv.visitInsn(IRETURN);
          mv.visitLabel(label);

          AsmUtil.shortValue(mv);
        }
        mv.visitInsn(IRETURN);
        break;

      case 'I':
        if (isLast == true) {
          mv.visitInsn(DUP);
          Label label = new Label();
          mv.visitJumpInsn(IFNONNULL, label);
            mv.visitInsn(POP);
            mv.visitInsn(ICONST_0);
            mv.visitInsn(IRETURN);
          mv.visitLabel(label);

          AsmUtil.intValue(mv);
        }
        mv.visitInsn(IRETURN);
        break;

      case 'Z':
        if (isLast == true) {
          mv.visitInsn(DUP);
          Label label = new Label();
          mv.visitJumpInsn(IFNONNULL, label);
            mv.visitInsn(POP);
            mv.visitInsn(ICONST_0);
            mv.visitInsn(IRETURN);
          mv.visitLabel(label);

          AsmUtil.booleanValue(mv);
        }
        mv.visitInsn(IRETURN);
        break;

      case 'J':
        if (isLast == true) {
          mv.visitInsn(DUP);
          Label label = new Label();
          mv.visitJumpInsn(IFNONNULL, label);
            mv.visitInsn(POP);
            mv.visitInsn(LCONST_0);
            mv.visitInsn(LRETURN);
          mv.visitLabel(label);

          AsmUtil.longValue(mv);
        }
        mv.visitInsn(LRETURN);
        break;

      case 'F':
        if (isLast == true) {
          mv.visitInsn(DUP);
          Label label = new Label();
          mv.visitJumpInsn(IFNONNULL, label);
            mv.visitInsn(POP);
            mv.visitInsn(FCONST_0);
            mv.visitInsn(FRETURN);
          mv.visitLabel(label);

          AsmUtil.floatValue(mv);
        }
        mv.visitInsn(FRETURN);
        break;

      case 'D':
        if (isLast == true) {
          mv.visitInsn(DUP);
          Label label = new Label();
          mv.visitJumpInsn(IFNONNULL, label);
            mv.visitInsn(POP);
            mv.visitInsn(DCONST_0);
            mv.visitInsn(DRETURN);
          mv.visitLabel(label);
View Full Code Here

        break;

      case 'B':
        if (isLast == true) {
          mv.visitInsn(DUP);
          Label label = new Label();
          mv.visitJumpInsn(IFNONNULL, label);
            mv.visitInsn(POP);
            mv.visitInsn(ICONST_0);
            mv.visitInsn(IRETURN);
          mv.visitLabel(label);

          AsmUtil.byteValue(mv);
        }
        mv.visitInsn(IRETURN);
        break;

      case 'C':
        if (isLast == true) {
          mv.visitInsn(DUP);
          Label label = new Label();
          mv.visitJumpInsn(IFNONNULL, label);
            mv.visitInsn(POP);
            mv.visitInsn(ICONST_0);
            mv.visitInsn(IRETURN);
          mv.visitLabel(label);

          AsmUtil.charValue(mv);
        }
        mv.visitInsn(IRETURN);
        break;

      case 'S':
        if (isLast == true) {
          mv.visitInsn(DUP);
          Label label = new Label();
          mv.visitJumpInsn(IFNONNULL, label);
            mv.visitInsn(POP);
            mv.visitInsn(ICONST_0);
            mv.visitInsn(IRETURN);
          mv.visitLabel(label);

          AsmUtil.shortValue(mv);
        }
        mv.visitInsn(IRETURN);
        break;

      case 'I':
        if (isLast == true) {
          mv.visitInsn(DUP);
          Label label = new Label();
          mv.visitJumpInsn(IFNONNULL, label);
            mv.visitInsn(POP);
            mv.visitInsn(ICONST_0);
            mv.visitInsn(IRETURN);
          mv.visitLabel(label);

          AsmUtil.intValue(mv);
        }
        mv.visitInsn(IRETURN);
        break;

      case 'Z':
        if (isLast == true) {
          mv.visitInsn(DUP);
          Label label = new Label();
          mv.visitJumpInsn(IFNONNULL, label);
            mv.visitInsn(POP);
            mv.visitInsn(ICONST_0);
            mv.visitInsn(IRETURN);
          mv.visitLabel(label);

          AsmUtil.booleanValue(mv);
        }
        mv.visitInsn(IRETURN);
        break;

      case 'J':
        if (isLast == true) {
          mv.visitInsn(DUP);
          Label label = new Label();
          mv.visitJumpInsn(IFNONNULL, label);
            mv.visitInsn(POP);
            mv.visitInsn(LCONST_0);
            mv.visitInsn(LRETURN);
          mv.visitLabel(label);

          AsmUtil.longValue(mv);
        }
        mv.visitInsn(LRETURN);
        break;

      case 'F':
        if (isLast == true) {
          mv.visitInsn(DUP);
          Label label = new Label();
          mv.visitJumpInsn(IFNONNULL, label);
            mv.visitInsn(POP);
            mv.visitInsn(FCONST_0);
            mv.visitInsn(FRETURN);
          mv.visitLabel(label);

          AsmUtil.floatValue(mv);
        }
        mv.visitInsn(FRETURN);
        break;

      case 'D':
        if (isLast == true) {
          mv.visitInsn(DUP);
          Label label = new Label();
          mv.visitJumpInsn(IFNONNULL, label);
            mv.visitInsn(POP);
            mv.visitInsn(DCONST_0);
            mv.visitInsn(DRETURN);
          mv.visitLabel(label);
View Full Code Here

            }
            final FieldInfo fieldInfo = testFieldInfo;
            return new FieldVisitor(Opcodes.ASM4, toWrap) {
                @Override
                public AnnotationVisitor visitAnnotation(final String desc, final boolean visible) {
                    final AnnotationVisitor toWrap = super.visitAnnotation(desc, visible);
                    return visible ? toWrap : new TopLevelAnnotationInflater(desc, toWrap, fieldInfo);
                }
            };
        }
View Full Code Here

            }
            final MethodInfo methodInfo = testMethodInfo;
            return new MethodVisitor(Opcodes.ASM4, toWrap) {
                @Override
                public AnnotationVisitor visitAnnotation(final String desc, final boolean visible) {
                    final AnnotationVisitor toWrap = super.visitAnnotation(desc, visible);
                    return visible ? toWrap : new TopLevelAnnotationInflater(desc, toWrap, methodInfo);
                }

                @Override
                public AnnotationVisitor visitParameterAnnotation(final int param, final String desc,
                    final boolean visible) {
                    final AnnotationVisitor toWrap = super.visitParameterAnnotation(param, desc, visible);
                    if (visible) {
                        return toWrap;
                    }
                    ParameterInfo parameterInfo = null;
View Full Code Here

            };
        }

        @Override
        public AnnotationVisitor visitAnnotation(final String desc, final boolean visible) {
            final AnnotationVisitor toWrap = super.visitAnnotation(desc, visible);
            return visible ? toWrap : new TopLevelAnnotationInflater(desc, toWrap, wrapped.getInfo());
        }
View Full Code Here

    private static byte[] toJava7ByteArray(BCClass bc, byte[] classBytes) throws IOException {
        ByteArrayInputStream bais = new ByteArrayInputStream(classBytes);
        BufferedInputStream bis = new BufferedInputStream(bais);

        ClassWriter cw = new BCClassWriter(ClassWriter.COMPUTE_FRAMES, bc.getClassLoader());
        ClassReader cr = new ClassReader(bis);
        cr.accept(cw, 0);
        return cw.toByteArray();
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    protected void readClassDef(final InputStream bytecode) throws IOException {
        try {
            final ClassReader classReader = new ClassReader(bytecode);
            classReader.accept(new Visitor(new InfoBuildingVisitor()), ASM_FLAGS);
        } finally {
            bytecode.close();
        }
    }
View Full Code Here

            final URL resource = classLoader.getResource(className);
            if (resource != null) {
                InputStream in = resource.openStream();
                in = new BufferedInputStream(in);
                try {
                    final ClassReader classReader = new ClassReader(in);
                    classReader.accept(visitor, ASM_FLAGS);
                } finally {
                    in.close();
                }
            } else {
                new Exception("Could not load " + className).printStackTrace();
View Full Code Here

    private static void file(final File file, final KeysAnnotationVisitor visitor) {
        try {
            final InputStream in = IO.read(file);
            try {
                final ClassReader classReader = new ClassReader(in);
                classReader.accept(visitor, ClassWriter.COMPUTE_MAXS);
            } finally {
                IO.close(in);
            }
        } catch (IOException e) {
            e.printStackTrace();
View Full Code Here

TOP

Related Classes of org.apache.xbean.asm4.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.