de.interactive_instruments.ShapeChange.Ocl
Class SourceReference

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Ocl.SourceReference

public class SourceReference
extends Object

A SourceReference object stands for a distinct source reference in a line of OCL code. SourceReference objects are initially created in the Lexer, they are, however, kept and maintained in higher value syntactical constructs until they are finally used in diagnostic messages.
All reference numbers count from zero. The end column points to the last character, not the one following it.

Version:
0.1
Author:
Reinhard Erstling (c) interactive instruments GmbH, Bonn, Germany

Method Summary
 short getColumnFrom()
          This function is for inquiring the start column from a Source Reference.
 short getColumnTo()
          This function is for inquiring the end column from a Source Reference.
 short getLineNumber()
          This function is for inquiring the line number from a SourceReference.
 short getTokenFrom()
          This function is for inquiring the start token number from a Source Reference.
 short getTokenTo()
          This function is for inquiring the end token number from a Source Reference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLineNumber

public short getLineNumber()
This function is for inquiring the line number from a SourceReference.

Returns:
Line number counting from zero.

getColumnFrom

public short getColumnFrom()
This function is for inquiring the start column from a Source Reference.

Returns:
First column in line counting from zero.

getColumnTo

public short getColumnTo()
This function is for inquiring the end column from a Source Reference.

Returns:
Last column in line counting from zero.

getTokenFrom

public short getTokenFrom()
This function is for inquiring the start token number from a Source Reference.

Returns:
1st token serial number in source reference

getTokenTo

public short getTokenTo()
This function is for inquiring the end token number from a Source Reference.

Returns:
Last token serial number in source reference


Copyright © 2015. All rights reserved.