org.apache.geronimo.common.propertyeditor
Class PropertyEditors

java.lang.Object
  extended byorg.apache.geronimo.common.propertyeditor.PropertyEditors

public class PropertyEditors
extends Object

A collection of PropertyEditor utilities.

Allows editors to be nested sub-classes named PropertyEditor.

Version:
$Revision: 1.11 $ $Date: 2004/07/25 08:27:17 $

Constructor Summary
PropertyEditors()
           
 
Method Summary
static void appendEditorSearchPath(List names)
          Append package names to the property editor search path.
static void appendEditorSearchPath(String name)
          Append a package name to the property editor search path.
static void appendEditorSearchPath(String[] names)
          Append package names to the property editor search path.
static PropertyEditor findEditor(Class type)
          Locate a value editor for a given target type.
static PropertyEditor findEditor(String typeName, ClassLoader classLoader)
          Locate a value editor for a given target type.
static PropertyEditor getEditor(Class type)
          Get a value editor for a given target type.
static List getEditorSearchPath()
          Gets the package names that will be searched for property editors.
static void registerEditor(Class type, Class editorType)
          Register an editor class to be used to editor values of a given target class.
static void registerEditor(String typeName, String editorTypeName)
          Register an editor class to be used to editor values of a given target class.
static void setEditorSearchPath(List path)
          Sets the package names that will be searched for property editors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyEditors

public PropertyEditors()
Method Detail

findEditor

public static PropertyEditor findEditor(Class type)
Locate a value editor for a given target type.

Parameters:
type - The class of the object to be edited.
Returns:
An editor for the given type or null if none was found.

findEditor

public static PropertyEditor findEditor(String typeName,
                                        ClassLoader classLoader)
                                 throws ClassNotFoundException
Locate a value editor for a given target type.

Parameters:
typeName - The class name of the object to be edited.
Returns:
An editor for the given type or null if none was found.
Throws:
ClassNotFoundException

getEditor

public static PropertyEditor getEditor(Class type)
Get a value editor for a given target type.

Parameters:
type - The class of the object to be edited.
Returns:
An editor for the given type.
Throws:
PropertyEditorException - No editor was found.

registerEditor

public static void registerEditor(Class type,
                                  Class editorType)
Register an editor class to be used to editor values of a given target class.

Parameters:
type - The class of the objetcs to be edited.
editorType - The class of the editor.

registerEditor

public static void registerEditor(String typeName,
                                  String editorTypeName)
                           throws ClassNotFoundException
Register an editor class to be used to editor values of a given target class.

Parameters:
typeName - The classname of the objetcs to be edited.
editorTypeName - The class of the editor.
Throws:
ClassNotFoundException

getEditorSearchPath

public static List getEditorSearchPath()
Gets the package names that will be searched for property editors.

Returns:
The package names that will be searched for property editors.

setEditorSearchPath

public static void setEditorSearchPath(List path)
Sets the package names that will be searched for property editors.

Parameters:
path - The serach path.

appendEditorSearchPath

public static void appendEditorSearchPath(List names)
Append package names to the property editor search path.

Parameters:
names - The package names to append.

appendEditorSearchPath

public static void appendEditorSearchPath(String[] names)
Append package names to the property editor search path.

Parameters:
names - The package names to append.

appendEditorSearchPath

public static void appendEditorSearchPath(String name)
Append a package name to the property editor search path.

Parameters:
name - The package name to append.


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.