| Author |
BeanUtilsBean from Apache Commons - member variable
|
Sam Gehouse
Ranch Hand
Joined: Jul 21, 2003
Posts: 281
|
|
Documentation says:
org.apache.commons.beanutils.BeanUtilsBean
public Map describe(Object bean)
Return the entire set of properties for which the specified bean provides a read method. This map contains the to String converted property values for all properties for which a read method is provided (i.e. where the getReadMethod() returns non-null).
My question:
What if a private member variable of an Object instance gets populated by constructor? If that private member variable of the Object instance did not have a public getter method defined in the Object, then that private member variable will not ne returned in the Map from describe.
Is my statemement for the API correct?
I wanted to ask the question above to make sure that I am reading the documentation correct.
Will appreciate any comments.
|
 |
Nitesh Kant
Bartender
Joined: Feb 25, 2007
Posts: 1638
|
|
CarefullyChooseOneForum while posting.
Moving to Other open source projects.
|
apigee, a better way to API!
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3268
|
|
Sam Gehouse wrote:Documentation says:
My question:
What if a private member variable of an Object instance gets populated by constructor? If that private member variable of the Object instance did not have a public getter method defined in the Object, then that private member variable will not ne returned in the Map from describe.
Is my statement for the API correct?
Will appreciate any comments.
I believe you are correct yes. I assume you're deliberately wanting to keep this value hidden?
|
Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
|
 |
 |
|
|
subject: BeanUtilsBean from Apache Commons - member variable
|
|
|