class ClassConverter implements PropertyConverter<Class<?>> {

    @Override
    public Class<?> convert(String value, ConversionContext ctx) {
        if(value==null){
            return null;
        }
        ctx.addSupportedFormats(getClass(),"<fullyQualifiedClassName>");
        String trimmed = Objects.requireNonNull(value).trim();
        try {
            return Class.forName(trimmed, false, Thread.currentThread().getContextClassLoader());
        } catch(Exception e) {
            LOG.finest("Class not found in context CL: " + trimmed);
        }
        try {
            return Class.forName(trimmed, false, ClassConverter.class.getClassLoader());
        } catch(Exception e) {
            LOG.finest("Class not found in ClassConverter's CL: " + trimmed);
        }
        try {
            return Class.forName(trimmed, false, ClassLoader.getSystemClassLoader());
        } catch(Exception e) {
            LOG.finest("Class not found in System CL (giving up): " + trimmed);
            return null;
        }
    }

}