本文整理匯總了Java中org.eclipse.jdt.core.dom.TypeDeclaration.getJavadoc方法的典型用法代碼示例。如果您正苦於以下問題:Java TypeDeclaration.getJavadoc方法的具體用法?Java TypeDeclaration.getJavadoc怎麽用?Java TypeDeclaration.getJavadoc使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.jdt.core.dom.TypeDeclaration
的用法示例。
在下文中一共展示了TypeDeclaration.getJavadoc方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: insertAllMissingTypeTags
import org.eclipse.jdt.core.dom.TypeDeclaration; //導入方法依賴的package包/類
private void insertAllMissingTypeTags(ASTRewrite rewriter, TypeDeclaration typeDecl) {
AST ast= typeDecl.getAST();
Javadoc javadoc= typeDecl.getJavadoc();
ListRewrite tagsRewriter= rewriter.getListRewrite(javadoc, Javadoc.TAGS_PROPERTY);
List<TypeParameter> typeParams= typeDecl.typeParameters();
for (int i= typeParams.size() - 1; i >= 0; i--) {
TypeParameter decl= typeParams.get(i);
String name= '<' + decl.getName().getIdentifier() + '>';
if (findTag(javadoc, TagElement.TAG_PARAM, name) == null) {
TagElement newTag= ast.newTagElement();
newTag.setTagName(TagElement.TAG_PARAM);
TextElement text= ast.newTextElement();
text.setText(name);
newTag.fragments().add(text);
insertTabStop(rewriter, newTag.fragments(), "typeParam" + i); //$NON-NLS-1$
insertTag(tagsRewriter, newTag, getPreviousTypeParamNames(typeParams, decl));
}
}
}
示例2: visitInterface
import org.eclipse.jdt.core.dom.TypeDeclaration; //導入方法依賴的package包/類
private boolean visitInterface(TypeDeclaration node) {
InterfaceInfo interfaceInfo = new InterfaceInfo();
interfaceInfo.name = node.getName().getFullyQualifiedName();
interfaceInfo.fullName = NameResolver.getFullName(node);
interfaceInfo.visibility = getVisibility(node);
List<Type> superInterfaceList = node.superInterfaceTypes();
for (Type superInterface : superInterfaceList)
interfaceInfo.superInterfaceTypeList.add(NameResolver.getFullName(superInterface));
if (node.getJavadoc() != null)
interfaceInfo.comment = sourceContent.substring(node.getJavadoc().getStartPosition(), node.getJavadoc().getStartPosition() + node.getJavadoc().getLength());
interfaceInfo.content = sourceContent.substring(node.getStartPosition(), node.getStartPosition() + node.getLength());
elementInfoPool.interfaceInfoMap.put(interfaceInfo.fullName, interfaceInfo);
MethodDeclaration[] methodDeclarations = node.getMethods();
for (MethodDeclaration methodDeclaration : methodDeclarations) {
MethodInfo methodInfo = createMethodInfo(methodDeclaration, interfaceInfo.fullName);
elementInfoPool.methodInfoMap.put(methodInfo.hashName(), methodInfo);
}
FieldDeclaration[] fieldDeclarations = node.getFields();
for (FieldDeclaration fieldDeclaration : fieldDeclarations) {
List<FieldInfo> fieldInfos = createFieldInfos(fieldDeclaration, interfaceInfo.fullName);
for (FieldInfo fieldInfo : fieldInfos)
elementInfoPool.fieldInfoMap.put(fieldInfo.hashName(), fieldInfo);
}
return true;
}
示例3: visitClass
import org.eclipse.jdt.core.dom.TypeDeclaration; //導入方法依賴的package包/類
private boolean visitClass(TypeDeclaration node) {
ClassInfo classInfo = new ClassInfo();
classInfo.name = node.getName().getFullyQualifiedName();
classInfo.fullName = NameResolver.getFullName(node);
classInfo.visibility = getVisibility(node);
classInfo.isAbstract = isAbstract(node);
classInfo.isFinal = isFinal(node);
classInfo.superClassType = node.getSuperclassType() == null ? "java.lang.Object" : NameResolver.getFullName(node.getSuperclassType());
List<Type> superInterfaceList = node.superInterfaceTypes();
for (Type superInterface : superInterfaceList)
classInfo.superInterfaceTypeList.add(NameResolver.getFullName(superInterface));
if (node.getJavadoc() != null)
classInfo.comment = sourceContent.substring(node.getJavadoc().getStartPosition(), node.getJavadoc().getStartPosition() + node.getJavadoc().getLength());
classInfo.content = sourceContent.substring(node.getStartPosition(), node.getStartPosition() + node.getLength());
elementInfoPool.classInfoMap.put(classInfo.fullName, classInfo);
MethodDeclaration[] methodDeclarations = node.getMethods();
for (MethodDeclaration methodDeclaration : methodDeclarations) {
MethodInfo methodInfo = createMethodInfo(methodDeclaration, classInfo.fullName);
elementInfoPool.methodInfoMap.put(methodInfo.hashName(), methodInfo);
}
FieldDeclaration[] fieldDeclarations = node.getFields();
for (FieldDeclaration fieldDeclaration : fieldDeclarations) {
List<FieldInfo> fieldInfos = createFieldInfos(fieldDeclaration, classInfo.fullName);
for (FieldInfo fieldInfo : fieldInfos)
elementInfoPool.fieldInfoMap.put(fieldInfo.hashName(), fieldInfo);
}
return true;
}