Package gw.lang.parser
Interface IResolvingCoercer
-
- All Superinterfaces:
ICoercer
- All Known Implementing Classes:
BasePrimitiveCoercer
,FunctionToInterfaceCoercer
,MetaTypeToClassCoercer
public interface IResolvingCoercer extends ICoercer
-
-
Field Summary
-
Fields inherited from interface gw.lang.parser.ICoercer
MAX_PRIORITY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IType
resolveType(IType target, IType source)
This method should produce a more appropriately parameterized type for the given target type for this coercion.-
Methods inherited from interface gw.lang.parser.ICoercer
coerceValue, getPriority, handlesNull, isExplicitCoercion
-
-
-
-
Method Detail
-
resolveType
IType resolveType(IType target, IType source)
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.
- Parameters:
target
- typesource
-- Returns:
- a possibly more appropriately parameterized type or the source type if not
-
-