Code example for TypeDescriptor

Methods: getType

		return Collections.singleton(new ConvertiblePair(Object.class, Object.class));
	public boolean matches(TypeDescriptor sourceType, TypeDescriptor targetType) {
		if (sourceType.getType().equals(targetType.getType())) {
			// no conversion required 
			return false; 
		return (String.class.equals(targetType.getType()) ?
				(ClassUtils.getConstructorIfAvailable(String.class, sourceType.getType()) != null) :
				hasToMethodOrOfMethodOrConstructor(targetType.getType(), sourceType.getType()));
	public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
		if (source == null) {
			return null; 
		Class<?> sourceClass = sourceType.getType();
Connect your IDE to all the code out there  Get Codota for Java