|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tribble.io.CharDfl
public class CharDfl
Default generic source character.
This is a default implementation of a character class that is capable of representing a single character. Such a class can be used to hold a single text character read from a source file, containing information in addition to the character code itself such as the source line, column number, and filename from which the character was read.
CharInputStreamI
Field Summary | |
---|---|
protected int |
m_char
Character code. |
protected int |
m_colNo
Source column number. |
protected java.lang.String |
m_fName
Source filename. |
protected int |
m_lineNo
Source line number. |
(package private) static java.lang.String |
REV
Revision information. |
Constructor Summary | |
---|---|
CharDfl()
Constructor. |
|
CharDfl(char ch)
Constructor. |
Method Summary | |
---|---|
char |
getChar()
Retrieves the character code of this character. |
int |
getColNo()
Retrieves the source column number of this character. |
java.lang.String |
getFileName()
Retrieves the source filename of this character. |
int |
getLineNo()
Retrieves the source line number of this character. |
void |
setChar(char ch)
Establishes the character code of this character. |
void |
setFileName(java.lang.String fname)
Establishes the source filename of this character. |
void |
setLineNo(int ln,
int col)
Establishes the source line number and column number of this character. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final java.lang.String REV
protected int m_char
protected int m_lineNo
protected int m_colNo
protected java.lang.String m_fName
Constructor Detail |
---|
public CharDfl()
public CharDfl(char ch)
ch
- The character code for this character.Method Detail |
---|
public void setChar(char ch)
setChar
in interface CharI
ch
- The character code for this character.public char getChar()
getChar
in interface CharI
public void setLineNo(int ln, int col)
setLineNo
in interface CharI
ln
- The source line number for this character.col
- The source column number for this token.public int getLineNo()
getLineNo
in interface CharI
public int getColNo()
getColNo
in interface CharI
public void setFileName(java.lang.String fname)
setFileName
in interface CharI
fname
- The source filename for this character.public java.lang.String getFileName()
getFileName
in interface CharI
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |