Code example for TypeDescriptor

Methods: getObjectType

0
		this.converter = converter;
	} 
 
	public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
		try { 
			return converter.convertSourceToTargetClass(source, targetType.getObjectType());
		} catch (Exception e) {
			throw new IllegalArgumentException(e);
		} 
	} 
 
	public Set<ConvertiblePair> getConvertibleTypes() {
		return Collections.singleton(new ConvertiblePair(converter.getSourceClass(), converter.getTargetClass()));
	} 
 
} 
Connect your IDE to all the code out there  Get Codota for Java