I'm thinking about adding convenient isInstance method to TypeInfo.
On ClassInfoImpl/JavassistTypeInfo it would use getType::isInstance,
but on PrimitiveInfo it would still look into progression.
The method would hide simple impl detail.
TypeInfo ti = ...; Object value = ...; // not null //long version TypeInfoFactory tif = ti.getTypeInfoFactory(); TypeInfo other = tif.getTypeInfo(value.getClass()); boolean isInstance = ti.isAssignableFrom(other); // short boolean isInstance = ti.isInstance(value); // where this doesn't consider progression boolean isInstance = ti.getType().isInstance(value);
"alesj" wrote:
OK?