Package com.sun.mirror.type

Examples of com.sun.mirror.type.AnnotationType


        }
      }

      Collection<AnnotationMirror> annotationMirrors = declaration.getAnnotationMirrors();
      for (AnnotationMirror annotationMirror : annotationMirrors) {
        AnnotationType annotationType = annotationMirror.getAnnotationType();
        if (annotationType != null) {
          AnnotationTypeDeclaration annotationDeclaration = annotationType.getDeclaration();
          facet = annotationDeclaration.getAnnotation(org.codehaus.enunciate.Facet.class);
          if (facet != null) {
            bucket.add(new Facet(facet, annotationDeclaration.getSimpleName()));
          }
          facets = annotationDeclaration.getAnnotation(Facets.class);
View Full Code Here


   * @return Whether the specified member declaration is explicitly declared to be an accessor.
   */
  protected boolean explicitlyDeclaredAccessor(MemberDeclaration declaration) {
    Collection<AnnotationMirror> annotationMirrors = declaration.getAnnotationMirrors();
    for (AnnotationMirror annotationMirror : annotationMirrors) {
      AnnotationType annotationType = annotationMirror.getAnnotationType();
      if (annotationType != null) {
        AnnotationTypeDeclaration annotationDeclaration = annotationType.getDeclaration();
        if ((annotationDeclaration != null) && (annotationDeclaration.getQualifiedName().startsWith(XmlElement.class.getPackage().getName()))) {
          //if it's annotated with anything in javax.xml.bind.annotation, (exception XmlTransient) we'll consider it to be "explicitly annotated."
          return !annotationDeclaration.getQualifiedName().equals(XmlTransient.class.getName());
        }
      }
View Full Code Here

    //it's a JAX-RS resource if any method has either a @Path or a resource method designator.
    Collection<? extends MethodDeclaration> methods = declaration.getMethods();
    for (MethodDeclaration method : methods) {
      for (AnnotationMirror mirror : method.getAnnotationMirrors()) {
        AnnotationType type = mirror.getAnnotationType();
        if (type.getDeclaration() != null && type.getDeclaration().getAnnotation(HttpMethod.class) != null) {
          return true;
        }
      }
    }
View Full Code Here

TOP

Related Classes of com.sun.mirror.type.AnnotationType

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.