org.eclipse.emf.codegen.jet
Class JETMark

java.lang.Object
  extended by org.eclipse.emf.codegen.jet.JETMark

public final class JETMark
extends java.lang.Object

A mark represents a point in the JET input.


Field Summary
protected  java.lang.String baseDir
          This is the base URI for relative paths.
protected  int col
          This is the column index.
protected  int cursor
          This is the character offset.
protected  java.lang.String encoding
          This is the encoding of the stream.
protected  int fileid
          This is the id of the file.
protected  java.util.Stack<org.eclipse.emf.codegen.jet.JETMark.IncludeState> includeStack
          This is the stack of inclusions.
protected  int line
          This is the line index.
protected  JETReader reader
          This is the reader that owns this mark.
protected  char[] stream
          This is the stream of characters.
 
Method Summary
 boolean equals(java.lang.Object other)
           
 java.lang.String format(java.lang.String key)
           
 java.lang.String getBaseURI()
           
 int getCursor()
           
 java.lang.String getFile()
           
 int getFileId()
           
 java.lang.String getLocalFile()
           
 boolean popStream()
          Restores this mark's state to a previously stored stream.
 void pushStream(char[] inStream, int inFileid, java.lang.String inBaseDir, java.lang.String inEncoding)
          Sets this mark's state to a new stream.
 java.lang.String toShortString()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cursor

protected int cursor
This is the character offset.


line

protected int line
This is the line index.


col

protected int col
This is the column index.


fileid

protected int fileid
This is the id of the file.


baseDir

protected java.lang.String baseDir
This is the base URI for relative paths.


stream

protected char[] stream
This is the stream of characters.


includeStack

protected java.util.Stack<org.eclipse.emf.codegen.jet.JETMark.IncludeState> includeStack
This is the stack of inclusions.


encoding

protected java.lang.String encoding
This is the encoding of the stream.


reader

protected JETReader reader
This is the reader that owns this mark.

Method Detail

pushStream

public void pushStream(char[] inStream,
                       int inFileid,
                       java.lang.String inBaseDir,
                       java.lang.String inEncoding)
Sets this mark's state to a new stream. It will store the current stream in it's includeStack.

Parameters:
inStream - new stream for mark
inFileid - id of new file from which stream comes from
inBaseDir - directory of file
inEncoding - encoding of new file

popStream

public boolean popStream()
Restores this mark's state to a previously stored stream.


getFile

public java.lang.String getFile()

getBaseURI

public java.lang.String getBaseURI()

getLocalFile

public java.lang.String getLocalFile()

getFileId

public int getFileId()

getCursor

public int getCursor()

toShortString

public java.lang.String toShortString()

toString

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

format

public java.lang.String format(java.lang.String key)

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.