com.webcohesion.enunciate.javac.javadoc.JavaDoc.indexOfFirstWhitespace()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(8.9k)|赞(0)|评价(0)|浏览(138)

本文整理了Java中com.webcohesion.enunciate.javac.javadoc.JavaDoc.indexOfFirstWhitespace()方法的一些代码示例,展示了JavaDoc.indexOfFirstWhitespace()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JavaDoc.indexOfFirstWhitespace()方法的具体详情如下:
包路径:com.webcohesion.enunciate.javac.javadoc.JavaDoc
类名称:JavaDoc
方法名:indexOfFirstWhitespace

JavaDoc.indexOfFirstWhitespace介绍

暂无

代码示例

代码示例来源: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: 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;
 }
}

代码示例来源:origin: stoicflame/enunciate

@Override
 public String get(JavaDocTagHandler tagHandler) {
  JavaDoc.JavaDocTagList tagList = this.executableElement.getJavaDoc(tagHandler).get("returnWrapped");
  String returnWrapped = tagList == null || tagList.isEmpty() ? null : tagList.get(0);
  if (returnWrapped != null) {
   int firstSpace = JavaDoc.indexOfFirstWhitespace(returnWrapped);
   if (firstSpace > 1) {
    if (returnWrapped.length() > firstSpace + 1) {
     String wrappedDoc = returnWrapped.substring(firstSpace + 1).trim();
     if (!wrappedDoc.isEmpty()) {
      return wrappedDoc;
     }
    }
   }
  }

  return super.get(tagHandler);
 }
}

代码示例来源:origin: stoicflame/enunciate

@Override
 public String get(JavaDocTagHandler tagHandler) {
  JavaDoc.JavaDocTagList tagList = this.executableElement.getJavaDoc(tagHandler).get("returnWrapped");
  String returnWrapped = tagList == null || tagList.isEmpty() ? null : tagList.get(0);
  if (returnWrapped != null) {
   int firstSpace = JavaDoc.indexOfFirstWhitespace(returnWrapped);
   if (firstSpace > 1) {
    if (returnWrapped.length() > firstSpace + 1) {
     String wrappedDoc = returnWrapped.substring(firstSpace + 1).trim();
     if (!wrappedDoc.isEmpty()) {
      return wrappedDoc;
     }
    }
   }
  }

  return super.get(tagHandler);
 }
}

代码示例来源:origin: stoicflame/enunciate

int spaceIndex = JavaDoc.indexOfFirstWhitespace(throwsDoc);
String exception = throwsDoc.substring(0, spaceIndex);
String throwsComment = "";

代码示例来源:origin: com.webcohesion.enunciate/enunciate-javac-support

int spaceIndex = JavaDoc.indexOfFirstWhitespace(throwsDoc);
String exception = throwsDoc.substring(0, spaceIndex);
String throwsComment = "";

代码示例来源:origin: stoicflame/enunciate

int spaceIndex = indexOfFirstWhitespace(line);

代码示例来源:origin: com.webcohesion.enunciate/enunciate-javac-support

int spaceIndex = indexOfFirstWhitespace(line);

代码示例来源:origin: stoicflame/enunciate

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-core

if (tagList != null) {
 for (String value : tagList) {
  int firstSpace = JavaDoc.indexOfFirstWhitespace(value);
  String mediaType = value.substring(0, firstSpace);
  if (syntax.isAssignableToMediaType(mediaType) && (firstSpace + 1) < value.length()) {

代码示例来源:origin: stoicflame/enunciate

if (tagList != null) {
 for (String value : tagList) {
  int firstSpace = JavaDoc.indexOfFirstWhitespace(value);
  String mediaType = value.substring(0, firstSpace);
  if (syntax.isAssignableToMediaType(mediaType) && (firstSpace + 1) < value.length()) {

代码示例来源:origin: stoicflame/enunciate

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 (inheritedTags != null) {
 for (String inheritedTag : inheritedTags) {
  if (paramName.equals(inheritedTag.substring(0, indexOfFirstWhitespace(inheritedTag)))) {
   inheritedValue = inheritedTag;
   break;

代码示例来源:origin: com.webcohesion.enunciate/enunciate-javac-support

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 (inheritedTags != null) {
 for (String inheritedTag : inheritedTags) {
  if (paramName.equals(inheritedTag.substring(0, indexOfFirstWhitespace(inheritedTag)))) {
   inheritedValue = inheritedTag;
   break;

代码示例来源:origin: stoicflame/enunciate

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 (doclets != null) {
 for (String doclet : doclets) {
  int firstspace = JavaDoc.indexOfFirstWhitespace(doclet);
  String code = 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 code = firstspace > 0 ? doclet.substring(0, firstspace) : doclet;
  String doc = ((firstspace > 0) && (firstspace + 1 < doclet.length())) ? doclet.substring(firstspace + 1) : "";

代码示例来源: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

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

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

if (doclets != null) {
 for (String doclet : doclets) {
  int firstspace = JavaDoc.indexOfFirstWhitespace(doclet);
  String code = 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 code = firstspace > 0 ? doclet.substring(0, firstspace) : doclet;
  String doc = ((firstspace > 0) && (firstspace + 1 < doclet.length())) ? doclet.substring(firstspace + 1) : "";

代码示例来源:origin: stoicflame/enunciate

if (localDoc.get("returnWrapped") != null) { //support jax-doclets. see http://jira.codehaus.org/browse/ENUNCIATE-690
 String returnWrapped = localDoc.get("returnWrapped").get(0);
 String fqn = returnWrapped.substring(0, JavaDoc.indexOfFirstWhitespace(returnWrapped)).trim();

相关文章