Package gw.lang.parser
Interface IResolvingCoercer
- All Superinterfaces:
ICoercer
- All Known Implementing Classes:
BasePrimitiveCoercer
,FunctionToInterfaceCoercer
,MetaTypeToClassCoercer
-
Field Summary
Fields inherited from interface gw.lang.parser.ICoercer
MAX_PRIORITY
-
Method Summary
Modifier and TypeMethodDescriptionresolveType
(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 Details
-
resolveType
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
-