org.jplate.foundation.source
Interface SourceIfc<S>

Type Parameters:
S - The real "source" (for instance, file, URL, etc).
All Superinterfaces:
FormattableIfc, java.io.Serializable
All Known Implementing Classes:
DefaultSource

public interface SourceIfc<S>
extends java.io.Serializable, FormattableIfc

Defines a source: meaning, the place from which something was defined as well as the line and column number where found. For instance, consider data contained in a file: the source defines three attributes - the file itself, the line number and column number in the file. For an example implementation and usage, please refer to DefaultSource.

Modifications:
    $Date: 2008-12-02 12:32:45 -0500 (Tue, 02 Dec 2008) $
    $Revision: 479 $
    $Author: sfloess $
    $HeadURL: https://jplate.svn.sourceforge.net/svnroot/jplate/trunk/src/dev/java/org/jplate/foundation/source/SourceIfc.java $
    

See Also:
DefaultSource

Field Summary
static int UNKNOWN_COLUMN
          Defines no known column in source.
static int UNKNOWN_LINE
          Defines no known line in source.
 
Method Summary
 int getColumn()
          Returns the column number in getSource().
 int getLine()
          Returns the line number in getSource().
 S getSource()
          Returns the actual "source." For instance if a source is defined by a File, the file represents the actual source.
 
Methods inherited from interface org.jplate.foundation.FormattableIfc
toString
 

Field Detail

UNKNOWN_LINE

static final int UNKNOWN_LINE
Defines no known line in source.

See Also:
Constant Field Values

UNKNOWN_COLUMN

static final int UNKNOWN_COLUMN
Defines no known column in source.

See Also:
Constant Field Values
Method Detail

getSource

S getSource()
Returns the actual "source." For instance if a source is defined by a File, the file represents the actual source.

Returns:
The source.

getLine

int getLine()
Returns the line number in getSource().

Returns:
The line number.

getColumn

int getColumn()
Returns the column number in getSource().

Returns:
The column number.