Announcement Announcement Module
Collapse
No announcement yet.
Getting the type of a nested bean property Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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("b.name", new Class[]{A.class}) returns null, also BeanUtils.getPropertyDescriptor(A.class, "b.name"), 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?
Working...
X