Examples of AnnotationType


Examples of com.sun.mirror.type.AnnotationType

    }
   
    public Collection<Annotation> getAnnotations() {
        Collection<Annotation> annotations = new ArrayList<Annotation>();
        for (AnnotationMirror am : decl.getAnnotationMirrors()) {
            AnnotationType at = am.getAnnotationType();
            try {
                Class clazz = Class.forName(at.getDeclaration().getQualifiedName());
                Annotation a = decl.getAnnotation(clazz);
                if (null != a) {
                    annotations.add(a);
                }
            } catch (ClassNotFoundException e) {
View Full Code Here

Examples of com.sun.mirror.type.AnnotationType

        // for each annotations defined on the declaration, if the annotation
        // is a PropertySet, ensure the values assigned to the properties
        // satisfy all PropertySet and PropertyType constraints.
        for (AnnotationMirror m : mirrors)
        {
            AnnotationType type = m.getAnnotationType();
            AnnotationTypeDeclaration decl = m.getAnnotationType().getDeclaration();
            if (decl.getAnnotation(PropertySet.class) != null)
            {
                Iterator<Map.Entry<AnnotationTypeElementDeclaration, AnnotationValue>> i = m
                        .getElementValues().entrySet().iterator();
View Full Code Here

Examples of com.sun.mirror.type.AnnotationType

            Declaration decl)
    {
        Collection<Annotation> annotations = new ArrayList<Annotation>();
        for (AnnotationMirror am : decl.getAnnotationMirrors())
        {
            AnnotationType at = am.getAnnotationType();
            try
            {
                if (at.getContainingType() == null)
                    continue;
                String containingClassName = at.getContainingType()
                        .getDeclaration().getQualifiedName();
                if (containingClassName.equals(AnnotationMemberTypes.class
                        .getName()))
                {
                    String memberTypeName = at.getDeclaration().getSimpleName();
                    Class clazz = Class.forName(containingClassName + "$"
                            + memberTypeName);
                    Annotation a = decl.getAnnotation(clazz);
                    if (null != a)
                    {
View Full Code Here

Examples of com.sun.mirror.type.AnnotationType

    }
   
    public Collection<Annotation> getAnnotations() {
        Collection<Annotation> annotations = new ArrayList<Annotation>();
        for (AnnotationMirror am : decl.getAnnotationMirrors()) {
            AnnotationType at = am.getAnnotationType();
            try {
                Class clazz = Class.forName(at.getDeclaration().getQualifiedName());
                Annotation a = decl.getAnnotation(clazz);
                if (null != a) {
                    annotations.add(a);
                }
            }
View Full Code Here

Examples of com.sun.mirror.type.AnnotationType

    }
   
    public Collection<Annotation> getAnnotations() {
        Collection<Annotation> annotations = new ArrayList<Annotation>();
        for (AnnotationMirror am : decl.getAnnotationMirrors()) {
            AnnotationType at = am.getAnnotationType();
            try {
                Class clazz = Class.forName(at.getDeclaration().getQualifiedName());
                Annotation a = decl.getAnnotation(clazz);
                if (null != a) {
                    annotations.add(a);
                }
            } catch (ClassNotFoundException e) {
View Full Code Here

Examples of com.sun.mirror.type.AnnotationType

        // Iterate over annotations on operation, looking for interceptor-based ones
        Collection<AnnotationMirror> annotations = _methodDecl.getAnnotationMirrors();
        for ( AnnotationMirror a : annotations )
        {
            AnnotationType at = a.getAnnotationType();
            AnnotationTypeDeclaration atd = at.getDeclaration();
            Collection<AnnotationMirror> metaAnnotations = atd.getAnnotationMirrors();

            // Look for annotations that are meta-annotated with @InterceptorAnnotation
            for ( AnnotationMirror ma : metaAnnotations )
            {
View Full Code Here

Examples of com.sun.mirror.type.AnnotationType

    private static Collection<Annotation> getMemberTypeAnnotations(Declaration decl)
    {
        Collection<Annotation> annotations = new ArrayList<Annotation>();
        for (AnnotationMirror am : decl.getAnnotationMirrors())
        {
            AnnotationType at = am.getAnnotationType();
            try
            {
                if (at.getContainingType() == null)
                    continue;
                String containingClassName = at.getContainingType()
                        .getDeclaration().getQualifiedName();
                if (containingClassName.equals(AnnotationMemberTypes.class
                        .getName()))
                {
                    String memberTypeName = at.getDeclaration().getSimpleName();
                    Class clazz = Class.forName(containingClassName + "$"
                            + memberTypeName);
                    Annotation a = decl.getAnnotation(clazz);
                    if (null != a)
                    {
View Full Code Here

Examples of com.sun.mirror.type.AnnotationType

        // Iterate over annotations on operation, looking for interceptor-based ones
        Collection<AnnotationMirror> annotations = _methodDecl.getAnnotationMirrors();
        for ( AnnotationMirror a : annotations )
        {
            AnnotationType at = a.getAnnotationType();
            AnnotationTypeDeclaration atd = at.getDeclaration();

            /*
            When performing annotation processing, the ATD here might be null if the apt.exe runtime
            is unable to resolve the type to something specific.  This will happen when a type referenced
            in a source file is invalid because of a bad / missing import, mis-spelling, etc.  When
View Full Code Here

Examples of com.sun.mirror.type.AnnotationType

    private static Collection<Annotation> getMemberTypeAnnotations(Declaration decl)
    {
        Collection<Annotation> annotations = new ArrayList<Annotation>();
        for (AnnotationMirror am : decl.getAnnotationMirrors())
        {
            AnnotationType at = am.getAnnotationType();
            try
            {
                if (at.getContainingType() == null)
                    continue;
                String containingClassName = at.getContainingType()
                        .getDeclaration().getQualifiedName();
                if (containingClassName.equals(AnnotationMemberTypes.class
                        .getName()))
                {
                    String memberTypeName = at.getDeclaration().getSimpleName();
                    Class clazz = Class.forName(containingClassName + "$"
                            + memberTypeName);
                    Annotation a = decl.getAnnotation(clazz);
                    if (null != a)
                    {
View Full Code Here

Examples of com.sun.mirror.type.AnnotationType

        // Iterate over annotations on operation, looking for interceptor-based ones
        Collection<AnnotationMirror> annotations = _methodDecl.getAnnotationMirrors();
        for ( AnnotationMirror a : annotations )
        {
            AnnotationType at = a.getAnnotationType();
            AnnotationTypeDeclaration atd = at.getDeclaration();

            /*
            When performing annotation processing, the ATD here might be null if the apt.exe runtime
            is unable to resolve the type to something specific.  This will happen when a type referenced
            in a source file is invalid because of a bad / missing import, mis-spelling, etc.  When
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.