[Logo]
Forums Register Login
BeanUtilsBean from Apache Commons - member variable
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.
CarefullyChooseOneForum while posting.
Moving to Other open source projects.
 

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?
Forget this weirdo. You guys wanna see something really neat? I just have to take off my shoe .... (hint: it's a tiny ad)
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature


This thread has been viewed 909 times.

All times above are in ranch (not your local) time.
The current ranch time is
Apr 24, 2018 00:40:15.