org.jruby.lexer.yacc
Class SimpleSourcePosition

java.lang.Object
  extended by org.jruby.lexer.yacc.SimpleSourcePosition
All Implemented Interfaces:
ISourcePosition, PositionAware

public class SimpleSourcePosition
extends java.lang.Object
implements ISourcePosition


Field Summary
 
Fields inherited from interface org.jruby.lexer.yacc.ISourcePosition
INVALID_POSITION
 
Constructor Summary
SimpleSourcePosition(java.lang.String filename, int line)
           
 
Method Summary
 java.lang.String getFile()
          Which file does this source position live in?
 int getLine()
          Get the line number for the method.
 int getStartLine()
          Which is the first(start) line that this source position occurs on (zero-based)
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleSourcePosition

public SimpleSourcePosition(java.lang.String filename,
                            int line)
Method Detail

getFile

public java.lang.String getFile()
Description copied from interface: ISourcePosition
Which file does this source position live in?

Specified by:
getFile in interface ISourcePosition
Specified by:
getFile in interface PositionAware
Returns:
name of the source file.

getStartLine

public int getStartLine()
Description copied from interface: ISourcePosition
Which is the first(start) line that this source position occurs on (zero-based)

Specified by:
getStartLine in interface ISourcePosition
Returns:

getLine

public int getLine()
Description copied from interface: PositionAware
Get the line number for the method.

Specified by:
getLine in interface PositionAware
Returns:
the line number for the method

toString

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


Copyright © 2002-2009 JRuby Team. All Rights Reserved.