Interface ParseFromStringService

All Known Implementing Classes:
FromStringParserRegistry

public interface ParseFromStringService
This interface exposes only the FromStringParserRegistry.parseFromString(String, Type) method.

This interface gets implemented by the registry, not by individual parsers. Use FromStringParser for individual parsers.

  • Method Summary

    Modifier and Type
    Method
    Description
    Parses a string to obtain a value of the specified type.
  • Method Details

    • parseFromString

      Object parseFromString(String text, Type type) throws FromStringParserException
      Parses a string to obtain a value of the specified type.
      Parameters:
      text - the text to parse
      type - the type to convert to
      Returns:
      the converted value
      Throws:
      FromStringParserException - if conversion fails because the text does not conform to the expected format according to the type to convert to