Package gw.lang.parser
Interface ICoercer
- All Known Subinterfaces:
IResolvingCoercer
- All Known Implementing Classes:
BaseBoxedCoercer,BaseCoercer,BasePHighPriorityCoercer,BasePrimitiveCoercer,BigDecimalCoercer,BigIntegerCoercer,BlockCoercer,BooleanCoercer,BooleanHighPriorityCoercer,BooleanPHighPriorityCoercer,ByteCoercer,ByteHighPriorityCoercer,BytePHighPriorityCoercer,CharCoercer,CharHighPriorityCoercer,CharPHighPriorityCoercer,DateCoercer,DoubleCoercer,DoubleHighPriorityCoercer,DoublePHighPriorityCoercer,FeatureReferenceToBlockCoercer,FloatCoercer,FloatHighPriorityCoercer,FloatPHighPriorityCoercer,FunctionFromInterfaceCoercer,FunctionToInterfaceCoercer,GosuArrayToJavaArrayCoercer,IdentityCoercer,IMonitorLockCoercer,IntCoercer,IntHighPriorityCoercer,IntPHighPriorityCoercer,LongCoercer,LongHighPriorityCoercer,LongPHighPriorityCoercer,MetaTypeToClassCoercer,MethodReferenceCoercer,NonWarningStringCoercer,PrimitiveCoercer,PriorityDelegatingCoercer,RationalCoercer,RuntimeCoercer,ShortCoercer,ShortHighPriorityCoercer,ShortPHighPriorityCoercer,StandardCoercer,StandardCoercionManager.NullSentinalCoercer,StringBufferCoercer,StringBuilderCoercer,StringCoercer,TypeVariableCoercer
public interface ICoercer
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncoerceValue(IType typeToCoerceTo, Object value) intgetPriority(IType to, IType from) booleanboolean
-
Field Details
-
MAX_PRIORITY
static final int MAX_PRIORITY- See Also:
-
-
Method Details
-
coerceValue
-
isExplicitCoercion
boolean isExplicitCoercion() -
handlesNull
boolean handlesNull()- Returns:
- true if this coercer knows how to handle the null value.
-
getPriority
- Parameters:
to-from-- Returns:
- a value between 0 and MAX_PRIORITY, inclusive that indicates the priority of this coercer when resolving overloaded methods. Typically a coercer should return 0, but coercers that have a high affinity between the target and coerced type, such as primitives, can have higher priorities.
-