com.steadystate.css.parser
Class LocatorImpl

java.lang.Object
  extended by com.steadystate.css.parser.LocatorImpl
All Implemented Interfaces:
Serializable, Locator

public class LocatorImpl
extends Object
implements Locator, Serializable

Implementation of Locator.

Version:
$Id: LocatorImpl.java,v 1.2 2008/03/26 02:08:55 sdanig Exp $
Author:
David Schweinsberg
See Also:
Serialized Form

Constructor Summary
LocatorImpl()
           
LocatorImpl(String uri, int line, int column)
          Creates new LocatorImpl
 
Method Summary
 int getColumnNumber()
          Return the column number where the current document event ends.
 int getLineNumber()
          Return the line number where the current document event ends.
 String getUri()
           
 String getURI()
          Return the URI for the current document event.
 void setColumnNumber(int column)
           
 void setLineNumber(int line)
           
 void setUri(String uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocatorImpl

public LocatorImpl(String uri,
                   int line,
                   int column)
Creates new LocatorImpl


LocatorImpl

public LocatorImpl()
Method Detail

getUri

public String getUri()

setUri

public void setUri(String uri)

setLineNumber

public void setLineNumber(int line)

setColumnNumber

public void setColumnNumber(int column)

getLineNumber

public int getLineNumber()
Return the line number where the current document event ends. Note that this is the line position of the first character after the text associated with the document event.

Specified by:
getLineNumber in interface Locator
Returns:
The line number, or -1 if none is available.
See Also:
getColumnNumber()

getURI

public String getURI()
Return the URI for the current document event.

The parser must resolve the URI fully before passing it to the application.

Specified by:
getURI in interface Locator
Returns:
A string containing the URI, or null if none is available.

getColumnNumber

public int getColumnNumber()
Return the column number where the current document event ends. Note that this is the column number of the first character after the text associated with the document event. The first column in a line is position 1.

Specified by:
getColumnNumber in interface Locator
Returns:
The column number, or -1 if none is available.
See Also:
getLineNumber()


Copyright © 2011. All Rights Reserved.