com.sun.javadoc.Tag.position()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(139)

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

Tag.position介绍

[英]Return the source position of this tag.
[中]返回此标记的源位置。

代码示例

代码示例来源:origin: apache/ignite

return "";
File f = tag.position().file();

代码示例来源:origin: apache/juneau

@Override
public String toString(Tag tag) {
  File f = tag.position().file();
  String label = tag.text();
  if (label == null || label.isEmpty())
    label = "Source";
  // Locate root directory as the one containing RELEASE-NOTES.txt
  if (JUNEAU_ROOT == null) {
    File f2 = f;
    while (true) {
      f2 = f2.getParentFile();
      if (f2 == null)
        break;
      File f3 = new File(f2, "RELEASE-NOTES.txt");
      if (f3.exists()) {
        JUNEAU_ROOT = f2.getAbsolutePath();
        break;
      }
    }
  }
  if (JUNEAU_ROOT == null)
    return label;
  String path = f.getAbsolutePath();
  String href = GITHUB_LINK + path.substring(JUNEAU_ROOT.length());
  return "<a class='doclink' href='" + href + "'>" + label + "</a>";
}

代码示例来源:origin: apache/juneau

@Override
public String toString(Tag tag) {
  File f = tag.position().file();
  String key = tag.text();
  String href = null;

代码示例来源:origin: konsoletyper/teavm-javac

private void checkOnPropertiesTags(MethodDoc[] members) {
  for (MethodDoc methodDoc: members) {
    if (methodDoc.isIncluded()) {
      for (Tag tag: methodDoc.tags()) {
        String tagName = tag.name();
        if (tagName.equals("@propertySetter")
            || tagName.equals("@propertyGetter")
            || tagName.equals("@propertyDescription")) {
          if (!isPropertyGetterOrSetter(members, methodDoc)) {
            configuration.message.warning(tag.position(),
                "doclet.javafx_tag_misuse");
          }
          break;
        }
      }
    }
  }
}

代码示例来源:origin: uk.org.retep.doclet/core

message.warning(tag.position(), "doclet.tag_misuse",
  "@" + taglet.getName(), holderType, combined_locations.toString());

代码示例来源:origin: konsoletyper/teavm-javac

message.warning(tag.position(), "doclet.tag_misuse",
  "@" + taglet.getName(), holderType, combined_locations.toString());

代码示例来源:origin: uk.org.retep.doclet/core

message.warning(tags[i].position(), "doclet.UnknownTagLowercase", tags[i].name());
  continue;
} else {
  message.warning(tags[i].position(), "doclet.UnknownTag", tags[i].name());
  continue;

代码示例来源:origin: konsoletyper/teavm-javac

message.warning(tags[i].position(), "doclet.UnknownTagLowercase", tags[i].name());
  continue;
} else {
  message.warning(tags[i].position(), "doclet.UnknownTag", tags[i].name());
  continue;

代码示例来源:origin: ch.raffael.pegdown-doclet/pegdown-doclet

doclet.printError(tag.position(), "Cannot handle tag for holder " + tag.holder());
  return;
int pos = CharMatcher.WHITESPACE.indexIn(source);
if ( pos < 0 ) {
  doclet.printError(tag.position(), "Invalid @startuml tag: Expected filename and PlantUML source");
  return;
  doclet.printError(tag.position(), "Error generating UML image " + outputFile + ": " + e.getLocalizedMessage());

相关文章