Announcement Announcement Module
No announcement yet.
Getting the type of a nested bean property Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting the type of a nested bean property

    I would like to get the type of a simple nested bean property. For example if the following beans are defined:

    class A {
    private B b;

    ... getters and setters ...
    class B {
    private String name;

    ... getters and setters ...

    trying BeanUtils.findPropertyType("", new Class[]{A.class}) returns null, also BeanUtils.getPropertyDescriptor(A.class, ""), returns a default value, while I would expect it to return the type String .

    Is such thing is supported in the org.springframework.beans... package?