public class DefaultTerminalConverter extends AbstractLexerBasedConverter<java.lang.Object>
Modifier and Type | Class and Description |
---|---|
static class |
DefaultTerminalConverter.Factory |
IValueConverter.RuleSpecific
NO_OP_CONVERTER
Modifier | Constructor and Description |
---|---|
protected |
DefaultTerminalConverter() |
Modifier and Type | Method and Description |
---|---|
protected void |
setDataType(org.eclipse.emf.ecore.EDataType dataType) |
protected java.lang.String |
toEscapedString(java.lang.Object value) |
java.lang.Object |
toValue(java.lang.String string,
INode node)
Creates a value from the given input.
|
assertTokens, assertValidValue, createTokenContentMismatchException, createTokenTypeMismatchException, getLexer, getLexerProvider, getRule, getRuleName, getRuleName, getTokenDefMap, getTokenDefProvider, getTokenSource, setLexerProvider, setRule, setTokenDefProvider, toString
protected void setDataType(org.eclipse.emf.ecore.EDataType dataType)
public java.lang.Object toValue(java.lang.String string, INode node) throws ValueConverterException
IValueConverter
Creates a value from the given input. The input is conformant to a data type or terminal rule.
The given string
or node
may be null but not both of them.
string
- the string that was inferred from the node. Usually the node's text
but may be reduced to the parts of the node that are not
hidden
.node
- the parsed node including hidden parts.null
.ValueConverterException
- indicates that the string or node did not fulfil
the expected format.protected java.lang.String toEscapedString(java.lang.Object value)
toEscapedString
in class AbstractLexerBasedConverter<java.lang.Object>