android.databinding.tool.store
Class Location
java.lang.Object
android.databinding.tool.store.Location
public class Location
- extends java.lang.Object
Identifies 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.
Constructor Summary |
Location()
|
Location(int startLine,
int startOffset,
int endLine,
int endOffset)
|
Location(Location other)
|
Location(org.antlr.v4.runtime.ParserRuleContext context)
|
Location(org.antlr.v4.runtime.Token start,
org.antlr.v4.runtime.Token end)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
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
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)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
setParentLocation
public void setParentLocation(Location parentLocation)
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.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()