@Override
    public <T> boolean isConvertable(final Class<T> targetType) {
        if (targetType == null) {
            return false; // That is really bad.
        }
        if (CONVERSIONS.containsKey(targetType)) {
            return true;
        }
        Constructor<T> constructor = ReflectionHelper.getCallableConstructorForParams(targetType, String.class);
        if (constructor != null) {
            CONVERSIONS.put(targetType, new StringConstructorConversion<T>(constructor, null));
            return true;
        }

        Method factory = ReflectionHelper.getCallableFactoryForParams(targetType, String.class);
        if (factory != null) {
            CONVERSIONS.put(targetType, new StringFactoryConversion<T>(factory, null));
            return true;
        }

        return false;
    }
@ Override public < T > boolean isConvertable ( final Class < T > targetType ) { if ( targetType == null ) { return false ; } if ( CONVERSIONS . containsKey ( targetType ) ) { return true ; } Constructor < T > constructor = ReflectionHelper . getCallableConstructorForParams ( targetType , String . class ) ; if ( constructor != null ) { CONVERSIONS . put ( targetType , new StringConstructorConversion < T > ( constructor , null ) ) ; return true ; } Method factory = ReflectionHelper . getCallableFactoryForParams ( targetType , String . class ) ; if ( factory != null ) { CONVERSIONS . put ( targetType , new StringFactoryConversion < T > ( factory , null ) ) ; return true ; } return false ; }
{@inheritDoc}