Package org.springframework.binding.convert.converters

Examples of org.springframework.binding.convert.converters.ArrayToArray


    if (targetClass.isAssignableFrom(sourceClass)) {
      return new StaticConversionExecutor(sourceClass, targetClass, new NoOpConverter(sourceClass, targetClass));
    }
    if (sourceClass.isArray()) {
      if (targetClass.isArray()) {
        return new StaticConversionExecutor(sourceClass, targetClass, new ArrayToArray(this));
      } else if (Collection.class.isAssignableFrom(targetClass)) {
        if (!targetClass.isInterface() && Modifier.isAbstract(targetClass.getModifiers())) {
          throw new IllegalArgumentException("Conversion target class [" + targetClass.getName()
              + "] is invalid; cannot convert to abstract collection types--"
              + "request an interface or concrete implementation instead");
View Full Code Here


                    + sourceComponentType.getName() + "] to an array of storing elements of type ["
                    + targetComponentType.getName() + "]");
          }
          ConversionExecutor elementConverter = new StaticConversionExecutor(sourceComponentType,
              targetComponentType, converter);
          return new StaticConversionExecutor(sourceClass, targetClass, new ArrayToArray(elementConverter));
        } else if (converter.getTargetClass().isAssignableFrom(sourceComponentType)
            && converter instanceof TwoWayConverter) {
          TwoWayConverter twoWay = (TwoWayConverter) converter;
          ConversionExecutor elementConverter = new StaticConversionExecutor(sourceComponentType,
              targetComponentType, new ReverseConverter(twoWay));
          return new StaticConversionExecutor(sourceClass, targetClass, new ArrayToArray(elementConverter));
        } else {
          throw new ConversionExecutorNotFoundException(sourceClass, targetClass,
              "Custom ConversionExecutor with id '" + id
                  + "' cannot convert from an array storing elements of type ["
                  + sourceComponentType.getName() + "] to an array storing elements of type ["
View Full Code Here

TOP

Related Classes of org.springframework.binding.convert.converters.ArrayToArray

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.