本文整理匯總了Java中com.github.markusbernhardt.xmldoclet.xjc.Constructor類的典型用法代碼示例。如果您正苦於以下問題:Java Constructor類的具體用法?Java Constructor怎麽用?Java Constructor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Constructor類屬於com.github.markusbernhardt.xmldoclet.xjc包,在下文中一共展示了Constructor類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: loadKeywordDocumentationMap
import com.github.markusbernhardt.xmldoclet.xjc.Constructor; //導入依賴的package包/類
protected Map<String, String> loadKeywordDocumentationMap(Root root, String className) {
Map<String, String> keywordDocumentation = new HashMap<String, String>();
for (Package packageNode : root.getPackage()) {
for (Class classNode : packageNode.getClazz()) {
if (className.equals(classNode.getQualified())) {
keywordDocumentation.put("__intro__", formatComment(classNode));
Constructor constructorNodeWithComment = null;
for (Constructor constructorNode : classNode.getConstructor()) {
if (constructorNode.getComment() != null && constructorNode.getComment().trim().length() > 0) {
constructorNodeWithComment = constructorNode;
}
}
keywordDocumentation.put("__init__", formatComment(constructorNodeWithComment));
}
for (Method methodNode : classNode.getMethod()) {
for (AnnotationInstance annotationInstanceNode : methodNode.getAnnotation()) {
if (annotationInstanceNode.getName().equals("RobotKeyword")) {
keywordDocumentation.put(methodNode.getName(), formatComment(methodNode));
break;
}
}
}
}
}
return keywordDocumentation;
}
示例2: formatComment
import com.github.markusbernhardt.xmldoclet.xjc.Constructor; //導入依賴的package包/類
protected String formatComment(Constructor constructorNode) {
if (constructorNode.getComment() != null) {
return constructorNode.getComment();
}
return "";
}