package com.hammurapi.convert;

import com.hammurapi.common.Context;

/**
 * Converter which is part of a composite converter and can delegate conversions to its parent.
 * @author Pavel
 *
 */
public interface ConverterPart {

	/**
	 * Converts object to requested target type.
	 * @param source Source object.
	 * @param targetType Target type.
	 * @param context Conversion context.
	 * @return Converted object.
	 */
	<S, T> T convert(S source, Class<T> targetType, Context context, Converter master) throws ConversionException;
}
