Package org.apache.xbean.propertyeditor
Interface Converter
-
- All Superinterfaces:
java.beans.PropertyEditor
- All Known Implementing Classes:
AbstractCollectionConverter
,AbstractConverter
,AbstractMapConverter
,ArrayConverter
,ArrayListEditor
,BigDecimalEditor
,BigIntegerEditor
,BooleanEditor
,ByteEditor
,CharacterEditor
,ClassEditor
,CommonsLoggingConverter
,ConstructorConverter
,DateEditor
,DoubleEditor
,EnumConverter
,FileEditor
,FloatEditor
,GenericCollectionConverter
,GenericMapConverter
,HashMapEditor
,HashtableEditor
,IdentityHashMapEditor
,Inet4AddressEditor
,Inet6AddressEditor
,InetAddressEditor
,IntegerEditor
,JndiConverter
,LinkedHashMapEditor
,LinkedHashSetEditor
,LinkedListEditor
,ListEditor
,Log4jConverter
,LoggerConverter
,LongEditor
,MapEditor
,ObjectNameEditor
,PatternConverter
,PropertiesEditor
,PropertyEditorConverter
,PrototypeArrayConverter
,SetEditor
,ShortEditor
,SortedMapEditor
,SortedSetEditor
,StaticFactoryConverter
,StringEditor
,TreeMapEditor
,TreeSetEditor
,URIEditor
,URLEditor
,VectorEditor
,WeakHashMapEditor
public interface Converter extends java.beans.PropertyEditor
- Version:
- $Rev: 6680 $ $Date: 2005-12-24T04:38:27.427468Z $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Class
getType()
Gets the the type of object supported by this converter.java.lang.Object
toObject(java.lang.String text)
Converts the supplied text in to an instance of the editor type.java.lang.String
toString(java.lang.Object value)
Converts the supplied object to text.
-
-
-
Method Detail
-
getType
java.lang.Class getType()
Gets the the type of object supported by this converter.- Returns:
- the type used for that converter.
-
toString
java.lang.String toString(java.lang.Object value) throws PropertyEditorException
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
java.lang.Object toObject(java.lang.String text) throws PropertyEditorException
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
-
-