|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the interface for the token factory. The token factory is the only instance to deliver new tokens. It is up to the implementation of the factory to create new tokens or to cache some of them and deliver the same token several times.
Method Summary | |
Token |
createToken(Catcode code,
int c,
java.lang.String namespace)
Create a new Token of the
appropriate kind. |
Token |
createToken(Catcode code,
UnicodeChar c,
java.lang.String namespace)
Get an instance of a token with a given Catcode and Unicode character value. |
Token |
createToken(Catcode code,
UnicodeChar esc,
java.lang.String value,
java.lang.String namespace)
Get an instance of a token with a given Catcode and value. |
Method Detail |
public Token createToken(Catcode code, UnicodeChar esc, java.lang.String value, java.lang.String namespace) throws CatcodeException
code
- the catcodeesc
- the Unicode character value of the escape charactervalue
- the valuenamespace
- the name space for the token. This is relevant for
ACTIVE and ESCAPE catcodes only.
CatcodeException
- in case of an errorpublic Token createToken(Catcode code, int c, java.lang.String namespace) throws CatcodeException
Token
of the
appropriate kind. Tokens are immutable (no setters) thus the factory
pattern can be applied.
code
- the category codec
- the character valuenamespace
- the name space to use
CatcodeException
- in case of an errorpublic Token createToken(Catcode code, UnicodeChar c, java.lang.String namespace) throws CatcodeException
code
- the catcodec
- the Unicode character valuenamespace
- the name space for the token. This is relevant for
ACTIVE and ESCAPE catcodes only.
CatcodeException
- in case of an error
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |