
org.appdapter.gui.browse.ProxyConvertor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.appdapter.lib.gui Show documentation
Show all versions of org.appdapter.lib.gui Show documentation
Appdapter Maven project including Java and Scala, produces jar, not bundle. Excludes concrete SLF4J binding.
The newest version!
package org.appdapter.gui.browse;
import java.util.List;
import org.appdapter.core.convert.Converter;
import org.appdapter.core.convert.NoSuchConversionException;
public class ProxyConvertor implements Converter {
@Override public Integer declaresConverts(Object val, Class valClass, Class objNeedsToBe, List maxCvt) {
PropertyDescriptorForField f = PropertyDescriptorForField.proxyToField.get(objNeedsToBe);
if (f == null)
return WONT;
return f.declaresConverts(val, valClass, objNeedsToBe, maxCvt);
}
@Override public T convert(Object obj, Class objNeedsToBe, List maxCvt) throws NoSuchConversionException {
PropertyDescriptorForField f = PropertyDescriptorForField.proxyToField.get(objNeedsToBe);
if (f == null)
return null;
if (f == null)
throw new NoSuchConversionException(obj, objNeedsToBe);
return f.convert(obj, objNeedsToBe, maxCvt);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy