タイプに対する{@link CellConverter}を登録する。
@param clazz 変換対象のJavaのクラスタイプ。
@param converterFactory 変換する{@link CellConverterFactory}のインスタンス。
503551
public <T> void registerConverter(final Class<T> clazz, final CellConverterFactory<T> converterFactory) {
        ArgUtils.notNull(clazz, "clazz");
        ArgUtils.notNull(converterFactory, "converterFactory");
        
        converterFactoryMap.put(clazz, converterFactory);
    }
469648
public <FT> CsvProcessor<T> withConverter(Class<FT> clazz, Converter<FT, ?> converter) {
		converterMap.put(clazz, converter);
		return this;
	}
478549
@Override
    public void addConverter(Class<?> from, Class<?> to, Converter converter) {
        Map toMap = fromMap.get(from);
        if (toMap == null) {
            toMap = new HashMap<Class<?>, Map<Class<?>, Converter>>();
            fromMap.put(from, toMap);
        }
        toMap.put(to, converter);
    }
1273077
@SuppressWarnings("rawtypes")
    public void addConverter(Function<?, ?> converter) {

        LettuceAssert.notNull(converter, "Converter must not be null");

        ClassTypeInformation<? extends Function> classTypeInformation = ClassTypeInformation.from(converter.getClass());
        TypeInformation<?> typeInformation = classTypeInformation.getSuperTypeInformation(Function.class);
        List<TypeInformation<?>> typeArguments = typeInformation.getTypeArguments();

        ConvertiblePair pair = new ConvertiblePair(typeArguments.get(0).getType(), typeArguments.get(1).getType());
        converterMap.put(pair, converter);
    }
777460
public TypeConverter addConverter(final Class<? extends TypeConverter> clazz) {
        return addConverter(mapper.getOptions().getObjectFactory().createInstance(clazz));
    }
152204
public void addConverterComponent(ValueConverter<?, ?> converter) {

    if (converter instanceof AbstractRecursiveValueConverter) {
      ((AbstractRecursiveValueConverter<?, ?>) converter).setComposedValueConverter(this);
    }
    if (converter instanceof AbstractComponent) {
      ((AbstractComponent) converter).initialize();
    }
    addConverter(converter);
  }
226102
public void addConverterToPass(Converter converter)
    {
        if (m_vconvDependent == null)
            m_vconvDependent = new Vector<Converter>();
        m_vconvDependent.add(converter);
        this.setEnableTranslation(false);
        if ((this.getNextConverter() == null)
            || (this.getNextConverter().getField() == null))
        {
        this.setEnableTranslation(true);
            return;
        }
        for (int iSeq = 0; ; iSeq++)
        {
            ScreenComponent sField = (ScreenComponent)this.getNextConverter().getField().getComponent(iSeq);
            if (sField == null)
                break;
            if (!this.isConverterInPath(sField))
                continue;  // This converter does not belong to this screen field
            if (converter != null)
                if (converter.getField() != null)
            {
                boolean bFound = false;
                for (int iSeq2 = 0; ; iSeq2++)
                {
                    if (converter.getField().getComponent(iSeq2) == null)
                        break;
                    if (converter.getField().getComponent(iSeq2) == sField)
                        bFound = true;
                }
                if (!bFound)
                    converter.addComponent(sField);
            }
        }
        this.setEnableTranslation(true);
    }
380722
@Override
    public StringConverter<?> findConverter(Class<?> cls) {
        if (cls == Byte[].class) {
            return ByteArrayStringConverter.INSTANCE;
        }
        return null;
    }
562098
@Override
    public StringConverter<?> findConverter(Class<?> cls) {
        if (cls == Boolean[].class) {
            return BooleanArrayStringConverter.INSTANCE;
        }
        return null;
    }
655707
public static <A, B, C, D> Converter<Example<A, B>, Example<C, D>> converter(
      Converter<A, C> inputConverter, Converter<B, D> outputConverter) {
    return new ExampleConverter<A, B, C, D>(inputConverter, outputConverter);
  }
404798
public static void setConverterFactoryClass(Configuration conf,
      Class<? extends ConverterFactory> converterFactoryClass) {
    conf.setClass(CONVERTER_FACTORY, converterFactoryClass, ConverterFactory.class);
    LOG.debug("Set input ConverterFactory class on conf: {}", converterFactoryClass);
  }
927829
private static Object convert(Class<?> clazz, String value) {
      /* TODO create a new Converter class and move this method there for reuse */

        if (Integer.class.equals(clazz) || int.class.equals(clazz)) {
            return Integer.valueOf(value);
        } else if (Double.class.equals(clazz) || double.class.equals(clazz)) {
            return Double.valueOf(value);
        } else if (Long.class.equals(clazz) || long.class.equals(clazz)) {
            return Long.valueOf(value);
        } else if (Boolean.class.equals(clazz) || boolean.class.equals(clazz)) {
            return Boolean.valueOf(value);
        }

        return value;
    }
831914
private static Converter<List<String>, Object> createStringConstructorConverter(Class<?> resultClass) {
    try {
      final Constructor<?> constructor = resultClass.getConstructor(String.class);
      return new BasicConverter(defaultValue(resultClass)) {
        @Override
        protected Object convert(String value) throws Exception {
          return constructor.newInstance(value);
        }
      };
    } catch (Exception e) {
      return null;
    }
  }
727393
public final <S, T> void registerConverter(Class<S> input, Class<T> output, Converter<S, T> converter) {
        Class<? extends Annotation> scope = matchImplementationToScope(converter.getClass());
        registerConverter(new ConverterKey<S,T>(input, output, scope == null ? DefaultBinding.class : scope), converter);
    }
628256
private <T> StringConverter<T> findAnnotatedConverter(final Class<T> cls) {
        Method toString = findToStringMethod(cls);  // checks superclasses
        if (toString == null) {
            return null;
        }
        MethodConstructorStringConverter<T> con = findFromStringConstructor(cls, toString);
        MethodsStringConverter<T> mth = findFromStringMethod(cls, toString, con == null);  // optionally checks superclasses
        if (con == null && mth == null) {
            throw new IllegalStateException("Class annotated with @ToString but not with @FromString: " + cls.getName());
        }
        if (con != null && mth != null) {
            throw new IllegalStateException("Both method and constructor are annotated with @FromString: " + cls.getName());
        }
        return (con != null ? con : mth);
    }
181813
public void init(Convert converter)
    {
        m_converter = converter;
        if (converter != null)
            this.setColumns(converter.getMaxLength());
    }
1191134
public <V extends View> void registerCell(String type, final @NonNull Class<V> viewClz) {
        if (viewHolderMap.get(type) == null) {
            mDefaultCellBinderResolver.register(type, new BaseCellBinder<>(viewClz, mMVHelper));
        } else {
            mDefaultCellBinderResolver.register(type, new BaseCellBinder<ViewHolderCreator.ViewHolder, V>(viewHolderMap.get(type),
                mMVHelper));
        }
        mMVHelper.resolver().register(type, viewClz);
    }