Examples of ConvertiblePair


Examples of org.springframework.core.convert.converter.GenericConverter.ConvertiblePair

     * @param target
     * @param isReading
     * @param isWriting
     */
    public ConvertibleContext(Class<?> source, Class<?> target, boolean isReading, boolean isWriting) {
      this(new ConvertiblePair(source, target), isReading, isWriting);
    }
View Full Code Here

Examples of org.springframework.core.convert.converter.GenericConverter.ConvertiblePair

   * @param target the target type to be converted to, must not be {@literal null}.
   * @param isReading whether to force to consider the converter for reading.
   * @param isWriting whether to force to consider the converter for writing.
   */
  public ConverterRegistration(Class<?> source, Class<?> target, boolean isReading, boolean isWriting) {
    this(new ConvertiblePair(source, target), isReading, isWriting);
  }
View Full Code Here

Examples of org.springframework.core.convert.converter.GenericConverter.ConvertiblePair

   *
   * @param pair
   */
  private void register(ConverterRegistration converterRegistration) {

    ConvertiblePair pair = converterRegistration.getConvertiblePair();

    if (converterRegistration.isReading()) {

      readingPairs.add(pair);

      if (LOG.isWarnEnabled() && !converterRegistration.isSimpleSourceType()) {
        LOG.warn(String.format(READ_CONVERTER_NOT_SIMPLE, pair.getSourceType(), pair.getTargetType()));
      }
    }

    if (converterRegistration.isWriting()) {

      writingPairs.add(pair);
      customSimpleTypes.add(pair.getSourceType());

      if (LOG.isWarnEnabled() && !converterRegistration.isSimpleTargetType()) {
        LOG.warn(String.format(WRITE_CONVERTER_NOT_SIMPLE, pair.getSourceType(), pair.getTargetType()));
      }
    }
  }
View Full Code Here

Examples of org.springframework.core.convert.converter.GenericConverter.ConvertiblePair

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

    ConvertiblePair lookupKey = new ConvertiblePair(sourceType, requestedTargetType);
    CacheValue readTargetTypeValue = customReadTargetTypes.get(lookupKey);

    if (readTargetTypeValue != null) {
      return readTargetTypeValue.getType();
    }
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.