本文整理汇总了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);
}
}
}