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 TypeMethodDescriptionvoidclose()Release closeable converters.protected ConverterfindConverter(Type type) protected PropertyEditorfindEditor(Type type) Locate a property editor for qiven class of object.protected ConverterfindInternalConverter(Type type) protected ConverterfindStructuralConverter(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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-