public final class Location
extends java.lang.Object
Both line and column numbers are assumed to be 1-based. That is the first character is on line 1, column 1.
Constructor and Description |
---|
Location(java.lang.String filename,
int line,
int column)
Deprecated.
Use
Location(URL, int, int) instead. |
Location(java.net.URL url,
int line,
int column)
Creates a new Location with the given resource location, line and column numbers.
|
Modifier and Type | Method and Description |
---|---|
static Location |
create(org.antlr.runtime.RecognitionException re)
This factory method can be used to create a Location for a RecognitionException.
|
int |
getColumn() |
java.net.URL |
getFileURL() |
int |
getLine() |
static boolean |
isValidLocation(Location location)
Checks if the given Location is valid, i.e.
|
java.lang.String |
toString()
Internal string representation.
|
@Deprecated public Location(java.lang.String filename, int line, int column) throws java.net.MalformedURLException
Location(URL, int, int)
instead.filename
- path to the resource of the Locationline
- line of the Locationcolumn
- column of the Locationjava.net.MalformedURLException
- if the given string is null or can not be parsed to URLpublic Location(java.net.URL url, int line, int column)
url
- location of the resourceline
- line of the Locationcolumn
- column of the Locationpublic static Location create(org.antlr.runtime.RecognitionException re)
re
- the RecognitionException to create a Location forpublic static boolean isValidLocation(Location location)
location
- the Location to checkpublic java.net.URL getFileURL()
public int getLine()
public int getColumn()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2003-2019 The KeY-Project.