Package android.databinding.tool.store
Class Location
- java.lang.Object
-
- android.databinding.tool.store.Location
-
public class Location extends java.lang.ObjectIdentifies the range of a code block inside a file or a string. Note that, unlike antlr4 tokens, the line positions start from 0 (to be compatible with Studio).Both start and end line/column indices are inclusive.
-
-
Field Summary
Fields Modifier and Type Field Description intendLineintendOffsetstatic intNaNLocationparentLocationintstartLineintstartOffset
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(Location other)LocationScopeProvidercreateScope()booleanequals(java.lang.Object o)static LocationfromUserReadableString(java.lang.String str)inthashCode()booleanisValid()voidsetParentLocation(Location parentLocation)LocationtoAbsoluteLocation()java.lang.StringtoString()java.lang.StringtoUserReadableString()
-
-
-
Field Detail
-
NaN
public static final int NaN
- See Also:
- Constant Field Values
-
startLine
public int startLine
-
startOffset
public int startOffset
-
endLine
public int endLine
-
endOffset
public int endOffset
-
parentLocation
public Location parentLocation
-
-
Constructor Detail
-
Location
public Location()
-
Location
public Location(Location other)
-
Location
public Location(org.antlr.v4.runtime.Token start, org.antlr.v4.runtime.Token end)
-
Location
public Location(org.antlr.v4.runtime.ParserRuleContext context)
-
Location
public Location(int startLine, int startOffset, int endLine, int endOffset)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setParentLocation
public void setParentLocation(Location parentLocation)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
isValid
public boolean isValid()
-
contains
public boolean contains(Location other)
-
toAbsoluteLocation
public Location toAbsoluteLocation()
-
toUserReadableString
public java.lang.String toUserReadableString()
-
fromUserReadableString
public static Location fromUserReadableString(java.lang.String str)
-
createScope
public LocationScopeProvider createScope()
-
-