软件包  jdk.nashorn.api.tree

Interface LineMap


  • @Deprecated(since="11",
                forRemoval=true)
    public interface LineMap
    Deprecated, for removal: This API element is subject to removal in a future version.
    Nashorn JavaScript script engine and APIs, and the jjs tool are deprecated with the intent to remove them in a future release.
    提供在编译单元的字符位置和行号之间进行转换的方法。
    从以下版本开始:
    9
    • 方法摘要

      所有方法  实例方法 抽象方法  弃用的方法 
      变量和类型 方法 描述
      long getColumnNumber​(long pos)
      不推荐使用,要删除:此API元素将在以后的版本中删除。
      找到字符位置的列。
      long getLineNumber​(long pos)
      不推荐使用,要删除:此API元素将在以后的版本中删除。
      找到包含位置的行; 行终止字符在它终止的行上。
    • 方法详细信息

      • getLineNumber

        long getLineNumber​(long pos)
        Deprecated, for removal: This API element is subject to removal in a future version.
        找到包含位置的行; 行终止字符在它终止的行上。
        参数
        pos - 位置的字符偏移量
        结果
        pos的行号(第一行是1)
      • getColumnNumber

        long getColumnNumber​(long pos)
        Deprecated, for removal: This API element is subject to removal in a future version.
        找到字符位置的列。 计算列号时,将展开同一行上位置前面的制表符。
        参数
        pos - 位置的字符偏移量
        结果
        tab的扩展列号(第一列为1)