Examples of ConverterNotFoundException


Examples of org.araneaframework.uilib.ConverterNotFoundException

   *
   * @throws ConverterNotFoundException
   *           if {@link BaseConverter}is not found
   */
  public Converter findConverter(String fromType, String toType) throws ConverterNotFoundException {
    if (fromType == null || toType == null) throw new ConverterNotFoundException(fromType, toType);
    if (fromType.equals(toType)) {
      return new IdenticalConverter();
    }
    else if ("Object".equals(fromType) || "Object".equals(toType)) {
      return new IdenticalConverter();
    }
    else {
      Converter result = ((Converter) converters.get(new ConverterKey(fromType, toType)));

      if (result == null) throw new ConverterNotFoundException(fromType, toType);

      return result.newConverter();
    }
  }
View Full Code Here

Examples of org.broadleafcommerce.openadmin.server.service.artifact.image.effects.chain.ConverterNotFoundException

        converters.put(ParameterTypeEnum.RECTANGLE.toString(), new RectangleParameterConverter());
    }

    public Parameter convertParameter(String value, String type, Double factor, boolean applyFactor) throws ConverterNotFoundException, ConversionException {
        ParameterConverter converter = converters.get(type);
        if (converter == null) throw new ConverterNotFoundException("Could not find a parameter converter with the type name: " + type);
        return converter.convert(value, factor, applyFactor);
    }
View Full Code Here

Examples of org.jboss.forge.addon.convert.exception.ConverterNotFoundException

               {
                  result = new ConstructorConverter(source, targetType, targetType.getConstructor(source));
               }
               catch (NoSuchMethodException noConstructor)
               {
                  throw new ConverterNotFoundException(source, target);
               }
            }

         }
      }
View Full Code Here

Examples of org.jboss.forge.addon.convert.exception.ConverterNotFoundException

               {
                  result = new ConstructorConverter<>(source, target, target.getConstructor(source));
               }
               catch (NoSuchMethodException noConstructor)
               {
                  throw new ConverterNotFoundException(source, target);
               }
            }

         }
      }
View Full Code Here

Examples of org.jboss.forge.addon.convert.exception.ConverterNotFoundException

               {
                  result = new ConstructorConverter<S, T>(source, target, target.getConstructor(source));
               }
               catch (NoSuchMethodException noConstructor)
               {
                  throw new ConverterNotFoundException(source, target);
               }
            }

         }
      }
View Full Code Here

Examples of org.jboss.forge.addon.convert.exception.ConverterNotFoundException

               {
                  result = new ConstructorConverter<>(source, target, target.getConstructor(source));
               }
               catch (NoSuchMethodException noConstructor)
               {
                  throw new ConverterNotFoundException(source, target);
               }
            }

         }
      }
View Full Code Here

Examples of org.springframework.core.convert.ConverterNotFoundException

      return source;
    }
    if (sourceType.isAssignableTo(targetType) && targetType.getObjectType().isInstance(source)) {
      return source;
    }
    throw new ConverterNotFoundException(sourceType, targetType);
  }
View Full Code Here

Examples of org.springframework.core.convert.ConverterNotFoundException

      target.add(source);
    }
    else {
      GenericConverter converter = this.conversionService.getConverter(sourceType, targetElementType);
      if (converter == null) {
        throw new ConverterNotFoundException(sourceType, targetElementType);
      }
      target.add(ConversionUtils.invokeConverter(converter, source, sourceType, targetElementType));
    }
    return target;
  }
View Full Code Here

Examples of org.springframework.core.convert.ConverterNotFoundException

    }
    else {
      Object target = Array.newInstance(targetElementType.getType(), fields.length);
      GenericConverter converter = this.conversionService.getConverter(sourceType, targetElementType);
      if (converter == null) {
        throw new ConverterNotFoundException(sourceType, targetElementType);
      }
      for (int i = 0; i < fields.length; i++) {
        Array.set(target, i, ConversionUtils.invokeConverter(converter, fields[i], sourceType, targetElementType));
      }
      return target;
View Full Code Here

Examples of org.springframework.core.convert.ConverterNotFoundException

      Array.set(target, 0, source);
    }
    else {
      GenericConverter converter = this.conversionService.getConverter(sourceType, targetElementType);
      if (converter == null) {
        throw new ConverterNotFoundException(sourceType, targetElementType);
      }
      Array.set(target, 0, ConversionUtils.invokeConverter(converter, source, sourceType, targetElementType));
    }
    return target;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.