Class SourceLocation

java.lang.Object
autumn.lang.compiler.ast.nodes.SourceLocation

public final class SourceLocation extends Object
An instance of this class stores the source-location information for an enclosing construct.

Property Name Property Description
file (optional) This is the path to the source-code file.
line (optional) This is the one-based index of the line within the source-file.
column (optional) This is the one-based index of the column within the line within the source-file.
additional_info (optional) This is a place for things like IDEs to store additional location information.

This file was auto-generated on (Sun May 31 11:54:12 EDT 2015).

  • Constructor Details

    • SourceLocation

      public SourceLocation()
  • Method Details

    • setFile

      public SourceLocation setFile(URL value)
      Setter.
      Parameters:
      value - is the new value of property file.
      Returns:
      a copy of this object with property file set to value.
    • getFile

      public URL getFile()
      Getter.
      Returns:
      the value of property file.
    • setLine

      public SourceLocation setLine(Integer value)
      Setter.
      Parameters:
      value - is the new value of property line.
      Returns:
      a copy of this object with property line set to value.
    • getLine

      public Integer getLine()
      Getter.
      Returns:
      the value of property line.
    • setColumn

      public SourceLocation setColumn(Integer value)
      Setter.
      Parameters:
      value - is the new value of property column.
      Returns:
      a copy of this object with property column set to value.
    • getColumn

      public Integer getColumn()
      Getter.
      Returns:
      the value of property column.
    • setAdditionalInfo

      public SourceLocation setAdditionalInfo(Object value)
      Setter.
      Parameters:
      value - is the new value of property additional_info.
      Returns:
      a copy of this object with property additional_info set to value.
    • getAdditionalInfo

      public Object getAdditionalInfo()
      Getter.
      Returns:
      the value of property additional_info.
    • create

      public static SourceLocation create(URL file, Integer line, Integer column, Object additional_info)
      This method creates a new instance of this class.
      Parameters:
      file - is the value for property file.
      line - is the value for property line.
      column - is the value for property column.
      additional_info - is the value for property additional_info.
      Returns:
      a new instance of this class.
    • accept

      public void accept(IAstVisitor visitor)
      This method welcomes a visitor that wants to visit this object.
      Parameters:
      visitor - is the visitor that is visiting this object.
    • copy

      public SourceLocation copy()
      This method creates a shallow copy of this object.
      Returns:
      a shallow copy of this object.
    • toMap

      public Map<String,Object> toMap()
      This method creates a map representation of this struct.

      Each key is the name of a field. Each value is the result of calling the key field's getter.

      Returns:
      a map containing the entries in this struct.
    • toString

      public String toString()
      Overrides:
      toString in class Object