Class SourceLocation

  • All Implemented Interfaces:
    FromSourceLocation

    public final class SourceLocation
    extends java.lang.Object
    implements FromSourceLocation
    Represents the source location of a model component.
    • Constructor Summary

      Constructors 
      Constructor Description
      SourceLocation​(java.lang.String filename)  
      SourceLocation​(java.lang.String filename, int line, int column)  
    • Method Summary

      Modifier and Type Method Description
      boolean equals​(java.lang.Object other)  
      int getColumn()  
      java.lang.String getFilename()  
      int getLine()  
      SourceLocation getSourceLocation()
      Gets the source location of a value.
      int hashCode()  
      static SourceLocation none()
      Creates an empty source location.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SourceLocation

        public SourceLocation​(java.lang.String filename,
                              int line,
                              int column)
      • SourceLocation

        public SourceLocation​(java.lang.String filename)
    • Method Detail

      • none

        public static SourceLocation none()
        Creates an empty source location.
        Returns:
        Returns the empty location.
      • getFilename

        public java.lang.String 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.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object