Package com.coderskitchen.cdiproperties.converter.spi

Examples of com.coderskitchen.cdiproperties.converter.spi.ValueConverter


  public void inject(T instance, CreationalContext<T> ctx) {
    it.inject(instance, ctx);
    for (Field field : injectableValues.keySet()) {
      Object value = injectableValues.get(field);
      Class<?> type = field.getType();
      ValueConverter acceptingConverter = ValueConverterFactory.findConverterForFieldType(type);
      setFieldValueOrAddDefinitionError(instance, field, value, acceptingConverter);
    }
  }
View Full Code Here


   * Finds a accepting converter for the given type.
   * @param type the lookup type
   * @return the accepting converter or null
   */
  public static ValueConverter findConverterForFieldType(Class<?> type) {
    ValueConverter acceptingConverter = null;

    if(type == null) {
      return null;
    }

View Full Code Here

TOP

Related Classes of com.coderskitchen.cdiproperties.converter.spi.ValueConverter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.