本文整理汇总了Java中com.thoughtworks.qdox.model.JavaClass.getComment方法的典型用法代码示例。如果您正苦于以下问题:Java JavaClass.getComment方法的具体用法?Java JavaClass.getComment怎么用?Java JavaClass.getComment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.thoughtworks.qdox.model.JavaClass
的用法示例。
在下文中一共展示了JavaClass.getComment方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processClass
import com.thoughtworks.qdox.model.JavaClass; //导入方法依赖的package包/类
void processClass(JavaClass javaClass, ObjectNode paths, ArrayNode tags, ObjectNode definitions) {
// If the class does not have a Path tag then ignore it
JavaAnnotation annotation = getPathAnnotation(javaClass);
if (annotation == null) {
return;
}
String path = getPath(annotation);
if (path == null) {
return;
}
String resourcePath = "/" + path;
String tagPath = path.isEmpty() ? "/" : path;
// Create tag node for this class.
ObjectNode tagObject = mapper.createObjectNode();
tagObject.put("name", tagPath);
if (javaClass.getComment() != null) {
tagObject.put("description", shortText(javaClass.getComment()));
}
tags.add(tagObject);
// Create an array node add to all methods from this class.
ArrayNode tagArray = mapper.createArrayNode();
tagArray.add(tagPath);
processAllMethods(javaClass, resourcePath, paths, tagArray, definitions);
}
示例2: getClassComment
import com.thoughtworks.qdox.model.JavaClass; //导入方法依赖的package包/类
/**
* Get comment string of Java class.
*
* @param className
* @return
* @author hzjingcheng
*/
@SuppressWarnings("unused")
private String getClassComment(String className) {
JavaClass cls = builder.getClassByName(className);
return cls.getComment();
}
示例3: getClassComment
import com.thoughtworks.qdox.model.JavaClass; //导入方法依赖的package包/类
/**
* Get comment string of Java class.
* @param className
* @return
* @author hzjingcheng
*/
private String getClassComment(String className) {
JavaClass cls = builder.getClassByName(className);
return cls.getComment();
}