spring-framework / org.springframework.beans / BeanUtils / findEditorByConvention

findEditorByConvention

@Nullable open static fun findEditorByConvention(@Nullable targetType: Class<*>): PropertyEditor

Find a JavaBeans PropertyEditor following the 'Editor' suffix convention (e.g. "mypackage.MyDomainClass" -> "mypackage.MyDomainClassEditor").

Compatible to the standard JavaBeans convention as implemented by java.beans.PropertyEditorManager but isolated from the latter's registered default editors for primitive types.

Parameters

targetType - the type to find an editor for

Return
the corresponding editor, or null if none found