Class ValueTypeToStringConverter

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

    @NonNullByDefault
    public class ValueTypeToStringConverter
    extends Object
    implements org.eclipse.xtext.conversion.IValueConverter<@Nullable 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 @Nullable Object toValue​(@Nullable String string,
                                        @Nullable org.eclipse.xtext.nodemodel.INode node)
                                 throws org.eclipse.xtext.conversion.ValueConverterException
        Specified by:
        toValue in interface org.eclipse.xtext.conversion.IValueConverter<@Nullable Object>
        Throws:
        org.eclipse.xtext.conversion.ValueConverterException
      • toString

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

        protected String toEscapedString​(String value)