Class GWCoercionManager
java.lang.Object
gw.config.BaseService
gw.lang.parser.StandardCoercionManager
gw.internal.gosu.parser.gwPlatform.GWCoercionManager
- All Implemented Interfaces:
IService
,ICoercionManager
,IPluginHost
-
Field Summary
Fields inherited from class gw.lang.parser.StandardCoercionManager
_coercerCache, NO_DICE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCoercerInternal
(IType lhsType, IType rhsType, boolean runtime) Returns a coercer from values of rhsType to values of lhsType if one exists.makeBigDecimalFrom
(Object obj) makeRationalFrom
(Object obj) makeStringFrom
(Object obj) Methods inherited from class gw.lang.parser.StandardCoercionManager
arePrimitiveTypesAssignable, canCoerce, convertNullAsPrimitive, convertValue, findCoercer, formatDate, formatNumber, formatTime, getHighPriorityPrimitiveOrBoxedConverter, getPrimitiveOrBoxedConverter, isBoxed, isDateTime, isObjectMethod, isPrimitiveOrBoxed, isStructurallyAssignable, isStructurallyAssignable_Laxed, isStructurallyAssignable_Laxed, isStructurallyAssignable_Laxed, makeBigIntegerFrom, makeBooleanFrom, makeDateFrom, makeDoubleFrom, makeFloatFrom, makeIntegerFrom, makeLongFrom, makePrimitiveBooleanFrom, makePrimitiveDoubleFrom, makePrimitiveFloatFrom, makePrimitiveIntegerFrom, makePrimitiveLongFrom, notCoercibleOrRequiresExplicitCoercion, parseDateTime, parseNumber, resolveCoercerStatically, verifyTypesComparable, verifyTypesComparable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface gw.plugin.IPluginHost
getInterface
-
Constructor Details
-
GWCoercionManager
public GWCoercionManager()
-
-
Method Details
-
getCoercerInternal
Description copied from class:StandardCoercionManager
Returns a coercer from values of rhsType to values of lhsType if one exists. I tried to write a reasonable spec in the comments below that indicate exactly what should coerce to what.- Overrides:
getCoercerInternal
in classStandardCoercionManager
- Parameters:
lhsType
- the type to coerce torhsType
- the type to coerce fromruntime
- true if the coercion is happening at runtime rather than compile time (note: This param should go away as we store the coercions on the parsed elements, rather than calling into the coercion manager)- Returns:
- a coercer from the lhsType to the rhsType, or null if no such coercer exists or is needed
-
makeStringFrom
- Specified by:
makeStringFrom
in interfaceICoercionManager
- Overrides:
makeStringFrom
in classStandardCoercionManager
-
makeBigDecimalFrom
- Specified by:
makeBigDecimalFrom
in interfaceICoercionManager
- Overrides:
makeBigDecimalFrom
in classStandardCoercionManager
-
makeRationalFrom
- Specified by:
makeRationalFrom
in interfaceICoercionManager
- Overrides:
makeRationalFrom
in classStandardCoercionManager
-