public abstract class AbstractLexerBasedConverter<T> extends AbstractValueConverter<T> implements IValueConverter.RuleSpecific
IValueConverter.RuleSpecificNO_OP_CONVERTER| Constructor and Description |
|---|
AbstractLexerBasedConverter() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertTokens(T value,
String result) |
protected void |
assertTokens(T value,
org.antlr.runtime.TokenSource tokenSource,
String escapedString) |
protected void |
assertValidValue(T value) |
protected ValueConverterException |
createTokenContentMismatchException(T value,
String escapedString,
org.antlr.runtime.Token token) |
protected ValueConverterException |
createTokenTypeMismatchException(T value,
String escapedString,
org.antlr.runtime.Token token) |
protected Lexer |
getLexer() |
protected com.google.inject.Provider<Lexer> |
getLexerProvider() |
protected AbstractRule |
getRule() |
protected String |
getRuleName() |
protected String |
getRuleName(org.antlr.runtime.Token token) |
protected Map<Integer,String> |
getTokenDefMap() |
protected ITokenDefProvider |
getTokenDefProvider() |
protected org.antlr.runtime.TokenSource |
getTokenSource(String escapedValue) |
void |
setLexerProvider(com.google.inject.Provider<Lexer> lexerProvider) |
void |
setRule(AbstractRule rule) |
void |
setTokenDefProvider(ITokenDefProvider tokenDefProvider) |
protected String |
toEscapedString(T value) |
String |
toString(T value)
Transforms the given value to a string that is conformant to the expected
terminal or data type rule.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoValuepublic String toString(T value)
IValueConvertertoString in interface IValueConverter<T>value - the to-be-transformed valueprotected void assertTokens(T value, org.antlr.runtime.TokenSource tokenSource, String escapedString)
protected ValueConverterException createTokenTypeMismatchException(T value, String escapedString, org.antlr.runtime.Token token)
protected ValueConverterException createTokenContentMismatchException(T value, String escapedString, org.antlr.runtime.Token token)
protected org.antlr.runtime.TokenSource getTokenSource(String escapedValue)
protected void assertValidValue(T value)
protected String getRuleName()
protected Lexer getLexer()
protected String getRuleName(org.antlr.runtime.Token token)
protected AbstractRule getRule()
public void setRule(AbstractRule rule)
setRule in interface IValueConverter.RuleSpecificpublic void setLexerProvider(com.google.inject.Provider<Lexer> lexerProvider)
public void setTokenDefProvider(ITokenDefProvider tokenDefProvider)
protected ITokenDefProvider getTokenDefProvider()
protected com.google.inject.Provider<Lexer> getLexerProvider()
Copyright © 2015. All Rights Reserved.