パッケージ com.kazurayam.ant

クラス Location

  • すべての実装されたインタフェース:
    java.io.Serializable

    public class Location
    extends java.lang.Object
    implements java.io.Serializable
    Stores the location of a piece of text within a file (file name, line number and column number). Note that the column number is currently ignored.
    関連項目:
    直列化された形式
    • フィールドの概要

      フィールド 
      修飾子とタイプ フィールド 説明
      static Location UNKNOWN_LOCATION
      Location to use when one is needed but no information is available
    • コンストラクタの概要

      コンストラクタ 
      コンストラクタ 説明
      Location​(java.lang.String fileName)
      Creates a location consisting of a file name but no line number or column number.
      Location​(java.lang.String fileName, int lineNumber, int columnNumber)
      Creates a location consisting of a file name, line number and column number.
      Location​(org.xml.sax.Locator loc)
      Creates a location from the SAX locator using the system ID as the filename.
    • フィールドの詳細

      • UNKNOWN_LOCATION

        public static final Location UNKNOWN_LOCATION
        Location to use when one is needed but no information is available
    • コンストラクタの詳細

      • Location

        public Location​(java.lang.String fileName)
        Creates a location consisting of a file name but no line number or column number.
        パラメータ:
        fileName - The name of the file. May be null, in which case the location is equivalent to UNKNOWN_LOCATION.
      • Location

        public Location​(org.xml.sax.Locator loc)
        Creates a location from the SAX locator using the system ID as the filename.
        パラメータ:
        loc - Must not be null.
        導入されたバージョン:
        Ant 1.6
      • Location

        public Location​(java.lang.String fileName,
                        int lineNumber,
                        int columnNumber)
        Creates a location consisting of a file name, line number and column number.
        パラメータ:
        fileName - The name of the file. May be null, in which case the location is equivalent to UNKNOWN_LOCATION.
        lineNumber - Line number within the file. Use 0 for unknown positions within a file.
        columnNumber - Column number within the line.
    • メソッドの詳細

      • getFileName

        public java.lang.String getFileName()
        戻り値:
        the filename portion of the location
        導入されたバージョン:
        Ant 1.6
      • getLineNumber

        public int getLineNumber()
        戻り値:
        the line number
        導入されたバージョン:
        Ant 1.6
      • getColumnNumber

        public int getColumnNumber()
        戻り値:
        the column number
        導入されたバージョン:
        Ant 1.7
      • toString

        public java.lang.String toString()
        Returns the file name, line number, a colon and a trailing space. An error message can be appended easily. For unknown locations, an empty string is returned.
        オーバーライド:
        toString クラス内 java.lang.Object
        戻り値:
        a String of the form "fileName:lineNumber: " if both file name and line number are known, "fileName: " if only the file name is known, and the empty string for unknown locations.
      • equals

        public boolean equals​(java.lang.Object other)
        Equality operation.
        オーバーライド:
        equals クラス内 java.lang.Object
        パラメータ:
        other - the object to compare to.
        戻り値:
        true if the other object contains the same information as this object.
        導入されたバージョン:
        Ant 1.6.3
      • hashCode

        public int hashCode()
        Hash operation.
        オーバーライド:
        hashCode クラス内 java.lang.Object
        戻り値:
        a hash code value for this location.
        導入されたバージョン:
        Ant 1.6.3