本文整理了Java中com.webcohesion.enunciate.javac.javadoc.JavaDoc
类的一些代码示例,展示了JavaDoc
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JavaDoc
类的具体详情如下:
包路径:com.webcohesion.enunciate.javac.javadoc.JavaDoc
类名称:JavaDoc
暂无
代码示例来源:origin: stoicflame/enunciate
protected HashMap<String, String> loadParamsComments(String tagName, JavaDoc jd) {
HashMap<String, String> paramComments = new HashMap<String, String>();
if (jd.get(tagName) != null) {
for (String paramDoc : jd.get(tagName)) {
paramDoc = paramDoc.trim().replaceFirst("\\s+", " ");
int spaceIndex = JavaDoc.indexOfFirstWhitespace(paramDoc);
String param = paramDoc.substring(0, spaceIndex);
String paramComment = "";
if ((spaceIndex + 1) < paramDoc.length()) {
paramComment = paramDoc.substring(spaceIndex + 1);
}
paramComments.put(param, paramComment);
}
}
return paramComments;
}
}
代码示例来源:origin: stoicflame/enunciate
@Override
public JavaDoc getJavaDoc() {
return new JavaDoc(this.description, null, null, null);
}
代码示例来源:origin: stoicflame/enunciate
public ValueImpl(String value, JavaDoc javaDoc, Set<String> styles, Set<Facet> facets) {
this.value = value;
this.description = javaDoc.toString();
this.styles = styles;
this.facets = facets;
JavaDoc.JavaDocTagList sinceTags = javaDoc.get("since");
this.since = sinceTags != null ? sinceTags.toString() : null;
}
代码示例来源:origin: stoicflame/enunciate
@Override
public String getSince() {
JavaDoc.JavaDocTagList sinceTags = getJavaDoc().get("since");
return sinceTags == null ? null : sinceTags.toString();
}
}
代码示例来源:origin: stoicflame/enunciate
JavaDoc localDoc = new JavaDoc(getDocComment(), null, null, this.env);
JavaDoc.JavaDocTagList doclets = localDoc.get("RequestHeader"); //support jax-doclets. see http://jira.codehaus.org/browse/ENUNCIATE-690
if (doclets != null) {
for (String doclet : doclets) {
int firstspace = JavaDoc.indexOfFirstWhitespace(doclet);
String header = firstspace > 0 ? doclet.substring(0, firstspace) : doclet;
String doc = ((firstspace > 0) && (firstspace + 1 < doclet.length())) ? doclet.substring(firstspace + 1) : "";
for (JavaDoc.JavaDocTagList inheritedDoclet : inheritedDoclets) {
for (String doclet : inheritedDoclet) {
int firstspace = JavaDoc.indexOfFirstWhitespace(doclet);
String header = firstspace > 0 ? doclet.substring(0, firstspace) : doclet;
String doc = ((firstspace > 0) && (firstspace + 1 < doclet.length())) ? doclet.substring(firstspace + 1) : "";
代码示例来源:origin: stoicflame/enunciate
if (valueInherits(this.value)) {
String inheritedValue = inherited.toString();
if (!inheritedValue.isEmpty()) {
if (this.value.isEmpty()) {
JavaDocTagList returnTag = get("return");
String returnValue = returnTag == null ? "" : returnTag.toString();
if (valueInherits(returnValue)) {
JavaDocTagList inheritedTag = inherited.get("return");
String inheritedValue = inheritedTag == null ? "" : inheritedTag.toString();
if (!inheritedValue.isEmpty()) {
if (returnValue.isEmpty()) {
put("return", new JavaDocTagList(inheritedValue));
put("return", new JavaDocTagList(returnValue));
JavaDocTagList paramTags = get("param");
for (VariableElement param : parameterNames) {
String paramName = param.getSimpleName().toString();
for (int i = 0; i < paramTags.size(); i++) {
String paramTag = paramTags.get(i);
if (paramName.equals(paramTag.substring(0, indexOfFirstWhitespace(paramTag)))) {
paramValue = paramTag;
paramIndex = i;
if (valueInherits(paramValue)) {
JavaDocTagList inheritedTags = inherited.get("param");
String inheritedValue = "";
代码示例来源:origin: stoicflame/enunciate
/**
* The comments on the fault itself.
*
* @return The comments on the fault itself.
*/
public String getElementDocs() {
String docs = getJavaDoc().toString();
if (docs.trim().length() == 0) {
docs = null;
}
return docs;
}
代码示例来源:origin: stoicflame/enunciate
tagList = new JavaDoc(((ElementAdaptor)el).getDocComment(), null, null, null).get(tag);
tagList = new JavaDoc(((DecoratedElement)el).getDocComment(), null, null, null).get(tag);
代码示例来源:origin: stoicflame/enunciate
pushValue(currentTag, currentValue.toString());
int spaceIndex = indexOfFirstWhitespace(line);
pushValue(currentTag, currentValue.toString());
assumeInheritedComments(context, env, tagHandler);
this.value = resolveJavaDocSemantics(null, this.value, tagHandler, context);
for (Map.Entry<String, JavaDocTagList> entry : entrySet()) {
JavaDocTagList tagValues = entry.getValue();
for (int i = 0; i < tagValues.size(); i++) {
String value = tagValues.get(i);
tagValues.set(i, resolveJavaDocSemantics(entry.getKey(), value, tagHandler, context));
代码示例来源:origin: stoicflame/enunciate
String key1Example = "property1";
if (specifiedExample != null) {
int firstSpace = JavaDoc.indexOfFirstWhitespace(specifiedExample);
if (firstSpace >= 0) {
key1Example = specifiedExample.substring(0, firstSpace);
int firstSpace = JavaDoc.indexOfFirstWhitespace(specifiedExample2);
if (firstSpace >= 0) {
key2Example = specifiedExample2.substring(0, firstSpace);
代码示例来源:origin: stoicflame/enunciate
@Override
protected JavaDoc getJavaDoc(JavaDocTagHandler tagHandler, boolean useDelegate) {
return this.docComment == null ? super.getJavaDoc(tagHandler, true) : JavaDoc.createStaticJavaDoc(this.docComment);
}
代码示例来源:origin: stoicflame/enunciate
@Override
public String getSince() {
JavaDoc.JavaDocTagList sinceTags = getJavaDoc().get("since");
return sinceTags == null ? null : sinceTags.toString();
}
}
代码示例来源:origin: stoicflame/enunciate
public Set<ResourceParameter> loadExtraParameters(Resource parent, EnunciateJaxrsContext context) {
Set<ResourceParameter> extraParameters = new TreeSet<ResourceParameter>();
JavaDoc localDoc = new JavaDoc(getDocComment(), null, null, this.env);
JavaDoc.JavaDocTagList doclets = localDoc.get("RequestHeader"); //support jax-doclets. see http://jira.codehaus.org/browse/ENUNCIATE-690
if (doclets != null) {
for (String doclet : doclets) {
int firstspace = JavaDoc.indexOfFirstWhitespace(doclet);
String header = firstspace > 0 ? doclet.substring(0, firstspace) : doclet;
String doc = ((firstspace > 0) && (firstspace + 1 < doclet.length())) ? doclet.substring(firstspace + 1) : "";
for (JavaDoc.JavaDocTagList inheritedDoclet : inheritedDoclets) {
for (String doclet : inheritedDoclet) {
int firstspace = JavaDoc.indexOfFirstWhitespace(doclet);
String header = firstspace > 0 ? doclet.substring(0, firstspace) : doclet;
String doc = ((firstspace > 0) && (firstspace + 1 < doclet.length())) ? doclet.substring(firstspace + 1) : "";
代码示例来源:origin: com.webcohesion.enunciate/enunciate-javac-support
if (valueInherits(this.value)) {
String inheritedValue = inherited.toString();
if (!inheritedValue.isEmpty()) {
if (this.value.isEmpty()) {
JavaDocTagList returnTag = get("return");
String returnValue = returnTag == null ? "" : returnTag.toString();
if (valueInherits(returnValue)) {
JavaDocTagList inheritedTag = inherited.get("return");
String inheritedValue = inheritedTag == null ? "" : inheritedTag.toString();
if (!inheritedValue.isEmpty()) {
if (returnValue.isEmpty()) {
put("return", new JavaDocTagList(inheritedValue));
put("return", new JavaDocTagList(returnValue));
JavaDocTagList paramTags = get("param");
for (VariableElement param : parameterNames) {
String paramName = param.getSimpleName().toString();
for (int i = 0; i < paramTags.size(); i++) {
String paramTag = paramTags.get(i);
if (paramName.equals(paramTag.substring(0, indexOfFirstWhitespace(paramTag)))) {
paramValue = paramTag;
paramIndex = i;
if (valueInherits(paramValue)) {
JavaDocTagList inheritedTags = inherited.get("param");
String inheritedValue = "";
代码示例来源:origin: stoicflame/enunciate
public String getElementDocs() {
String docs = property.getJavaDoc().toString();
if (docs.trim().length() == 0) {
docs = null;
}
return docs;
}
代码示例来源:origin: com.webcohesion.enunciate/enunciate-core
tagList = new JavaDoc(((ElementAdaptor)el).getDocComment(), null, null, null).get(tag);
tagList = new JavaDoc(((DecoratedElement)el).getDocComment(), null, null, null).get(tag);
代码示例来源:origin: com.webcohesion.enunciate/enunciate-javac-support
pushValue(currentTag, currentValue.toString());
int spaceIndex = indexOfFirstWhitespace(line);
pushValue(currentTag, currentValue.toString());
assumeInheritedComments(context, env, tagHandler);
this.value = resolveJavaDocSemantics(null, this.value, tagHandler, context);
for (Map.Entry<String, JavaDocTagList> entry : entrySet()) {
JavaDocTagList tagValues = entry.getValue();
for (int i = 0; i < tagValues.size(); i++) {
String value = tagValues.get(i);
tagValues.set(i, resolveJavaDocSemantics(entry.getKey(), value, tagHandler, context));
代码示例来源:origin: com.webcohesion.enunciate/enunciate-jackson
String key1Example = "property1";
if (specifiedExample != null) {
int firstSpace = JavaDoc.indexOfFirstWhitespace(specifiedExample);
if (firstSpace >= 0) {
key1Example = specifiedExample.substring(0, firstSpace);
int firstSpace = JavaDoc.indexOfFirstWhitespace(specifiedExample2);
if (firstSpace >= 0) {
key1Example = specifiedExample2.substring(0, firstSpace);
代码示例来源:origin: stoicflame/enunciate
@Override
protected JavaDoc getJavaDoc(JavaDocTagHandler tagHandler, boolean useDelegate) {
return this.docComment == null ? super.getJavaDoc(tagHandler, true) : JavaDoc.createStaticJavaDoc(this.docComment.get(tagHandler));
}
代码示例来源:origin: com.webcohesion.enunciate/enunciate-javac-support
protected HashMap<String, String> loadParamsComments(String tagName, JavaDoc jd) {
HashMap<String, String> paramComments = new HashMap<String, String>();
if (jd.get(tagName) != null) {
for (String paramDoc : jd.get(tagName)) {
paramDoc = paramDoc.trim().replaceFirst("\\s+", " ");
int spaceIndex = JavaDoc.indexOfFirstWhitespace(paramDoc);
String param = paramDoc.substring(0, spaceIndex);
String paramComment = "";
if ((spaceIndex + 1) < paramDoc.length()) {
paramComment = paramDoc.substring(spaceIndex + 1);
}
paramComments.put(param, paramComment);
}
}
return paramComments;
}
}
内容来源于网络,如有侵权,请联系作者删除!