public final Object coerceValue( IType typeToCoerceTo, Object value ) { return _delegate.coerceValue( typeToCoerceTo, value ); }
public final Object coerceValue( IType typeToCoerceTo, Object value ) { return _delegate.coerceValue( typeToCoerceTo, value ); }
private Object coerce( IType intrType, IType runtimeType, Object value ) { ICoercer coercer = findCoercer( intrType, runtimeType, true ); if( coercer != null ) { return coercer.coerceValue( intrType, value ); } return null; }
private Object coerce( IType intrType, IType runtimeType, Object value ) { ICoercer coercer = findCoercer( intrType, runtimeType, true ); if( coercer != null ) { return coercer.coerceValue( intrType, value ); } return null; }
public final Object coerceValue( IType typeToCoerceTo, Object value ) { if( value == null ) { return CommonServices.getCoercionManager().convertNullAsPrimitive( _primitiveType, false ); } else { return _nonPrimitiveCoercer.coerceValue(typeToCoerceTo, value); } }
public final Object coerceValue( IType typeToCoerceTo, Object value ) { if( value == null ) { return CommonServices.getCoercionManager().convertNullAsPrimitive( _primitiveType, false ); } else { return _nonPrimitiveCoercer.coerceValue(typeToCoerceTo, value); } }
public static Object coerceValue( Object value, IType type, ICoercer coercer ) { Object retValue = value; if( type == GosuParserTypes.NUMBER_TYPE() ) { retValue = CommonServices.getCoercionManager().makeDoubleFrom( value ); } else if( type == GosuParserTypes.STRING_TYPE() ) { retValue = CommonServices.getCoercionManager().makeStringFrom( value ); } else if( type == GosuParserTypes.DATETIME_TYPE() ) { retValue = CommonServices.getCoercionManager().makeDateFrom( value ); } else if( coercer != null && (value != null || coercer.handlesNull()) ) { retValue = coercer.coerceValue( type, value ); } if( retValue == StandardCoercionManager.NO_DICE ) { throw new ClassCastException( value + " cannot be cast to " + type.getDisplayName() ); } return retValue; }
public static Object coerceValue( Object value, IType type, ICoercer coercer ) { if( type == GosuParserTypes.NUMBER_TYPE() ) { return CommonServices.getCoercionManager().makeDoubleFrom( value ); } else if( type == GosuParserTypes.STRING_TYPE() ) { return CommonServices.getCoercionManager().makeStringFrom( value ); } else if( type == GosuParserTypes.DATETIME_TYPE() ) { return CommonServices.getCoercionManager().makeDateFrom( value ); } if( coercer != null && (value != null || coercer.handlesNull()) ) { return coercer.coerceValue( type, value ); } return value; }
return _coercer.coerceValue( argType, value );
return _coercer.coerceValue( argType, value );