Class ErrorLocation
java.lang.Object
net.orbyfied.j8.command.exception.ErrorLocation
The location of an error in
a string.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionErrorLocation(net.orbyfied.j8.util.StringReader reader, int fromIndex, int toIndex) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintgetLocationString(int prevStart, int prevEnd) Create a nicely formatted error location string.net.orbyfied.j8.util.StringReaderint
-
Field Details
-
reader
protected net.orbyfied.j8.util.StringReader readerThe string (reader). -
fromIndex
protected int fromIndexThe start index. -
toIndex
protected int toIndexThe end index.
-
-
Constructor Details
-
ErrorLocation
public ErrorLocation(net.orbyfied.j8.util.StringReader reader, int fromIndex, int toIndex) Constructor.- Parameters:
reader- The string reader.fromIndex- The start of the problematic segment.toIndex- The end of the problematic segment.
-
-
Method Details
-
getStartIndex
public int getStartIndex() -
getEndIndex
public int getEndIndex() -
getReader
public net.orbyfied.j8.util.StringReader getReader() -
getLocationString
- See Also:
-
getLocationString
Create a nicely formatted error location string.- Parameters:
prevStart- The preview length on the start.prevEnd- The preview length on the end.- Returns:
- The string. TODO: change to components with j8-message api
-