In dem Buch "Thinking in Java" gibt es ein Beispiel dafür, wie man über Reflection/Introspection Informationen für eine Bean erhält.
BeanInfo bi = Introspector.getBeanInfo(Car.class, Object.class);
for (PropertyDescriptor d: bi.getPropertyDescriptors()) {
Class<?> p = d.getPropertyType();
if (p == null) continue;
[...]
}
In Zeile 4 des obigen Beispiels wird geprüft, ob der PropertyType null ist. Wann und unter welchen Umständen ist das der Fall? Können Sie ein Beispiel nennen?