Code example for TypeDescriptor

Methods: getType

0
		return Collections.singleton(new ConvertiblePair(Object.class, Object.class));
	} 
 
	@Override 
	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()));
	} 
 
	@Override 
	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