Returns a conversion executor which converts a value of the given sourceType into the fieldType

@return true if a converter is available, otherwise false

@see #getPropertyType()
428000
protected ConversionExecutor getPropertyConversionExecutor() {
        if (conversionExecutor == null) {
            conversionExecutor = getConversionService().getConversionExecutor(Object[].class, getPropertyType());
        }
        return conversionExecutor;
    }
726872
@SuppressWarnings("rawtypes")
	@Override
	protected Object convertToType(Class type, Object value) throws Throwable {
		return KeyFactory.stringToKey(value.toString());
	}
792591
TypeConverter getDefaultTypeConverter(Type toField, Type domainField) {
        for (TypeConverter typeConverter : typeConvertersInOrder) {
            if (typeConverter.canConvert(toField, domainField)) {
                return typeConverter;
            }
        }
        return new NoConversionTypeConverter(); // default to no type conversion
    }
1351332
@SuppressWarnings("unchecked")
	@Override
	public <C> IConverter<C> getConverter(final Class<C> type)
	{
		if (Temporal.class.isAssignableFrom(type))
		{
			return (IConverter<C>)converter;
		}
		else
		{
			return super.getConverter(type);
		}
	}
707642
public static <T> Conversion<T> to(final Class<T> type) {

		/**
		 * Proxies type conversion to allow for the fact that the value may
		 * provide its own conversion and other subtleties. The goal is to
		 * preserve the identical behavior as if {@link #asType(Class,Object)}
		 * were called.
		 *
		 */
		return new Conversion<T>() {

			@Override
			public Object[] getTypeKeys() {
				Conversion<?> conversion=typeConversions.get(type);
				return (conversion!=null)
					? TypeConverter.getTypeKeys(conversion)
						.toArray(new Object[0])
					: new Object[0];
			}

			@Override
			public T convert(Object value) {
				return TypeConverter.convert(type,value);
			}
		};
	}
742577
public ConversionType getConversionTypeFor(XAbstractFeatureCall featureCall) {
		if (this.conversions == null) {
			this.conversions = initMapping();
		}
		final List<Object> receiver = new ArrayList<>();
		AbstractExpressionGenerator.buildCallReceiver(
				featureCall,
				this.keywords.getThisKeywordLambda(),
				this.referenceNameLambda,
				receiver);
		final String simpleName = AbstractExpressionGenerator.getCallSimpleName(
				featureCall,
				this.logicalContainerProvider,
				this.simpleNameProvider,
				this.keywords.getNullKeywordLambda(),
				this.keywords.getThisKeywordLambda(),
				this.keywords.getSuperKeywordLambda(),
				this.referenceNameLambda2);
		final List<Pair<FeaturePattern, FeatureReplacement>> struct = this.conversions.get(getKey(simpleName));
		if (struct != null) {
			final String replacementId = featureCall.getFeature().getIdentifier();
			final FeatureReplacement replacement = matchFirstPattern(struct, replacementId, simpleName, receiver);
			if (replacement != null) {
				if (replacement.hasReplacement()) {
					return ConversionType.EXPLICIT;
				}
				return ConversionType.FORBIDDEN_CONVERSION;
			}
		}
		return ConversionType.IMPLICIT;
	}
841344
public function convertFrom($source, $targetType, array $convertedChildProperties = [], PropertyMappingConfigurationInterface $configuration = null)
    {
        if (is_bool($source)) {
            return $source;
        }

        if (is_int($source) || is_float(($source))) {
            return (boolean)$source;
        }

        return (!empty($source) && !in_array(strtolower($source), ['off', 'n', 'no', 'false']));
    }
968313
public Convert<Basic<T>> getOrCreateConvert()
   {
      Node node = childNode.getOrCreate("convert");
      Convert<Basic<T>> convert = new ConvertImpl<Basic<T>>(this, "convert", childNode, node);
      return convert;
   }
851428
private PropertyConverter getConverterForType(Class pType) {
        Object converter;
        Class cl = pType;

        // Loop until we find a suitable converter
        do {
            // Have a match, return converter
            if ((converter = getInstance().converters.get(cl)) != null) {
                return (PropertyConverter) converter;
            }

        }
        while ((cl = cl.getSuperclass()) != null);

        // No converter found, return null
        return null;
    }
526504
@Override
    public boolean supportsConvert(int fromType, int toType) throws SQLException {
        checkClosed();
        switch (fromType) {
        /*
         * ALL types can be converted to VARCHAR /VoltType.String
         */
        case java.sql.Types.VARCHAR:
        case java.sql.Types.VARBINARY:
        case java.sql.Types.TIMESTAMP:
        case java.sql.Types.OTHER:
            switch (toType) {
            case java.sql.Types.VARCHAR:
                return true;

            default:
                return false;
            }
        case java.sql.Types.TINYINT:
        case java.sql.Types.SMALLINT:
        case java.sql.Types.INTEGER:
        case java.sql.Types.BIGINT:
        case java.sql.Types.FLOAT:
        case java.sql.Types.DECIMAL:
            switch (toType) {
            case java.sql.Types.VARCHAR:
            case java.sql.Types.TINYINT:
            case java.sql.Types.SMALLINT:
            case java.sql.Types.INTEGER:
            case java.sql.Types.BIGINT:
            case java.sql.Types.FLOAT:
            case java.sql.Types.DECIMAL:
                return true;

            default:
                return false;
            }
        default:
            return false;
        }
    }
1017938
public static Object convert(final Object value, Class<?> targetType, final String name) {
        if (value == null) {
            if (targetType.equals(Boolean.TYPE)) {
                return false;
            }
            return value;
        }

        final Class<? extends Object> actualType = value.getClass();

        if (targetType.isPrimitive()) {
            targetType =  PrimitiveTypes.valueOf(targetType.toString().toUpperCase()).getWraper();
        }

        if (targetType.isAssignableFrom(actualType)) {
            return value;
        }

        if (Number.class.isAssignableFrom(actualType) && Number.class.isAssignableFrom(targetType)) {
            return value;
        }

        if (!(value instanceof String)) {
            final String message = String.format("Expected type '%s' for '%s'. Found '%s'", targetType.getName(), name, actualType.getName());
            throw new IllegalArgumentException(message);
        }

        final String stringValue = (String) value;

        if (Enum.class.isAssignableFrom(targetType)) {
            final Class<? extends Enum> enumType = (Class<? extends Enum>) targetType;
            try {
                return Enum.valueOf(enumType, stringValue);
            } catch (final IllegalArgumentException e) {
                try {
                    return Enum.valueOf(enumType, stringValue.toUpperCase());
                } catch (final IllegalArgumentException e1) {
                    return Enum.valueOf(enumType, stringValue.toLowerCase());
                }
            }
        }

        try {
            // Force static initializers to run
            Class.forName(targetType.getName(), true, targetType.getClassLoader());
        } catch (final ClassNotFoundException e) {
            e.printStackTrace();
        }

        final PropertyEditor editor = Editors.get(targetType);

        if (editor == null) {
            final Object result = create(targetType, stringValue);
            if (result != null) {
                return result;
            }
        }

        if (editor == null) {
            final String message = String.format("Cannot convert to '%s' for '%s'. No PropertyEditor", targetType.getName(), name);
            throw new IllegalArgumentException(message);
        }

        editor.setAsText(stringValue);
        return editor.getValue();
    }
1303678
@SuppressWarnings("unchecked")
    public static <T> T convert(Object fromValue, Class<T> toType) throws TypeCastException {
        return convert(fromValue, toType, (String) null);
    }
1172267
protected <T> Converter<T> find(Class<T> type) throws ConversionException {
        //noinspection unchecked
        Converter<T> converter = (Converter<T>) storage.get(type);
        if (converter == null) {
            if (type.isEnum()) {
                //noinspection unchecked
                return new EnumConverter((Class<? extends Enum>) type);
            }
            if (type.isArray()) {
                Class<?> componentType = type.getComponentType();
                Converter childConverter = find(componentType);
                //noinspection unchecked
                return new ArrayConverter(childConverter, componentType, stringSplitter);
            }
            throw new ConversionException(String.format("Could not find converter for type <%s>", type));
        }
        return converter;
    }
843124
public Object get(IConverter converter, Object sourceObject,
			TypeReference<?> destinationType) {
		return convertedObjects.get(new ConvertedObjectsKey(converter,
				sourceObject, destinationType));
	}
85979
public ConversionHandler from(MappedField sourceMappedField){
		this.sourceField = sourceMappedField.getValue();
		placeholders.put(sourceTypePattern, sourceField.getType().getName());
		placeholders.put(sourceNamePattern, sourceField.getName());
		placeholders.put(sourceGetPattern, sourceMappedField.getMethod());
		placeholders.put(sourceSetPattern, sourceMappedField.setMethod());
		return this;
	}
121790
public static ConversionType getConversionType(final Class<?> destination, final Class<?> source){
		
		if(destination == String.class)   return toStringConversion(source);
		if(destination == Byte.class)     return toByteConversion(source);
		if(destination == byte.class)     return tobyteConversion(source);
		if(destination == Short.class)    return toShortConversion(source);
		if(destination == short.class)    return toshortConversion(source);
		if(destination == Integer.class)  return toIntegerConversion(source);
		if(destination == int.class)      return tointConversion(source);
		if(destination == Long.class)     return toLongConversion(source);
		if(destination == long.class)     return tolongConversion(source);
		if(destination == Float.class)    return toFloatConversion(source);
		if(destination == float.class)    return tofloatConversion(source);
		if(destination == Double.class)   return toDoubleConversion(source);
		if(destination == double.class)   return todoubleConversion(source);
		if(destination == Character.class)return toCharacterConversion(source);
		if(destination == char.class)     return tocharConversion(source);
		if(destination == Boolean.class)  return toBooleanConversion(source);
		if(destination == boolean.class)  return tobooleanConversion(source);
		return UNDEFINED;
	}
40728
<S, T> Converter<S, T> converterForClass(String attribute, Class<S> sourceClass, Class<T> destinationClass) {
        List<Converter> list = attributeConverters.get(attribute);
        if (list != null) {
            for (Converter converter : list) {
                if (converter.canConvert(sourceClass, destinationClass)) {
                    return converter;
                }
            }
        }
        return null;
    }