| Modifier and Type | Field and Description |
|---|---|
static Location |
TOPLEVEL |
static Location |
UNKNOWN |
| Constructor and Description |
|---|
SimpleLocation(java.lang.String displayString)
Creates a simple location with just the display string.
|
SimpleLocation(java.lang.String displayString,
java.lang.String containerName)
Creates a simple location with display string and the container name.
|
| Modifier and Type | Method and Description |
|---|---|
static Location |
convertFrom(com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location location,
ProtoElement element)
Create new instance of
SimpleLocation by converting from instance of
DescriptorProtos.SourceCodeInfo.Location |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getContainerName()
Get the name of the containing entity of this location, in most cases its a file name.
|
java.lang.String |
getDisplayString()
Get the location as a string readable to users and interpretable by IDEs.
|
int |
hashCode() |
java.lang.String |
toString() |
public static final Location TOPLEVEL
public static final Location UNKNOWN
public SimpleLocation(java.lang.String displayString)
containerName
is set to displayString.public SimpleLocation(java.lang.String displayString,
java.lang.String containerName)
public static Location convertFrom(com.google.protobuf.DescriptorProtos.SourceCodeInfo.Location location, ProtoElement element)
Create new instance of SimpleLocation by converting from instance of
DescriptorProtos.SourceCodeInfo.Location
The Display String structure is "proto name:line number:column number".
location - Instance DescriptorProtos.SourceCodeInfo.Locationelement - ProtoElement associated with the given location.public java.lang.String getDisplayString()
LocationgetDisplayString in interface Locationpublic java.lang.String getContainerName()
LocationgetContainerName in interface Locationpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object