android.databinding.tool.store
Class Location

java.lang.Object
  extended by 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.


Field Summary
 int endLine
           
 int endOffset
           
static int NaN
           
 Location parentLocation
           
 int startLine
           
 int startOffset
           
 
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)
           
 
Method Summary
 boolean contains(Location other)
           
 LocationScopeProvider createScope()
           
 boolean equals(java.lang.Object o)
           
static Location fromUserReadableString(java.lang.String str)
           
 int hashCode()
           
 boolean isValid()
           
 void setParentLocation(Location parentLocation)
           
 Location toAbsoluteLocation()
           
 java.lang.String toString()
           
 java.lang.String toUserReadableString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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:
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()