use of com.sun.javadoc.Tag in project jersey by jersey.
the class ResourceDoclet method addRequestRepresentationDoc.
private static void addRequestRepresentationDoc(final MethodDoc methodDoc, final MethodDocType methodDocType) {
final Tag requestElement = getSingleTagOrNull(methodDoc, "request.representation.qname");
final Tag requestExample = getSingleTagOrNull(methodDoc, "request.representation.example");
if (requestElement != null || requestExample != null) {
final RequestDocType requestDoc = new RequestDocType();
final RepresentationDocType representationDoc = new RepresentationDocType();
/* requestElement exists
*/
if (requestElement != null) {
representationDoc.setElement(QName.valueOf(requestElement.text()));
}
/* requestExample exists
*/
if (requestExample != null) {
final String example = getSerializedExample(requestExample);
if (!isEmpty(example)) {
representationDoc.setExample(example);
} else {
LOG.warning("Could not get serialized example for method " + methodDoc.qualifiedName());
}
}
requestDoc.setRepresentationDoc(representationDoc);
methodDocType.setRequestDoc(requestDoc);
}
}
use of com.sun.javadoc.Tag in project RoboBinding by RoboBinding.
the class PropParserTest method whenParseValidTags_thenSuccessful.
@Test
public void whenParseValidTags_thenSuccessful() {
PropParser propParser = new PropParser();
Tag[] validTags = new Tag[] { tag("prop1; Type1, Type2, Type3; one-way, two-way"), tag("prop2; Type1; two-way"), tag("prop2; Type1; two-way; one-way; one-shot") };
for (Tag tag : validTags) {
propParser.parse(tag);
}
}
use of com.sun.javadoc.Tag in project Orchid by JavaEden.
the class CommentParser method getCommentObject.
public JSONObject getCommentObject(Doc doc) {
JSONObject comment = new JSONObject();
String firstSentence = "";
for (Tag tag : doc.firstSentenceTags()) {
firstSentence += tag.text();
}
if (!EdenUtils.isEmpty(firstSentence)) {
comment.put("shortDescription", firstSentence);
}
if (!EdenUtils.isEmpty(doc.commentText())) {
String content = doc.commentText();
if (context.query("options.commentExt") != null) {
content = context.getTheme().compile(context.query("options.commentExt").toString(), content);
}
comment.put("description", content);
}
comment.put("inlineTags", getInlineTags(doc));
comment.put("blockTags", getBlockTags(doc));
return (comment.length() > 0) ? comment : null;
}
use of com.sun.javadoc.Tag in project checker-framework by typetools.
the class ManualTaglet method toString.
@Override
public String toString(Tag[] tags) {
if (tags.length == 0) {
return "";
}
StringBuilder sb = new StringBuilder();
for (Tag t : tags) {
String[] split = t.text().split(" ", 2);
if (t != tags[0]) {
sb.append(", ");
}
sb.append(formatLink(split));
}
return formatHeader(sb.toString());
}
use of com.sun.javadoc.Tag in project abstools by abstools.
the class SequenceTaglet method getTagletOutput.
/**
* @see com.sun.tools.doclets.internal.toolkit.taglets.Taglet#getTagletOutput(com.sun.javadoc.Doc,
* com.sun.tools.doclets.internal.toolkit.taglets.TagletWriter)
*/
public TagletOutput getTagletOutput(Doc holder, TagletWriter writer) throws IllegalArgumentException {
if (diagramDirectory == null) {
setDestinationDirectory(writer.configuration().destDirName);
}
TagletOutput out = writer.getTagletOutputInstance();
Tag[] tags = holder.tags(getName());
if (tags.length == 0) {
return null;
}
out.setOutput(toString(tags, writer));
return out;
}
Aggregations