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 ClassInfo classInfo) {
        List annotations = classInfo.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 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

        List annotations = (List) data;

        for (Iterator it = annotations.iterator(); it.hasNext();) {

            AnnotationInfo annotation = (AnnotationInfo) it.next();

            if (annotation.getName().equals(node.getName())) {

                matchAnnotation = true;

            }
View Full Code Here

        List annotations = (List) data;

        for (Iterator it = annotations.iterator(); it.hasNext();) {

            AnnotationInfo annotation = (AnnotationInfo) it.next();

            if (annotation.getName().equals(node.getName())) {

                matchAnnotation = true;

            }
View Full Code Here

        ClassInfo klass = AsmClassInfo.getClassInfo("test.annotation.AnnotationLoadingTarget", AnnotationLoadingTest.class.getClassLoader());

        MethodInfo m = klass.getMethods()[0];

        AnnotationInfo annInfo = (AnnotationInfo) m.getAnnotations().get(0);



        System.out.println("DONE");

        System.out.println(annInfo.getAnnotation());

        AnnotationParserTest.Complex c = ((AnnotationParserTest.Complex)annInfo.getAnnotation());

        System.out.println(c.klass().getName());

        System.out.println(c.toString());
View Full Code Here



    public void testDefaultedAnnotation() {

        AnnotationInfo annI = (AnnotationInfo) getAnnotatedMethod().getAnnotations().get(0);

        DefaultedAnnotation ann = (DefaultedAnnotation) annI.getAnnotation();



        // string
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.