public final class Location extends Object
a/b/c/ClassName$SubClas1$SubClass2.java:123
or
a/b/c/ClassName$SubClas1$SubClass2.java:methodName()
Modifier and Type | Class and Description |
---|---|
static interface |
Location.Finder |
Constructor and Description |
---|
Location(String loc)
Deprecated.
in favor of Location.parseLocation(java.lang.String)
|
Location(String fileName,
String target)
Deprecated.
in favor of Location.parseLocation(java.lang.String)
|
Modifier and Type | Method and Description |
---|---|
String |
getFileName() |
Integer |
getLineNum() |
String |
getTarget() |
boolean |
isLine() |
boolean |
isMethod() |
static Location |
locationFromCallStackItem(String item) |
static Location |
parseLocation(String loc)
Parses the given string in the format
a/b/c/ClassName$SubClas1$SubClass2.java:123 or
a/b/c/ClassName$SubClas1$SubClass2.java:methodName() to a Location |
String |
toString() |
Location |
withNoTarget()
Returns a new location instance without the target(line number or method name)
of this location.
|
@Deprecated public Location(String loc)
loc
- the string representation of the location@Deprecated public Location(String fileName, String target)
fileName
- the file name part of the locationtarget
- the line number or method name.public static Location parseLocation(String loc)
a/b/c/ClassName$SubClas1$SubClass2.java:123
or
a/b/c/ClassName$SubClas1$SubClass2.java:methodName()
to a Locationloc
- the location Stringpublic Location withNoTarget()
public String getFileName()
public String getTarget()
public Integer getLineNum()
public boolean isLine()
public boolean isMethod()