Package com.sun.javadoc

Examples of com.sun.javadoc.ClassDoc.fields()


      }

      // process classDoc and it's superClassDoc
      while (null != classDoc) {
        if (classDoc.simpleTypeName().equals("Object")) break;
        FieldDoc[] fields = classDoc.fields(false);
        for (int j = 0; j < fields.length; j++) {
          FieldDoc field = fields[j];
          if (field.isTransient() || field.isStatic() || field.isEnum()) continue;
          String columnComment = processComment(fields[j].commentText());
View Full Code Here


      }

      // process classDoc and it's superClassDoc
      while (null != classDoc) {
        if (classDoc.simpleTypeName().equals("Object")) break;
        FieldDoc[] fields = classDoc.fields(false);
        for (int j = 0; j < fields.length; j++) {
          FieldDoc field = fields[j];
          if (field.isTransient() || field.isStatic() || field.isEnum()) continue;
          String simpleTypeName = field.type().simpleTypeName();
View Full Code Here

          pw.format("  <dt><a href=\"%s%s.html\">%s</a></dt>\n", packURL,
              cls.name(), cls.name());

          // Print out all fields
          Collection<FieldDoc> fields = new ArrayList<FieldDoc>();
          fields.addAll(Arrays.asList(cls.fields(true)));

          if (!fields.isEmpty()) {
            pw.format("  <dd style='margin-bottom: 0.5em;'>%s</dd>\n", createFieldList(fields));
          }
View Full Code Here

         Field f = null;
         try {
            f = c.getDeclaredField(fieldName);
         } catch (NoSuchFieldException e) {
            ClassDoc classDoc = rootDoc.classNamed(c.getName());
            for (FieldDoc fd : classDoc.fields()) {
               for (Tag t : fd.tags(CONFIG_REF)) {
                  Map<String, String> m = parseTag(t.text().trim());
                  String field = m.get("name");
                  if (field != null && field.startsWith(fieldName)) {
                     fieldName = fd.name();
View Full Code Here

   }

   private FieldDoc findFieldDocRecursively(Class<?> c, String fieldName, String tagName) {
      while (true) {
         ClassDoc classDoc = rootDoc.classNamed(c.getName());
         for (FieldDoc fd : classDoc.fields()) {
            if (fd.name().equalsIgnoreCase(fieldName)) {
               return fd;
            }
            for (Tag t : fd.tags(tagName)) {
               Map<String, String> m = parseTag(t.text().trim());
View Full Code Here

      }
   }

   private FieldDoc fieldDocWithTag(Class<?> c, String tagName) {
      ClassDoc classDoc = rootDoc.classNamed(c.getName());
      for (FieldDoc fd : classDoc.fields()) {
         if (fd.tags(tagName).length > 0)
            return fd;

      }
      if (c.getSuperclass() != null)
View Full Code Here

        ClassDoc doc = (ClassDoc) container;
        replaceMessagerRecursively(newMessager,
            (Object[]) doc.constructors());
        replaceMessagerRecursively(newMessager,
            (Object[]) doc.methods());
        replaceMessagerRecursively(newMessager, (Object[]) doc.fields());
        replaceMessagerRecursively(newMessager,
            (Object[]) doc.innerClasses());
      }
    }
View Full Code Here

         for (MethodDoc md : classDoc.methods()) {
            if (md.name().equalsIgnoreCase(elementName)) {
               return md;
            }
         }
         for (FieldDoc fd : classDoc.fields()) {
            if (fd.name().equalsIgnoreCase(elementName)) {
               return fd;
            }
         }
         if (c.getSuperclass() != null) {
View Full Code Here

            // nested nodes are constructors, methods or fields.
            ClassDoc cd = (ClassDoc) dynamicProxyInstance();
            inclusionRequired =
              cd.constructors().length > 0 ||
              cd.methods().length > 0 ||
              cd.fields().length > 0 ||
              cd.enumConstants().length > 0;
            if (! inclusionRequired && cd instanceof AnnotationTypeDoc) {
              AnnotationTypeDoc atd = (AnnotationTypeDoc) cd;
              inclusionRequired = atd.elements().length > 0;
            }
View Full Code Here

            throw new RuntimeException("Tried to get docs for enum " + enumClass + " but got null instead");

        final Set<String> enumConstantFieldNames = enumConstantsNames(enumClass);

        final List<Map<String, Object>> bindings = new ArrayList<Map<String, Object>>();
        for (final FieldDoc fieldDoc : doc.fields(false)) {
            if (enumConstantFieldNames.contains(fieldDoc.name()) )
                bindings.add(
                        new HashMap<String, Object>() {{
                            put("name", fieldDoc.name());
                            put("summary", fieldDoc.commentText());
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.