gw.lang.parser.IResolvingCoercer Maven / Gradle / Ivy
/*
* Copyright 2014 Guidewire Software, Inc.
*/
package gw.lang.parser;
import gw.lang.reflect.IType;
public interface IResolvingCoercer extends ICoercer
{
/**
* This method should produce a more appropriately parameterized type for the given target type for this
* coercion. This allows a coercion to communicate type information through the coercion process. An example
* is the MetaType-to-Class coercion. MetaType should be interpreted as Class from a type inference
* perspective, so this give the coercer a chance to let the compiler know so.
*
* If no more appropriate inference type exists, this method should return the source type.
*
* @param target type
* @param source
* @return a possibly more appropriately parameterized type or the source type if not
*/
IType resolveType( IType target, IType source );
}