Ejemplo n.º 1
0
  public TagletOutput getTagletOutput(Tag tag, TagletWriter writer)
      throws IllegalArgumentException {

    TagletOutput out = writer.getTagletOutputInstance();
    out.setOutput(toString(tag));
    return out;
  }
Ejemplo n.º 2
0
  public TagletOutput getTagletOutput(Doc holder, TagletWriter writer)
      throws IllegalArgumentException {

    TagletOutput out = writer.getTagletOutputInstance();
    Tag[] tags = holder.tags(getName());
    if (tags.length == 0) {
      return null;
    }
    out.setOutput(toString(tags[0]));
    return out;
  }
Ejemplo n.º 3
0
 public static void genTagOuput(
     TagletManager tagletManager,
     Doc doc,
     Taglet[] taglets,
     TagletWriter writer,
     TagletOutput output,
     Set<String> tagletsToPrint) {
   tagletManager.checkTags(doc, doc.tags(), false);
   tagletManager.checkTags(doc, doc.inlineTags(), true);
   TagletOutput currentOutput = null;
   for (int i = 0; i < taglets.length; i++) {
     if (!tagletsToPrint.contains(taglets[i].getName())) continue;
     if (doc instanceof ClassDoc && taglets[i] instanceof ParamTaglet) {
       // The type parameters are documented in a special section away
       // from the tag info, so skip here.
       continue;
     }
     if (taglets[i] instanceof DeprecatedTaglet) {
       // Deprecated information is documented "inline", not in tag
       // info
       // section.
       continue;
     }
     try {
       currentOutput = taglets[i].getTagletOutput(doc, writer);
     } catch (IllegalArgumentException e) {
       // The taglet does not take a member as an argument. Let's try
       // a single tag.
       Tag[] tags = doc.tags(taglets[i].getName());
       if (tags.length > 0) {
         currentOutput = taglets[i].getTagletOutput(tags[0], writer);
       }
     }
     if (currentOutput != null) {
       tagletManager.seenCustomTag(taglets[i].getName());
       output.appendOutput(currentOutput);
     }
   }
 }