/** * Given an array of <code>ParamTag</code>s,return its string representation. * * @param holder the member that holds the param tags. * @param writer the TagletWriter that will write this tag. * @return the TagletOutput representation of these <code>ParamTag</code>s. */ public TagletOutput getTagletOutput(Doc holder, TagletWriter writer) { if (holder instanceof ExecutableMemberDoc) { ExecutableMemberDoc member = (ExecutableMemberDoc) holder; TagletOutput output = getTagletOutput(false, member, writer, member.typeParameters(), member.typeParamTags()); output.appendOutput( getTagletOutput(true, member, writer, member.parameters(), member.paramTags())); return output; } else { ClassDoc classDoc = (ClassDoc) holder; return getTagletOutput( false, classDoc, writer, classDoc.typeParameters(), classDoc.typeParamTags()); } }
/** * Adds all parameters of an executable doc member to the documentation * * @param doc */ void addParameters(Doc doc) { if (doc.isConstructor() || doc.isMethod()) { ExecutableMemberDoc memberDoc = (ExecutableMemberDoc) doc; ParamTag[] tags = memberDoc.paramTags(); for (int i = 0; i < tags.length; ++i) { addParameter(tags[i].parameterName(), tags[i].parameterComment()); } if (tags.length > 0) { memberParameters.insertTagContent(PARAMETER_TAG); PARAMETERS_TAG.setContent(memberParameters.getTemplateContent()); } } }
/** {@inheritDoc} */ public TagletOutput getTagletOutput(Doc holder, TagletWriter writer) { ExecutableMemberDoc execHolder = (ExecutableMemberDoc) holder; ThrowsTag[] tags = execHolder.throwsTags(); TagletOutput result = writer.getOutputInstance(); HashSet<String> alreadyDocumented = new HashSet<String>(); if (tags.length > 0) { result.appendOutput( throwsTagsOutput(execHolder.throwsTags(), writer, alreadyDocumented, true)); } result.appendOutput( inheritThrowsDocumentation( holder, execHolder.thrownExceptionTypes(), alreadyDocumented, writer)); result.appendOutput( linkToUndocumentedDeclaredExceptions( execHolder.thrownExceptionTypes(), alreadyDocumented, writer)); return result; }
@Override public DocReferenceable getExecutableMemberDocRef(ExecutableMemberDoc executableMemberDoc) { return new UnknownApiRef(executableMemberDoc.name()); }