public final class TokenFactory extends Object
Tokens can be instantiated from an expression which is specific to each token.
TokenLiteral
,
TokenVariable
Modifier and Type | Class and Description |
---|---|
static class |
TokenFactory.Syntax
A syntax to use for creating tokens.
|
Modifier and Type | Method and Description |
---|---|
static TokenFactory |
getInstance()
Returns a token factory instance using the default syntax (DRAFTX).
|
static TokenFactory |
getInstance(TokenFactory.Syntax syntax)
Returns a token factory instance.
|
Token |
newToken(String exp)
Generates the token corresponding to the specified expression.
|
public Token newToken(String exp)
exp
- The expression.URITemplateSyntaxException
- If the expression could not be parsed as a valid token.public static TokenFactory getInstance()
public static TokenFactory getInstance(TokenFactory.Syntax syntax)
syntax
- The syntax to use for the token factory.Copyright © 2016 Allette Systems. All rights reserved.