Package org.objectweb.asm

Examples of org.objectweb.asm.AnnotationVisitor


            accept(av);
        }
    }

    public void accept(final AnnotationDiscovery visitor) {
        AnnotationVisitor av = visitor.visitAnnotation(m_desc);
        if (av != null) {
            accept(av);
        }
    }


        m_name = name;
        m_sub = sub;
    }

    public void accept(final AnnotationVisitor visitor) {
        AnnotationVisitor child = visitor.visitArray(m_name);
        if (child != null) {
            m_sub.accept(child);
        }
    }

        m_desc = desc;
        m_sub = sub;
    }

    public void accept(final AnnotationVisitor visitor) {
        AnnotationVisitor child = visitor.visitAnnotation(m_name, m_desc);
        if (child != null) {
            m_sub.accept(child);
        }
    }

        if (name.equals("specifications")) {
            return new InterfaceArrayVisitor();
        } else if (name.equals("properties")) {
            // Create a new simple visitor to visit the nested ServiceProperty annotations
            // Collected properties are collected in m_prov
            return new AnnotationVisitor(Opcodes.ASM5) {
                public AnnotationVisitor visitAnnotation(String ignored, String desc) {
                    return new FieldPropertyVisitor(m_prov);
                }
            };
        } else {

    }

    public AnnotationVisitor visitAnnotation(final String name, final String desc) {
        ChainedAnnotationVisitor chain = null;
        for (AnnotationVisitor visitor : m_visitors) {
            AnnotationVisitor child = visitor.visitAnnotation(name, desc);
            if (child != null) {
                if (chain == null) {
                    chain = new ChainedAnnotationVisitor();
                }
                chain.getVisitors().add(child);

    }

    public AnnotationVisitor visitArray(final String name) {
        ChainedAnnotationVisitor chain = null;
        for (AnnotationVisitor visitor : m_visitors) {
            AnnotationVisitor child = visitor.visitArray(name);
            if (child != null) {
                if (chain == null) {
                    chain = new ChainedAnnotationVisitor();
                }
                chain.getVisitors().add(child);


    private void collectMatchingVisitors(List<Binding> bindings, BindingContext context, List<AnnotationVisitor> visitors) {
        for (Binding binding : bindings) {
            if (binding.getPredicate().matches(context)) {
                AnnotationVisitor visitor = binding.getFactory().newAnnotationVisitor(context);
                if (visitor != null) {
                    visitors.add(visitor);
                }
            }
        }

    }

    public AnnotationVisitor visitAnnotation(final String desc) {
        ChainedAnnotationVisitor chain = null;
        for (AnnotationDiscovery discovery : m_discoveries) {
            AnnotationVisitor visitor = discovery.visitAnnotation(desc);
            if (visitor != null) {
                if (chain == null) {
                    chain = new ChainedAnnotationVisitor();
                }
                chain.getVisitors().add(visitor);

            }
        }
        return values;
    }
    public void accept(final FieldVisitor visitor) {
        AnnotationVisitor av = visitor.visitAnnotation(m_annotationType.getDescriptor(),
                                                       true);
        if (av != null) {
            accept(av);
        }
    }

            accept(av);
        }
    }

    public void accept(final ClassVisitor visitor) {
        AnnotationVisitor av = visitor.visitAnnotation(m_annotationType.getDescriptor(),
                                                       true);
        if (av != null) {
            accept(av);
        }
    }

TOP

Related Classes of org.objectweb.asm.AnnotationVisitor

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.