本文整理了Java中com.sun.javadoc.Doc.name()
方法的一些代码示例,展示了Doc.name()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Doc.name()
方法的具体详情如下:
包路径:com.sun.javadoc.Doc
类名称:Doc
方法名:name
[英]Returns the non-qualified name of this Doc item.
[中]返回此单据项的非限定名称。
代码示例来源:origin: de.unkrig/de-unkrig-commons
@Override public int
compare(@Nullable Doc d1, @Nullable Doc d2) {
if (d1 == null) return d2 == null ? 0 : 1;
if (d2 == null) return -1;
return d1.name().compareToIgnoreCase(d2.name());
}
};
代码示例来源:origin: de.unkrig.commons/commons-doclet
@Override public int
compare(@Nullable Doc d1, @Nullable Doc d2) {
if (d1 == null) return d2 == null ? 0 : 1;
if (d2 == null) return -1;
return d1.name().compareToIgnoreCase(d2.name());
}
};
代码示例来源:origin: org.jboss.apiviz/apiviz
private String getTargetName() {
if (target instanceof ClassDoc) {
return ((ClassDoc) target).qualifiedName();
} else {
return target.name();
}
}
代码示例来源:origin: org.jboss.apiviz/apiviz
private static String getNodeId(Doc node) {
String name;
if (node instanceof ClassDoc) {
name = ((ClassDoc) node).qualifiedName();
} else {
name = node.name();
}
return name.replace('.', '_');
}
代码示例来源:origin: org.jboss.apiviz/apiviz
private String getSourceName() {
if (source instanceof ClassDoc) {
return ((ClassDoc) source).qualifiedName();
} else {
return source.name();
}
}
代码示例来源:origin: konsoletyper/teavm-javac
public int compare(Doc d1, Doc d2) {
String doc1 = d1.name();
String doc2 = d2.name();
int compareResult;
if ((compareResult = doc1.compareToIgnoreCase(doc2)) != 0) {
return compareResult;
} else if (d1 instanceof ProgramElementDoc && d2 instanceof ProgramElementDoc) {
doc1 = (((ProgramElementDoc) d1).qualifiedName());
doc2 = (((ProgramElementDoc) d2).qualifiedName());
return doc1.compareToIgnoreCase(doc2);
} else {
return 0;
}
}
}
代码示例来源:origin: uk.org.retep.doclet/core
public int compare(Doc d1, Doc d2) {
String doc1 = d1.name();
String doc2 = d2.name();
int compareResult;
if ((compareResult = doc1.compareToIgnoreCase(doc2)) != 0) {
return compareResult;
} else if (d1 instanceof ProgramElementDoc && d2 instanceof ProgramElementDoc) {
doc1 = (((ProgramElementDoc) d1).qualifiedName());
doc2 = (((ProgramElementDoc) d2).qualifiedName());
return doc1.compareToIgnoreCase(doc2);
} else {
return 0;
}
}
}
代码示例来源:origin: konsoletyper/teavm-javac
/**
* Adjust list of members according to their names. Check the first
* character in a member name, and then add the member to a list of members
* for that particular unicode character.
*
* @param elements Array of members.
*/
protected void adjustIndexMap(Doc[] elements) {
for (int i = 0; i < elements.length; i++) {
if (shouldAddToIndexMap(elements[i])) {
String name = elements[i].name();
char ch = (name.length()==0)?
'*' :
Character.toUpperCase(name.charAt(0));
Character unicode = new Character(ch);
List<Doc> list = indexmap.get(unicode);
if (list == null) {
list = new ArrayList<Doc>();
indexmap.put(unicode, list);
}
list.add(elements[i]);
}
}
}
代码示例来源:origin: uk.org.retep.doclet/core
/**
* Adjust list of members according to their names. Check the first
* character in a member name, and then add the member to a list of members
* for that particular unicode character.
*
* @param elements Array of members.
*/
protected void adjustIndexMap(Doc[] elements) {
for (int i = 0; i < elements.length; i++) {
if (shouldAddToIndexMap(elements[i])) {
String name = elements[i].name();
char ch = (name.length()==0)?
'*' :
Character.toUpperCase(name.charAt(0));
Character unicode = new Character(ch);
List<Doc> list = indexmap.get(unicode);
if (list == null) {
list = new ArrayList<Doc>();
indexmap.put(unicode, list);
}
list.add(elements[i]);
}
}
}
代码示例来源:origin: de.smartics.util/project-analysis-javadoc
log.debug("Adding information '" + filteredDoc.name() + "'.");
代码示例来源:origin: de.unkrig/de-unkrig-commons
/**
* Generates the "fragment" identifier for the given <var>doc</var>.
* <dl>
* <dt>{@link FieldDoc}:</dt>
* <dd>{@code "#fieldName"}</dd>
* <dt>{@link MethodDoc}:</dt>
* <dd>{@code "#methodName(java.lang.String,int)"}</dd>
* <dt>Other:</dt>
* <dd>{@code ""}</dd>
* </dl>
*/
private static String
fragmentIdentifier(Doc doc) {
if (doc.isField()) return '#' + doc.name();
if (doc.isConstructor()) {
ConstructorDoc constructorDoc = (ConstructorDoc) doc;
return (
'#'
+ constructorDoc.containingClass().name()
+ Html.parameterListForFragmentIdentifier(constructorDoc)
);
}
if (doc.isMethod()) {
MethodDoc methodDoc = (MethodDoc) doc;
return '#' + doc.name() + Html.parameterListForFragmentIdentifier(methodDoc);
}
return "";
}
代码示例来源:origin: de.unkrig.commons/commons-doclet
/**
* Generates the "fragment" identifier for the given <var>doc</var>.
* <dl>
* <dt>{@link FieldDoc}:</dt>
* <dd>{@code "#fieldName"}</dd>
* <dt>{@link MethodDoc}:</dt>
* <dd>{@code "#methodName(java.lang.String,int)"}</dd>
* <dt>Other:</dt>
* <dd>{@code ""}</dd>
* </dl>
*/
private static String
fragmentIdentifier(Doc doc) {
if (doc.isField()) return '#' + doc.name();
if (doc.isConstructor()) {
ConstructorDoc constructorDoc = (ConstructorDoc) doc;
return (
'#'
+ constructorDoc.containingClass().name()
+ Html.parameterListForFragmentIdentifier(constructorDoc)
);
}
if (doc.isMethod()) {
MethodDoc methodDoc = (MethodDoc) doc;
return '#' + doc.name() + Html.parameterListForFragmentIdentifier(methodDoc);
}
return "";
}
代码示例来源:origin: de.unkrig/de-unkrig-commons
defaultLabelHtml = to.name();
} else {
defaultLabelHtml += to.name();
} else
if (to.isConstructor()) {
if (to.isMethod()) {
MethodDoc toMethodDoc = (MethodDoc) to;
defaultLabelHtml += to.name() + this.prettyPrintParameterList(toMethodDoc);
} else
代码示例来源:origin: de.unkrig.commons/commons-doclet
defaultLabelHtml = to.name();
} else {
defaultLabelHtml += to.name();
} else
if (to.isConstructor()) {
if (to.isMethod()) {
MethodDoc toMethodDoc = (MethodDoc) to;
defaultLabelHtml += to.name() + this.prettyPrintParameterList(toMethodDoc);
} else
内容来源于网络,如有侵权,请联系作者删除!