本文整理了Java中com.sun.javadoc.Doc.isField()
方法的一些代码示例,展示了Doc.isField()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Doc.isField()
方法的具体详情如下:
包路径:com.sun.javadoc.Doc
类名称:Doc
方法名:isField
[英]Is this Doc item a field (but not an enum constant)?
[中]此文档项是否为字段(但不是枚举常量)?
代码示例来源:origin: de.unkrig/de-unkrig-commons
);
if (to.isField()) {
defaultLabelHtml += to.name();
} else
代码示例来源:origin: de.unkrig.commons/commons-doclet
);
if (to.isField() || to.isEnumConstant()) {
defaultLabelHtml += to.name();
} else
代码示例来源: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: uk.org.retep.doclet/core
if( holder.isField() && ((FieldDoc) holder).constantValue() != null && htmlWriter instanceof ClassWriterImpl )
代码示例来源:origin: konsoletyper/teavm-javac
if (holder.isField() && ((FieldDoc)holder).constantValue() != null &&
htmlWriter instanceof ClassWriterImpl) {
内容来源于网络,如有侵权,请联系作者删除!