Class TokenConverters

    • Method Detail

      • getConverter

        public static TokenConverter getConverter​(TokenValued value)
        Creates a converter, bound to the given value
        Parameters:
        value - the value to bind to
        Returns:
        a converter, bound to the given value
      • getConverter

        public static TokenConverter getConverter​(TokenType type)
        Creates a converter appropriate for the given type. The converter returned can only be used for values of the type.
        Parameters:
        type - the token type for which to create a converter
        Returns:
        a new converter object
      • getConverters

        public static TokenConverter[] getConverters​(RecordTokenType type)
        Creates an array of converters for each scalar type in the given record type.
        Parameters:
        type - record type
        Returns:
        array of converters, one for each scalar field (in order)
      • getConverters

        public static TokenConverter[] getConverters​(RecordValued value)
        Creates an array of converters for each scalar field in the given record value. Each created converter is bound to it's input field.
        Parameters:
        value - a record valued source
        Returns:
        array of converters, one for each scalar input (in order) bound to the input