本文整理匯總了Java中com.sun.javadoc.ClassDoc.tags方法的典型用法代碼示例。如果您正苦於以下問題:Java ClassDoc.tags方法的具體用法?Java ClassDoc.tags怎麽用?Java ClassDoc.tags使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.sun.javadoc.ClassDoc
的用法示例。
在下文中一共展示了ClassDoc.tags方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getOutputParam
import com.sun.javadoc.ClassDoc; //導入方法依賴的package包/類
@Override
protected APIParameter getOutputParam(ClassDoc classDoc) {
if(classDoc.tags(WRMqConsumerTaglet.NAME).length > 0) {
return null;
} else {
APIParameter apiParameter = new APIParameter();
apiParameter.setParameterOccurs(ParameterOccurs.REQUIRED);
apiParameter.setType(classDoc.qualifiedTypeName());
apiParameter.setName(classDoc.name());
HashSet<String> processingClasses = new HashSet<String>();
apiParameter.setFields(this.getFields(classDoc,
ParameterType.Response, processingClasses));
apiParameter.setDescription(classDoc.commentText());
return apiParameter;
}
}
示例2: getInputParams
import com.sun.javadoc.ClassDoc; //導入方法依賴的package包/類
@Override
protected APIParameter getInputParams(ClassDoc classDoc) {
if(classDoc.tags(WRMqConsumerTaglet.NAME).length > 0) {
APIParameter apiParameter = new APIParameter();
apiParameter.setParameterOccurs(ParameterOccurs.REQUIRED);
apiParameter.setType(classDoc.qualifiedTypeName());
apiParameter.setName(classDoc.name());
HashSet<String> processingClasses = new HashSet<String>();
apiParameter.setFields(this.getFields(classDoc,
ParameterType.Request, processingClasses));
apiParameter.setDescription(classDoc.commentText());
return apiParameter;
} else {
return null;
}
}
示例3: processServiceClass
import com.sun.javadoc.ClassDoc; //導入方法依賴的package包/類
protected void processServiceClass(ClassDoc service,
Configuration configuration) {
Tag[] serviceTagArray = service.tags(WRTagTaglet.NAME);
for (int i = 0; i < serviceTagArray.length; i++) {
Set<String> serviceTags = WRTagTaglet.getTagSet(serviceTagArray[i]
.text());
for (Iterator<String> iter = serviceTags.iterator(); iter.hasNext();) {
String tag = iter.next();
if (!this.taggedOpenAPIMethods.containsKey(tag)) {
this.taggedOpenAPIMethods
.put(tag, new HashSet<MethodDoc>());
}
// all method of this service should be processed later.
for (int j = 0; j < service.methods().length; j++) {
if (configuration.nodeprecated
&& Util.isDeprecated(service.methods()[j])) {
continue;
}
this.taggedOpenAPIMethods.get(tag)
.add(service.methods()[j]);
}
}
this.wrDoc.getWRTags().addAll(serviceTags);
}
}
示例4: isMQMessageClasses
import com.sun.javadoc.ClassDoc; //導入方法依賴的package包/類
protected boolean isMQMessageClasses(ClassDoc classDoc) {
Tag[] t = classDoc.tags(WRMqConsumerTaglet.NAME);
if(t.length > 0) {
return true;
}
t = classDoc.tags(WRMqProducerTaglet.NAME);
return t.length > 0;
}
示例5: parseRequestMapping
import com.sun.javadoc.ClassDoc; //導入方法依賴的package包/類
@Override
protected RequestMapping parseRequestMapping(ClassDoc classDoc) {
RequestMapping mapping = new RequestMapping();
if(classDoc.tags(WRMqConsumerTaglet.NAME).length > 0) {
mapping.setUrl(this.getMQConsumerTopic(classDoc));
} else {
mapping.setUrl(this.getMQProducerTopic(classDoc));
}
mapping.setTooltip(classDoc.simpleTypeName());
mapping.setContainerName(classDoc.simpleTypeName());
return mapping;
}
示例6: getMQConsumerTopic
import com.sun.javadoc.ClassDoc; //導入方法依賴的package包/類
protected String getMQConsumerTopic(ClassDoc classDoc) {
Tag[] tags = classDoc.tags(WRMqConsumerTaglet.NAME);
if (tags.length == 0) {
return "";
}
return StringUtils.substringBefore(tags[0].text(), "\n");
}
示例7: getMQProducerTopic
import com.sun.javadoc.ClassDoc; //導入方法依賴的package包/類
protected String getMQProducerTopic(ClassDoc classDoc) {
Tag[] tags = classDoc.tags(WRMqProducerTaglet.NAME);
if (tags.length == 0) {
return "";
}
return StringUtils.substringBefore(tags[0].text(), "\n");
}
示例8: buildOpenAPIByClasses
import com.sun.javadoc.ClassDoc; //導入方法依賴的package包/類
protected void buildOpenAPIByClasses(Configuration configuration) {
Set<Entry<String, Set<ClassDoc>>> classes = this.taggedOpenAPIClasses.entrySet();
for (Iterator<Entry<String, Set<ClassDoc>>> tagClsIter = classes.iterator(); tagClsIter.hasNext();) {
Entry<String, Set<ClassDoc>> kv = tagClsIter.next();
String tagName = kv.getKey();
if (!this.wrDoc.getTaggedOpenAPIs().containsKey(tagName)) {
this.wrDoc.getTaggedOpenAPIs().put(tagName, new LinkedList<OpenAPI>());
}
Set<ClassDoc> classDocSet = kv.getValue();
for (Iterator<ClassDoc> clsIter = classDocSet.iterator(); clsIter.hasNext();) {
ClassDoc classDoc = clsIter.next();
OpenAPI openAPI = new OpenAPI();
openAPI.setDeprecated(Util.isDeprecated(classDoc) || Util.isDeprecated(classDoc.containingPackage()));
Tag[] tags = classDoc.tags(WRTagTaglet.NAME);
if (tags.length == 0) {
openAPI.addTag(tagName);
} else {
for (Tag t : tags) {
openAPI.addTags(WRTagTaglet.getTagSet(t.text()));
}
}
openAPI.setQualifiedName(classDoc.qualifiedName());
if (StringUtils.isNotBlank(classDoc.commentText())) {
openAPI.setDescription(classDoc.commentText());
}
String brief;
if (classDoc.tags(WRBriefTaglet.NAME).length == 0) {
brief = getBriefFromCommentText(classDoc.commentText());
} else {
brief = classDoc.tags(WRBriefTaglet.NAME)[0].text();
}
openAPI.setBrief(brief);
if (StringUtils.isBlank(openAPI.getDescription())) {
openAPI.setDescription(openAPI.getBrief());
}
openAPI.setModificationHistory(this.getModificationHistory(classDoc));
openAPI.setRequestMapping(this.parseRequestMapping(classDoc));
openAPI.addInParameter(this.getInputParams(classDoc));
openAPI.setOutParameter(this.getOutputParam(classDoc));
this.wrDoc.getTaggedOpenAPIs().get(tagName).add(openAPI);
}
}
}