[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?
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Nov 19, 2017 21:33:08.