Class Locations

java.lang.Object
io.cucumber.gherkin.Locations

final class Locations extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static final int
    Columns are index-1 based.
    private static final Integer[]
    Cache of Long objects for the range 0-4095.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static io.cucumber.messages.types.Location
    atColumn(io.cucumber.messages.types.Location location, int column)
     
    (package private) static io.cucumber.messages.types.Location
    atLine(int line)
     
    private static Integer
    getInteger(int i)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • COLUMN_OFFSET

      static final int COLUMN_OFFSET
      Columns are index-1 based.
      See Also:
    • ints

      private static final Integer[] ints
      Cache of Long objects for the range 0-4095. This is used to avoid creating a huge amount of Long objects in getLocation(). We can't use Long.valueOf() because it caches only the first 128 values, and typical feature files have much more lines.
  • Constructor Details

    • Locations

      private Locations()
  • Method Details

    • getInteger

      private static Integer getInteger(int i)
    • atColumn

      static io.cucumber.messages.types.Location atColumn(io.cucumber.messages.types.Location location, int column)
    • atLine

      static io.cucumber.messages.types.Location atLine(int line)