Package org.apache.xbean.propertyeditor
Class PropertyEditorRegistry
java.lang.Object
org.apache.xbean.propertyeditor.PropertyEditorRegistry
- All Implemented Interfaces:
Closeable
,AutoCloseable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Release closeable converters.protected Converter
findConverter
(Type type) protected PropertyEditor
findEditor
(Type type) Locate a property editor for qiven class of object.protected Converter
findInternalConverter
(Type type) protected Converter
findStructuralConverter
(Type type) getValue
(String type, String value, ClassLoader classLoader) Register a converter in the registry.unregister
(Converter converter) Unregister a converter.protected Class<?>
unwrapClass
(Object value)
-
Field Details
-
registry
-
-
Constructor Details
-
PropertyEditorRegistry
public PropertyEditorRegistry()
-
-
Method Details
-
registerDefaults
-
getRegistry
- Returns:
- a read-only view of the converters.
-
register
Register a converter in the registry.- Parameters:
converter
- the converter to register.- Returns:
- the previously existing converter for the corresponding type or null.
-
unregister
Unregister a converter.- Parameters:
converter
- the converter to remove from the registry.- Returns:
- the converter if found, or null.
-
findConverter
-
toString
- Throws:
PropertyEditorException
-
getValue
public Object getValue(String type, String value, ClassLoader classLoader) throws PropertyEditorException - Throws:
PropertyEditorException
-
getValue
- Throws:
PropertyEditorException
-
unwrapClass
-
findStructuralConverter
-
createConverterFromEditor
-
findInternalConverter
-
findEditor
Locate a property editor for qiven class of object.- Parameters:
type
- The target object class of the property.- Returns:
- The resolved editor, if any. Returns null if a suitable editor could not be located.
-
close
public void close()Release closeable converters.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-