Example usage for org.apache.commons.collections15 ExtendedTransformer getSourceType

List of usage examples for org.apache.commons.collections15 ExtendedTransformer getSourceType

Introduction

In this page you can find the example usage for org.apache.commons.collections15 ExtendedTransformer getSourceType.

Prototype

Class<I> getSourceType();

Source Link

Usage

From source file:org.springframework.core.convert.support.ExtendedConversionUtils.java

public static final <S, T> ExtendedConverter<S, T> toConverter(final ExtendedTransformer<S, T> xformer) {
    Assert.notNull(xformer, "No transformer");
    return new AbstractExtendedConverter<S, T>(xformer.getSourceType(), xformer.getDestinationType()) {
        @Override// w  w  w .  j a  va 2  s.c o  m
        public T convert(S source) {
            return xformer.transform(source);
        }
    };
}