.
| Method from org.jboss.varia.property.PropertyEditorManagerService Detail: |
protected void destroyService() throws Exception {
Iterator iter = registeredEditors.iterator();
while (iter.hasNext())
{
Class type = (Class)iter.next();
PropertyEditorManager.registerEditor(type, null);
iter.remove();
}
}
Removes the list of registered editors. |
public PropertyEditor findEditor(Class type) {
return PropertyEditorManager.findEditor(type);
}
Locate a value editor for a given target type. |
public PropertyEditor findEditor(String typeName) throws ClassNotFoundException {
Class type = Class.forName(typeName);
return PropertyEditorManager.findEditor(type);
}
Locate a value editor for a given target type. |
public String getEditorSearchPath() {
return makeString(PropertyEditorManager.getEditorSearchPath());
}
Gets the package names that will be searched for property editors. |
protected ObjectName getObjectName(MBeanServer server,
ObjectName name) throws MalformedObjectNameException {
return name == null ? OBJECT_NAME : name;
}
|
public Class[] getRegisteredEditors() {
return (Class [])registeredEditors.toArray(new Class[registeredEditors.size()]);
}
Returns a list of registered editor classes. |
public void registerEditor(Class type,
Class editorType) {
registeredEditors.add(type);
PropertyEditorManager.registerEditor(type, editorType);
}
Register an editor class to be used to editor values of a given target class. |
public void registerEditor(String typeName,
String editorTypeName) throws ClassNotFoundException {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
Class type = cl.loadClass(typeName);
Class editorType = cl.loadClass(editorTypeName);
registerEditor(type, editorType);
}
Register an editor class to be used to editor values of a given target class. |
public void setBootstrapEditors(String propsString) throws ClassNotFoundException, IOException {
Properties props = new Properties();
ByteArrayInputStream stream = new ByteArrayInputStream(propsString.getBytes());
props.load(stream);
setEditors(props);
}
Load property editors based on the given properties string. |
public void setEditorSearchPath(String path) {
PropertyEditorManager.setEditorSearchPath(makeArray(path));
}
Sets the package names that will be searched for property editors. |
public void setEditors(Properties props) throws ClassNotFoundException {
Iterator iter = props.keySet().iterator();
while (iter.hasNext()) {
String typeName = (String)iter.next();
String editorTypeName = props.getProperty(typeName);
registerEditor(typeName, editorTypeName);
}
}
Set property editors based on the given properties map. |