/** * Attempt to find custom property editor on descriptor first, else try the * propery editor manager. * * @param desc PropertyDescriptor. * @return The PropertyEditor for the given PropertyDescriptor. * @throws InstantiationException Thrown when getting the PropertyEditor for the class. * @throws IllegalAccessException Thrown when getting the PropertyEditor for the class. */ protected PropertyEditor getPropertyEditor(PropertyDescriptor desc) throws InstantiationException, IllegalAccessException { Class<?> cls = desc.getPropertyEditorClass(); if (null != cls) { return (PropertyEditor) cls.newInstance(); } return getPropertyEditorValue(desc.getPropertyType()); }