Package net.ssehub.easy.dslCore.values
Class IntValueConverter
- All Implemented Interfaces:
org.eclipse.xtext.conversion.IValueConverter<Integer>,org.eclipse.xtext.conversion.IValueConverter.RuleSpecific
public class IntValueConverter
extends org.eclipse.xtext.conversion.impl.AbstractLexerBasedConverter<Integer>
Converts a string recognized by the grammar to an integer.
- Author:
- Holger Eichelberger
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.xtext.conversion.IValueConverter
org.eclipse.xtext.conversion.IValueConverter.RuleSpecific -
Field Summary
Fields inherited from interface org.eclipse.xtext.conversion.IValueConverter
NO_OP_CONVERTER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassertValidValue(Integer value) protected StringtoEscapedString(Integer value) Returns an integer value for the givenstringstored innode.Methods inherited from class org.eclipse.xtext.conversion.impl.AbstractLexerBasedConverter
assertTokens, assertTokens, createTokenContentMismatchException, createTokenTypeMismatchException, getLexer, getLexerProvider, getRule, getRuleName, getRuleName, getTokenDefMap, getTokenDefProvider, getTokenSource, setLexerProvider, setRule, setTokenDefProvider, toString
-
Constructor Details
-
IntValueConverter
public IntValueConverter()Creates the value converter instance.
-
-
Method Details
-
toEscapedString
- Overrides:
toEscapedStringin classorg.eclipse.xtext.conversion.impl.AbstractLexerBasedConverter<Integer>
-
assertValidValue
- Overrides:
assertValidValuein classorg.eclipse.xtext.conversion.impl.AbstractLexerBasedConverter<Integer>
-
toValue
Returns an integer value for the givenstringstored innode.- Parameters:
string- the version string to be convertednode- the node holding the string- Returns:
- the converted integer value
- Throws:
org.eclipse.xtext.conversion.ValueConverterException- in case of conversion problems
-