Package org.codehaus.aspectwerkz.annotation

Examples of org.codehaus.aspectwerkz.annotation.AnnotationInfo


     * @return the annotation or null
     */
    public static Annotation getAnnotation(final String annotationName, final MethodInfo methodInfo) {
        List annotations = methodInfo.getAnnotations();
        for (Iterator it = annotations.iterator(); it.hasNext();) {
            AnnotationInfo annotationInfo = (AnnotationInfo)it.next();
            if (annotationInfo.getName().equals(annotationName)) {
                return annotationInfo.getAnnotation();
            }
        }
        return null;
    }
View Full Code Here


     * @return the annotation or null
     */
    public static Annotation getAnnotation(final String annotationName, final ConstructorInfo constructorInfo) {
        List annotations = constructorInfo.getAnnotations();
        for (Iterator it = annotations.iterator(); it.hasNext();) {
            AnnotationInfo annotationInfo = (AnnotationInfo)it.next();
            if (annotationInfo.getName().equals(annotationName)) {
                return annotationInfo.getAnnotation();
            }
        }
        return null;
    }
View Full Code Here

     * @return the annotation or null
     */
    public static Annotation getAnnotation(final String annotationName, final FieldInfo fieldInfo) {
        List annotations = fieldInfo.getAnnotations();
        for (Iterator it = annotations.iterator(); it.hasNext();) {
            AnnotationInfo annotationInfo = (AnnotationInfo)it.next();
            if (annotationInfo.getName().equals(annotationName)) {
                return annotationInfo.getAnnotation();
            }
        }
        return null;
    }
View Full Code Here

     * @return the annotations in a list (can be empty)
     */
    public static List getAnnotations(final String annotationName, final ClassInfo classInfo) {
        List annotations = new ArrayList();
        for (Iterator it = classInfo.getAnnotations().iterator(); it.hasNext();) {
            AnnotationInfo annotationInfo = (AnnotationInfo)it.next();
            if (annotationInfo.getName().equals(annotationName)) {
                annotations.add(annotationInfo.getAnnotation());
            }
        }
        return annotations;
    }
View Full Code Here

     * @return the annotations in a list (can be empty)
     */
    public static List getAnnotations(final String annotationName, final MethodInfo methodInfo) {
        List annotations = new ArrayList();
        for (Iterator it = methodInfo.getAnnotations().iterator(); it.hasNext();) {
            AnnotationInfo annotationInfo = (AnnotationInfo)it.next();
            if (annotationInfo.getName().equals(annotationName)) {
                annotations.add(annotationInfo.getAnnotation());
            }
        }
        return annotations;
    }
View Full Code Here

     * @return the annotations in a list (can be empty)
     */
    public static List getAnnotations(final String annotationName, final ConstructorInfo constructorInfo) {
        List annotations = new ArrayList();
        for (Iterator it = constructorInfo.getAnnotations().iterator(); it.hasNext();) {
            AnnotationInfo annotationInfo = (AnnotationInfo)it.next();
            if (annotationInfo.getName().equals(annotationName)) {
                annotations.add(annotationInfo.getAnnotation());
            }
        }
        return annotations;
    }
View Full Code Here

     * @return the annotations in a list (can be empty)
     */
    public static List getAnnotations(final String annotationName, final FieldInfo fieldInfo) {
        List annotations = new ArrayList();
        for (Iterator it = fieldInfo.getAnnotations().iterator(); it.hasNext();) {
            AnnotationInfo annotationInfo = (AnnotationInfo)it.next();
            if (annotationInfo.getName().equals(annotationName)) {
                annotations.add(annotationInfo.getAnnotation());
            }
        }
        return annotations;
    }
View Full Code Here

                for (Iterator it = ((RuntimeInvisibleAnnotations) current).annotations.iterator(); it.hasNext();) {
                    Annotation annotation = (Annotation) it.next();
                    if (CustomAttribute.TYPE.equals(annotation.type)) {
                        annotations.add(CustomAttributeHelper.extractCustomAnnotation(annotation));
                    } else {
                        AnnotationInfo annotationInfo = AsmClassInfo.getAnnotationInfo(
                                annotation,
                                loader
                        );
                        annotations.add(annotationInfo);
                    }
                }
            } else if (current instanceof RuntimeVisibleAnnotations) {
                for (Iterator it = ((RuntimeVisibleAnnotations) current).annotations.iterator(); it.hasNext();) {
                    Annotation annotation = (Annotation) it.next();
                    AnnotationInfo annotationInfo = AsmClassInfo.getAnnotationInfo(
                            annotation,
                            loader
                    );
                    annotations.add(annotationInfo);
                }
View Full Code Here

    public Object visit(ASTAttribute node, Object data) {
        // called for class level annotation matching f.e. in a within context
        List annotations = (List) data;
        for (Iterator it = annotations.iterator(); it.hasNext();) {
            AnnotationInfo annotation = (AnnotationInfo) it.next();
            if (annotation.getName().equals(node.getName())) {
                return Boolean.TRUE;
            }
        }
        return Boolean.FALSE;
    }
View Full Code Here

                for (Iterator it = ((RuntimeInvisibleAnnotations)attributes).annotations.iterator(); it.hasNext();) {
                    Annotation annotation = (Annotation)it.next();
                    if (CustomAttribute.TYPE.equals(annotation.type)) {
                        m_annotations.add(CustomAttributeHelper.extractCustomAnnotation(annotation));
                    } else {
                        AnnotationInfo annotationInfo = AsmClassInfo.getAnnotationInfo(
                                annotation,
                                (ClassLoader)m_loaderRef.get()
                        );
                        m_annotations.add(annotationInfo);
                    }
                }
            }
            if (attributes instanceof RuntimeVisibleAnnotations) {
                for (Iterator it = ((RuntimeVisibleAnnotations)attributes).annotations.iterator(); it.hasNext();) {
                    Annotation annotation = (Annotation)it.next();
                    AnnotationInfo annotationInfo = AsmClassInfo.getAnnotationInfo(
                            annotation,
                            (ClassLoader)m_loaderRef.get()
                    );
                    m_annotations.add(annotationInfo);
                }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.annotation.AnnotationInfo

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.