Class ValueTypeToStringConverter

  • All Implemented Interfaces:
    org.eclipse.xtext.conversion.IValueConverter<Object>

    public class ValueTypeToStringConverter
    extends Object
    implements org.eclipse.xtext.conversion.IValueConverter<Object>
    A ValueTypeToStringConverter is used to create a String, Boolean, or BigDecimal from an input string and vice versa.
    Author:
    Alex Tugarev - Initial contribution
    • Constructor Detail

      • ValueTypeToStringConverter

        public ValueTypeToStringConverter()
    • Method Detail

      • toValue

        public Object toValue​(String string,
                              org.eclipse.xtext.nodemodel.INode node)
                       throws org.eclipse.xtext.conversion.ValueConverterException
        Specified by:
        toValue in interface org.eclipse.xtext.conversion.IValueConverter<Object>
        Throws:
        org.eclipse.xtext.conversion.ValueConverterException
      • toString

        public String toString​(Object value)
                        throws org.eclipse.xtext.conversion.ValueConverterException
        Specified by:
        toString in interface org.eclipse.xtext.conversion.IValueConverter<Object>
        Throws:
        org.eclipse.xtext.conversion.ValueConverterException
      • toEscapedString

        protected String toEscapedString​(String value)