Package software.amazon.smithy.model
Class SourceLocation
java.lang.Object
software.amazon.smithy.model.SourceLocation
- All Implemented Interfaces:
 Comparable<SourceLocation>,FromSourceLocation
public final class SourceLocation
extends Object
implements FromSourceLocation, Comparable<SourceLocation>
Represents the source location of a model component.
- 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionSourceLocation(String filename) SourceLocation(String filename, int line, int column)  - 
Method Summary
Modifier and TypeMethodDescriptionintbooleanintintgetLine()Gets the source location of a value.inthashCode()static SourceLocationnone()Creates an empty source location.toString() 
- 
Field Details
- 
NONE
 
 - 
 - 
Constructor Details
- 
SourceLocation
 - 
SourceLocation
 
 - 
 - 
Method Details
- 
none
Creates an empty source location.- Returns:
 - Returns the empty location.
 
 - 
getFilename
- Returns:
 - Returns the source location filename.
 
 - 
getLine
public int getLine()- Returns:
 - Returns the line number from which the component originated.
 
 - 
getColumn
public int getColumn()- Returns:
 - Returns the column from which the component originated.
 
 - 
getSourceLocation
Description copied from interface:FromSourceLocationGets the source location of a value.- Specified by:
 getSourceLocationin interfaceFromSourceLocation- Returns:
 - Returns the source location of the value.
 
 - 
toString
 - 
equals
 - 
hashCode
public int hashCode() - 
compareTo
- Specified by:
 compareToin interfaceComparable<SourceLocation>
 
 -