JBoss Common Beans 1.1.0.Final-redhat-1

org.jboss.common.beans.property.finder
Class DefaultPropertyEditorFinder

java.lang.Object
  extended by org.jboss.common.beans.property.finder.PropertyEditorFinder
      extended by org.jboss.common.beans.property.finder.DefaultPropertyEditorFinder

public class DefaultPropertyEditorFinder
extends PropertyEditorFinder

Author:
baranowb

Field Summary
protected  Map<Class<?>,Class<? extends PropertyEditor>> register
           
 
Fields inherited from class org.jboss.common.beans.property.finder.PropertyEditorFinder
EDITOR, EDITOR_ARRAY
 
Constructor Summary
DefaultPropertyEditorFinder()
           
 
Method Summary
 PropertyEditor find(Class<?> type)
          Returns PropertyEditor which capable of converting String into instances of type parameter.
 String[] getEditorSearchPackages()
          Get packages in which editors should be looked up.
 void register(Class<?> type, Class<? extends PropertyEditor> editor)
          If supported, this method register editor class for specific type.
 void setEditorSearchPackages(String[] packages)
          Sets packages in which editors should be looked up.
 
Methods inherited from class org.jboss.common.beans.property.finder.PropertyEditorFinder
getInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

register

protected Map<Class<?>,Class<? extends PropertyEditor>> register
Constructor Detail

DefaultPropertyEditorFinder

public DefaultPropertyEditorFinder()
Method Detail

setEditorSearchPackages

public void setEditorSearchPackages(String[] packages)
Sets packages in which editors should be looked up.

Specified by:
setEditorSearchPackages in class PropertyEditorFinder
Parameters:
packages -

getEditorSearchPackages

public String[] getEditorSearchPackages()
Get packages in which editors should be looked up.

Specified by:
getEditorSearchPackages in class PropertyEditorFinder
Returns:

register

public void register(Class<?> type,
                     Class<? extends PropertyEditor> editor)
Description copied from class: PropertyEditorFinder
If supported, this method register editor class for specific type. When queried, finder will return registered editor class. Check {PropertyEditorFinder.find(Class) method.

Specified by:
register in class PropertyEditorFinder
Parameters:
type - - class object representing type of property, ie. int[].class, InetAddress.class
editor - - editor class which is capable of converting type, to and from String.

find

public PropertyEditor find(Class<?> type)
Description copied from class: PropertyEditorFinder
Returns PropertyEditor which capable of converting String into instances of type parameter.

Specified by:
find in class PropertyEditorFinder
Parameters:
type - - class object representing type of property beeing converted from String to object instance.
Returns:

JBoss Common Beans 1.1.0.Final-redhat-1

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.