class TypeDecoder {

    public static ValueHolder decode(Type<?> type, String text) {
        try {
            return type.decode(text != null ? text.trim() : null);
        } catch (RuntimeException exception) {
            throw new TypeDecodingException(exception, text, type);
        }
    }

    private  TypeDecoder();

}