Class IdentifierValueConverter

  • All Implemented Interfaces:
    org.eclipse.xtext.conversion.IValueConverter<java.lang.String>, org.eclipse.xtext.conversion.IValueConverter.RuleSpecific

    public class IdentifierValueConverter
    extends org.eclipse.xtext.conversion.impl.AbstractLexerBasedConverter<java.lang.String>
    Converts version numbers by removing the leading "v".
    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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String toEscapedString​(java.lang.String value)  
      java.lang.String toValue​(java.lang.String string, org.eclipse.xtext.nodemodel.INode node)
      Returns a value for the given version string stored in node.
      • Methods inherited from class org.eclipse.xtext.conversion.impl.AbstractLexerBasedConverter

        assertTokens, assertTokens, assertValidValue, createTokenContentMismatchException, createTokenTypeMismatchException, getLexer, getLexerProvider, getRule, getRuleName, getRuleName, getTokenDefMap, getTokenDefProvider, getTokenSource, setLexerProvider, setRule, setTokenDefProvider, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IdentifierValueConverter

        public IdentifierValueConverter()
    • Method Detail

      • toEscapedString

        protected java.lang.String toEscapedString​(java.lang.String value)
        Overrides:
        toEscapedString in class org.eclipse.xtext.conversion.impl.AbstractLexerBasedConverter<java.lang.String>
      • toValue

        public java.lang.String toValue​(java.lang.String string,
                                        org.eclipse.xtext.nodemodel.INode node)
        Returns a value for the given version string stored in node.
        Parameters:
        string - the version string to be converted
        node - the node holding the string
        Returns:
        the converted string
        Throws:
        org.eclipse.xtext.conversion.ValueConverterException - in case of conversion problems