|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.scanner.type.token.AbstractToken
org.extex.scanner.type.token.ControlSequenceToken
public class ControlSequenceToken
This class represents a control sequence token.
This class has a protected constructor only. Use the factory
TokenFactory to get an
instance of this class.
Note that in contrast to
| Field Summary | |
|---|---|
protected static long |
serialVersionUID
The constant serialVersionUID contains the id for serialization. |
| Constructor Summary | |
|---|---|
protected |
ControlSequenceToken(UnicodeChar esc,
java.lang.String name,
java.lang.String namespace)
Creates a new object from the first character of a String. |
| Method Summary | |
|---|---|
CodeToken |
cloneInDefaultNamespace()
Create a new instance of the token where the name space is the default name space and the other attributes are the same as for the current token. |
CodeToken |
cloneInNamespace(java.lang.String theNamespace)
Create a new instance of the token where the name space is the given one and the other attributes are the same as for the current token. |
boolean |
eq(Catcode cc,
char c)
Compare the current token with a pair of catcode and character value. |
boolean |
eq(Catcode cc,
java.lang.String s)
Compare the current token with a pair of catcode and String value. |
boolean |
eq(char c)
Compare the current token with a character value. |
boolean |
equals(java.lang.Object other)
Indicates whether some other object is "equal to" this one. |
Catcode |
getCatcode()
Getter for the catcode. |
java.lang.String |
getName()
Getter for the name. |
java.lang.String |
getNamespace()
Getter for the name space. |
int |
hashCode()
Returns a hash code value for the object. |
java.lang.String |
toString()
Get the string representation of this object for debugging purposes. |
void |
toString(java.lang.StringBuffer sb)
Print the token into a StringBuffer. |
void |
toString(java.lang.StringBuilder sb)
Print the token into a StringBuilder. |
java.lang.String |
toText()
Return the text representation of this object. |
java.lang.String |
toText(UnicodeChar esc)
Return the printable representation of this token as it can be read back in. |
java.lang.Object |
visit(TokenVisitor visitor,
java.lang.Object arg1)
Invoke the appropriate visit method for the current class. |
| Methods inherited from class org.extex.scanner.type.token.AbstractToken |
|---|
getChar, getLocalizer, isa |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.extex.scanner.type.token.Token |
|---|
getChar, isa |
| Field Detail |
|---|
protected static final long serialVersionUID
| Constructor Detail |
|---|
protected ControlSequenceToken(UnicodeChar esc,
java.lang.String name,
java.lang.String namespace)
esc - the escape charactername - the name of the control sequence – without the leading
escape character tokennamespace - the name space| Method Detail |
|---|
public CodeToken cloneInDefaultNamespace()
cloneInDefaultNamespace in interface CodeTokenCodeToken.cloneInDefaultNamespace()public CodeToken cloneInNamespace(java.lang.String theNamespace)
cloneInNamespace in interface CodeTokentheNamespace - the name space to use
CodeToken.cloneInNamespace(
java.lang.String)
public boolean eq(Catcode cc,
char c)
eq in interface Tokeneq in class AbstractTokencc - the catcodec - the value
true iff the tokens are equalAbstractToken.eq(
org.extex.scanner.type.Catcode, char)
public boolean eq(Catcode cc,
java.lang.String s)
eq in interface Tokeneq in class AbstractTokencc - the catcodes - the value
true iff the tokens are equalToken.eq(
org.extex.scanner.type.Catcode, java.lang.String)public boolean eq(char c)
eq in interface Tokeneq in class AbstractTokenc - the value
true iff the tokens are equalAbstractToken.eq(char)public boolean equals(java.lang.Object other)
equals in interface Tokenequals in class AbstractTokenother - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwise.Object.equals(java.lang.Object)public Catcode getCatcode()
getCatcode in interface TokengetCatcode in class AbstractTokenToken.getCatcode()public java.lang.String getName()
getName in interface CodeTokenCodeToken.getName()public java.lang.String getNamespace()
getNamespace in interface CodeTokenCodeToken.getNamespace()public int hashCode()
hashCode in class AbstractTokenObject.hashCode()public java.lang.String toString()
toString in class AbstractTokenpublic void toString(java.lang.StringBuffer sb)
toString in interface Tokensb - the target string bufferToken.toString(java.lang.StringBuffer)public void toString(java.lang.StringBuilder sb)
toString in interface Tokensb - the target string builderToken.toString(java.lang.StringBuilder)public java.lang.String toText()
toText in interface TokentoText in class AbstractTokenAbstractToken.toText()public java.lang.String toText(UnicodeChar esc)
toText in interface TokentoText in class AbstractTokenesc - the escape character
Token.toText(
org.extex.core.UnicodeChar)
public java.lang.Object visit(TokenVisitor visitor,
java.lang.Object arg1)
throws java.lang.Exception
visit in interface Tokenvisitor - the calling visitorarg1 - the first argument to pass
java.lang.Exception - in case of an errorToken.visit(
org.extex.scanner.type.token.TokenVisitor, java.lang.Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||