Package org.apache.xbean.asm5.shade.commons

Examples of org.apache.xbean.asm5.shade.commons.EmptyVisitor


            if ("Ljavax/persistence/PersistenceContext;".equals(desc)) {
                return new PersistenceContextVisitor(className, currentName, contexts);
            } else if ("Ljavax/persistence/PersistenceContexts;".equals(desc)) {
                return super.visitAnnotation(name, desc);
            }
            return new EmptyVisitor().annotationVisitor();
        }
View Full Code Here


            return annotationVisitor();
        }

        @Override
        public AnnotationVisitor visitMethodParameterAnnotation(int i, String string, boolean b) {
            return new EmptyVisitor().annotationVisitor();
        }
View Full Code Here

            return new EmptyVisitor().annotationVisitor();
        }

        @Override
        public AnnotationVisitor visitParameterAnnotation(int i, String string, boolean b) {
            return new EmptyVisitor().annotationVisitor();
        }
View Full Code Here

            return new EmptyVisitor().annotationVisitor();
        }

        @Override
        public AnnotationVisitor visitAnnotationDefault() {
            return new EmptyVisitor().annotationVisitor();
        }
View Full Code Here

                persistenceContext.type = value;
            }
        }

        public AnnotationVisitor visitArray(String string) {
            return new EmptyVisitor() {
                private String name;
                private String value;

                public void visit(String n, Object v) {
                    if ("name".equals(n)) {
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

    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_FRAMES);
            } finally {
                IO.close(in);
            }
        } catch (final IOException e) {
            e.printStackTrace();
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

            return;
        }

        try {
            final URL u = c.getResource("/" + c.getName().replace('.', '/') + ".class");
            final ClassReader r = new ClassReader(IO.read(u));
            r.accept(new PersistenceContextReader(contexts), ClassReader.SKIP_DEBUG);
        } catch (final IOException e) {
            throw new OpenEJBException("Unable to read class " + c.getName());
        }

        processed.add(c.getName());
View Full Code Here

        // Move all the annotations onto the newly implemented methods
        // Ensures CDI and JAX-RS and JAX-WS still work
        Class clazz = classToProxy;
        while (clazz != null && !clazz.equals(Object.class)) {
            try {
                final ClassReader classReader = new ClassReader(readClassFile(clazz));
                final ClassVisitor copyMethodAnnotations = new CopyMethodAnnotations(visitors);
                classReader.accept(copyMethodAnnotations, ClassReader.SKIP_CODE);
            } catch (final IOException e) {
                throw new ProxyGenerationException(e);
            }
            clazz = clazz.getSuperclass();
        }
View Full Code Here

TOP

Related Classes of org.apache.xbean.asm5.shade.commons.EmptyVisitor

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.