class StringTypeConverter implements TypeConverter {

    public Object toNative(Object value, ToNativeContext context) {
        if (value == null) {
            return null;
        }
        String valueAsString = (String) value;
        ID valueAsID = Foundation.cfString(valueAsString);
        Foundation.sendReturnsID(valueAsID, "autorelease");
        return valueAsID.toNative();
    }

}