Class DefaultPropertyEditorFinder

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.logging.Logger logger  
      private java.lang.String[] packages  
      protected java.util.Map<java.lang.Class<?>,​java.lang.Class<? extends java.beans.PropertyEditor>> register  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.beans.PropertyEditor find​(java.lang.Class<?> type)
      Returns PropertyEditor which capable of converting String into instances of type parameter.
      java.lang.String[] getEditorSearchPackages()
      Get packages in which editors should be looked up.
      void register​(java.lang.Class<?> type, java.lang.Class<? extends java.beans.PropertyEditor> editor)
      If supported, this method register editor class for specific type.
      void setEditorSearchPackages​(java.lang.String[] packages)
      Sets packages in which editors should be looked up.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        private static final java.util.logging.Logger logger
      • register

        protected java.util.Map<java.lang.Class<?>,​java.lang.Class<? extends java.beans.PropertyEditor>> register
      • packages

        private java.lang.String[] packages
    • Constructor Detail

      • DefaultPropertyEditorFinder

        public DefaultPropertyEditorFinder()
    • Method Detail

      • setEditorSearchPackages

        public void setEditorSearchPackages​(java.lang.String[] packages)
        Sets packages in which editors should be looked up.
        Specified by:
        setEditorSearchPackages in class PropertyEditorFinder
        Parameters:
        packages -
      • register

        public void register​(java.lang.Class<?> type,
                             java.lang.Class<? extends java.beans.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 java.beans.PropertyEditor find​(java.lang.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: