Package com.sun.javadoc

Examples of com.sun.javadoc.FieldDoc


      if (!pkg.startsWith("java.")) {
        return;
      }
      jreLink += pkg.replace('.', '/') + "/package-summary.html";
    } else if (doc instanceof FieldDoc) {
      FieldDoc fieldDoc = (FieldDoc) doc;
      String pkg = enclosing.containingPackage().name();
      if (!pkg.startsWith("java.")) {
        return;
      }
      String clazz = fieldDoc.containingClass().name();
      String field = fieldDoc.name();

      jreLink += pkg.replace('.', '/') + "/";
      jreLink += clazz;
      jreLink += ".html";
      jreLink += "#";
View Full Code Here


    public void printTestAPIComponentHeader(ClassDoc classDoc, RootDoc root) {
        mOut.println("<H2>QTaste Test API Component Interface " + classDoc.name() + "</H2>");
        mOut.println(classDoc.commentText());

        // factory
        FieldDoc factoryField = TestAPIDoclet.getFactoryField(classDoc, root);
        if (factoryField != null) {
            mOut.println("<P>");
            mOut.println(factoryField.commentText());
        }

        // config tags
        Tag[] tags = classDoc.tags("@config");
        if (tags.length > 0) {
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 columnComment = processComment(fields[j].commentText());

          if (null != columnComment) {
            String columnName = StrUtils.unCamel(StringUtils.capitalize(fields[j].name()), ' ', false);
            enOut.write(className + "." + fields[j].name() + "=" + columnName + "\n");
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();

          String columnComment = processComment(fields[j].commentText());
          if (null != columnComment) {
            if (collectionTypes.contains(simpleTypeName)) {
              String joinTable = collectionTable(classDoc, tableName, field);
View Full Code Here

            throw new IllegalArgumentException(message);
        }

        final FieldDoc[] fields = classes[0].fields();
        for (int j = 0; j < fields.length; j++) {
            final FieldDoc field = fields[j];
            if (field.isStatic() && field.isPublic() && field.isFinal()
                && "int".equals((field.type().qualifiedTypeName())))
            {
                if (field.firstSentenceTags().length != 1) {
                    final String message = "Should be only one tag.";
                    throw new IllegalArgumentException(message);
                }
                ps.println(field.name() + "="
                           + field.firstSentenceTags()[0].text());
            }
        }

        ps.close();
        return true;
View Full Code Here

  private String createFieldList(Collection<FieldDoc> fields) {
    StringBuffer buffer = new StringBuffer();
    Iterator<FieldDoc> iter = fields.iterator();
    while (iter.hasNext()) {
      FieldDoc field = iter.next();
      buffer.append(field.name());
      if (iter.hasNext()) {
        buffer.append(", ");
      }
    }
    return buffer.toString();
View Full Code Here

         }
      }
   }

   private void generatePropertiesTableRows(StringBuilder sb, TreeNode n) {
      FieldDoc fieldDoc = fieldDocWithTag(n.getBeanClass(), CONFIG_PROPERTY_REF);
      if (fieldDoc != null) {
         sb.append("\n<table class=\"bodyTable\"> ");
         sb.append("<tr class=\"a\"><th>Property</th><th>Description</th></tr>\n");
         Tag[] tags = fieldDoc.tags(CONFIG_PROPERTY_REF);
         for (Tag t : tags) {
            Map<String, String> m = parseTag(t.text().trim());
            sb.append("<tr class=\"b\">");
            sb.append("<td>").append(m.get("name")).append("</td>\n");
            sb.append("<td>").append(m.get("desc")).append("</td>\n");
View Full Code Here

               sb.append("<td>").append("N/A").append("</td>\n");
            }
         }

         // and finally description
         FieldDoc fieldDoc = findFieldDocRecursively(bean, a.getName(), CONFIG_REF);
         if (fieldDoc != null) {
            Tag[] tags = fieldDoc.tags(CONFIG_REF);
            Map<String, String> p = parseTag(tags[0].text().trim());
            sb.append("<td>").append(p.get("desc")).append("\n");
            String packageDir = fieldDoc.containingPackage().toString().replace(".", "/").concat("/");
            String htmlFile = fieldDoc.containingClass().typeName().concat(".html");
            String field = fieldDoc.name();
            sb.append(" (<a href=\"" +packageDir.concat(htmlFile).concat("#").concat(field) +"\">" + "Javadoc</a>)");
            sb.append("</td>\n");
           
         }
         sb.append("</tr>\n");
View Full Code Here

            "trying to fix " + methodDoc.containingClass().name()
                + "." + methodDoc.name() + " " + parameter);
           
            //first try to find corresponding fields which text can be copied.
            StringBuilder additionalParameters = new StringBuilder();
            FieldDoc field = DocBoostUtils.findCorrespondingField(methodDoc.containingClass(), parameter);
            if (field == null)
              field = DocBoostUtils.findCorrespondingField(fullClassDoc, parameter);
           
        if (field != null && field.commentText() != null
            && !field.commentText().trim().isEmpty()) {
              String firstSentence = DocBoostUtils.getFirstSentence(field);
              additionalParameters.append(DocBoostUtils.TAG_PARAM).append(" ")
              .append( parameter.name()).append(" ")
              .append( firstSentence ).append("\n");
          getLog().debug("fixed the parameter to " + firstSentence);
View Full Code Here

          for (Parameter parameter: DocUtils.parametersWithoutComment(methodDoc)){
            getLog().info("trying to fix " + methodDoc.containingClass().name() +"."+ methodDoc.name() + " " + parameter);
           
            //first try to find corresponding fields which text can be copied.
            StringBuilder additionalParameters = new StringBuilder();
            FieldDoc field = DocUtils.findCorrespondingField(methodDoc.containingClass(), parameter);
            if (field == null)
              field = DocUtils.findCorrespondingField(fullClassDoc, parameter);
           
            if (field != null){
              String firstSentence = DocUtils.getFirstSentence(field);
View Full Code Here

TOP

Related Classes of com.sun.javadoc.FieldDoc

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.