当前位置: 首页>>代码示例>>Java>>正文


Java ClassDoc.tags方法代码示例

本文整理汇总了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;
	}
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:17,代码来源:MQDocBuilder.java

示例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;
	}
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:17,代码来源:MQDocBuilder.java

示例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);
	}
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:27,代码来源:AbstractServiceDocBuilder.java

示例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;
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:9,代码来源:MQDocBuilder.java

示例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;
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:13,代码来源:MQDocBuilder.java

示例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");
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:8,代码来源:AbstractDocBuilder.java

示例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");
}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:8,代码来源:AbstractDocBuilder.java

示例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);
		}
	}

}
 
开发者ID:WinRoad-NET,项目名称:wrdocletbase,代码行数:48,代码来源:AbstractDocBuilder.java


注:本文中的com.sun.javadoc.ClassDoc.tags方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。