1.

Why Can't Beanutils Find My Method?

Answer»

The BEANUTILS package RELIES on introspection rather than reflection. This means that it will FIND only JavaBean compliant properties.

There are some subtleties of this specification that can catch out the unwary:

  • A PROPERTY can have only ONE set and one get method. Overloading is not allowed.
  • The java.beans.Introspector searches widely for a custom BeanInfo class. If your class has the same name as another with a custom BeanInfo (typically a java API class) then the Introspector may use that instead of creating via reflection based on your class. If this happens, the only solution is to create your own BeanInfo.

The BeanUtils package relies on introspection rather than reflection. This means that it will find only JavaBean compliant properties.

There are some subtleties of this specification that can catch out the unwary:



Discussion

No Comment Found