Package net.ssehub.easy.dslCore.values
Class StringValueConverter
- All Implemented Interfaces:
org.eclipse.xtext.conversion.IValueConverter<String>,org.eclipse.xtext.conversion.IValueConverter.RuleSpecific
public class StringValueConverter
extends org.eclipse.xtext.conversion.impl.AbstractLexerBasedConverter<String>
Converts strings recognized by the grammar to float values.
- 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(String value) protected StringtoEscapedString(String value) Returns a double 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
-
StringValueConverter
public StringValueConverter()Creates a float value converter.
-
-
Method Details
-
toEscapedString
- Overrides:
toEscapedStringin classorg.eclipse.xtext.conversion.impl.AbstractLexerBasedConverter<String>
-
assertValidValue
- Overrides:
assertValidValuein classorg.eclipse.xtext.conversion.impl.AbstractLexerBasedConverter<String>
-
toValue
Returns a double value for the givenstringstored innode.- Parameters:
string- the version string to be convertednode- the node holding the string- Returns:
- the converted double value
-