Package com.sun.javadoc

Examples of com.sun.javadoc.AnnotationTypeDoc


      RootDoc docInstance = (RootDoc) doc;
      return "Javadoc";
    }
    else if (doc instanceof AnnotationTypeDoc)
    {
      AnnotationTypeDoc docInstance = (AnnotationTypeDoc) doc;
      return "AnnotationType " + docInstance.name();
    }
    else if (doc instanceof AnnotationTypeElementDoc)//is subinterface of method so it must com before the MethodDoc
    {
      AnnotationTypeElementDoc docInstance = (AnnotationTypeElementDoc) doc;
      return "AnnotationTypeElement " + docInstance.name();
    }
    else if (doc instanceof MethodDoc)
    {
      MethodDoc docInstance = (MethodDoc) doc;
      return "Method " + docInstance.name();
    }
    else if (doc instanceof ClassDoc)
    {
      ClassDoc docInstance = (ClassDoc) doc;
      return "Class " + docInstance.name();
    }
    else if (doc instanceof ConstructorDoc)
    {
      ConstructorDoc docInstance = (ConstructorDoc) doc;
      return "Constructor " + docInstance.name();
    }
    else if (doc instanceof FieldDoc)
    {
      FieldDoc docInstance = (FieldDoc) doc;
      return "Field " + docInstance.name();
    }
    else if (doc instanceof PackageDoc)
    {
      PackageDoc docInstance = (PackageDoc) doc;
      return "Package " + docInstance.name();
    }
    else
    {
      return  doc.getClass().getName();
    }
View Full Code Here


      MBeanComponent mbc = new MBeanComponent();
      mbc.className = cd.qualifiedTypeName();
      mbc.name = cd.typeName();

      for (AnnotationDesc a : cd.annotations()) {
         AnnotationTypeDoc atd = a.annotationType();
         String annotationName = atd.qualifiedTypeName();

         if (annotationName.equals(MBean.class.getName())) {
            isMBean = true;
            setNameDesc(a.elementValues(), mbc);
         }
View Full Code Here

    return findAnnotation(pack.annotations(), soughtAnnotations);
  }
 
  public static AnnotationDesc findAnnotation(final AnnotationDesc[] annotations, final Class<?>... soughtAnnotations) {
    for (final AnnotationDesc annotation : annotations) {
      final AnnotationTypeDoc annotationType = annotation.annotationType();
      for (final Class<?> soughtAnnotation : soughtAnnotations) {
        if (annotationType.qualifiedTypeName().equals(soughtAnnotation.getName())) {
          return annotation;
        }
      }
    }
    return null;
View Full Code Here

    return null;
  }

  public static AnnotationDesc findAnnotation(final AnnotationDesc[] annotations, final String... soughtAnnotations) {
    for (final AnnotationDesc annotation : annotations) {
      final AnnotationTypeDoc annotationType = annotation.annotationType();
      for (final String soughtAnnotation : soughtAnnotations) {
        if (annotationType.qualifiedTypeName().equals(soughtAnnotation)) {
          return annotation;
        }
      }
    }
    return null;
View Full Code Here

  }

  public static List<AnnotationDesc> findAnnotations(final AnnotationDesc[] annotations, final Class<?>... soughtAnnotations) {
    List<AnnotationDesc> ret = new LinkedList<AnnotationDesc>();
    for (final AnnotationDesc annotation : annotations) {
      final AnnotationTypeDoc annotationType = annotation.annotationType();
      for (final Class<?> soughtAnnotation : soughtAnnotations) {
        if (annotationType.qualifiedTypeName().equals(soughtAnnotation.getName())) {
          ret.add(annotation);
        }
      }
    }
    return ret;
View Full Code Here

  private cc.catalysts.cdoclet.generator.Type checkAnnotations(AnnotationDesc[] annotationDescs) {
    cc.catalysts.cdoclet.generator.Type fieldType = null;

    for (AnnotationDesc annotationDesc : annotationDescs) {
      AnnotationTypeDoc annotationTypeDoc = annotationDesc.annotationType();
      fieldType = GeneratorUtils.getAnnotationType(annotationTypeDoc.qualifiedTypeName(), getGenerator());
      if (fieldType != null) break;
    }

    return fieldType;
  }
View Full Code Here

TOP

Related Classes of com.sun.javadoc.AnnotationTypeDoc

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.