Interface Converter

All Superinterfaces:
PropertyEditor
All Known Implementing Classes:
AbstractCollectionConverter, AbstractConverter, AbstractMapConverter, ArrayConverter, ArrayListEditor, BigDecimalEditor, BigIntegerEditor, BooleanEditor, ByteEditor, CharacterEditor, ClassEditor, ConstructorConverter, DateEditor, DoubleEditor, EnumConverter, FileEditor, FloatEditor, GenericCollectionConverter, GenericMapConverter, HashMapEditor, HashtableEditor, IdentityHashMapEditor, Inet4AddressEditor, Inet6AddressEditor, InetAddressEditor, IntegerEditor, JndiConverter, LinkedHashMapEditor, LinkedHashSetEditor, LinkedListEditor, ListEditor, LoggerConverter, LongEditor, MapEditor, ObjectNameEditor, PatternConverter, PropertiesEditor, PropertyEditorConverter, PrototypeArrayConverter, SetEditor, ShortEditor, SortedMapEditor, SortedSetEditor, StaticFactoryConverter, StringEditor, TreeMapEditor, TreeSetEditor, URIEditor, URLEditor, VectorEditor, WeakHashMapEditor

public interface Converter extends PropertyEditor
Version:
$Rev: 6680 $ $Date: 2005-12-24T04:38:27.427468Z $
  • Method Details

    • getType

      Gets the the type of object supported by this converter.
      Returns:
      the type used for that converter.
    • toString

      Converts the supplied object to text. If value is null, null will be returned. If value is not an instance of the this converter's type, a PropertyEditorException will be thrown.
      Parameters:
      value - an instance of the editor type
      Returns:
      the text equivalent of the value
      Throws:
      PropertyEditorException - if an error occurs while converting the value to a String (this is very rare)
    • toObject

      Converts the supplied text in to an instance of the editor type. If text is null, null will be returned.
      Parameters:
      text - the text to convert
      Returns:
      an instance of the editor type
      Throws:
      PropertyEditorException - if an error occurs while converting the text to an object