Skip to content

Commit 641b68d

Browse files
author
John J. Aylward
committed
updates javadoc.
1 parent 643b251 commit 641b68d

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

JSONObject.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,16 +277,19 @@ public JSONObject(Map<?, ?> m) {
277277
* <code>"is"</code> followed by an uppercase letter, the method is invoked,
278278
* and a key and the value returned from the getter method are put into the
279279
* new JSONObject.
280-
*
280+
* <p>
281281
* The key is formed by removing the <code>"get"</code> or <code>"is"</code>
282282
* prefix. If the second remaining character is not upper case, then the
283283
* first character is converted to lower case.
284-
*
284+
* <p>
285285
* For example, if an object has a method named <code>"getName"</code>, and
286286
* if the result of calling <code>object.getName()</code> is
287287
* <code>"Larry Fine"</code>, then the JSONObject will contain
288288
* <code>"name": "Larry Fine"</code>.
289-
*
289+
* <p>
290+
* Methods that return <code>void</code> as well as <code>static</code>
291+
* methods are ignored.
292+
*
290293
* @param bean
291294
* An object that has getter methods that should be used to make
292295
* a JSONObject.
@@ -1389,6 +1392,15 @@ public String optString(String key, String defaultValue) {
13891392
return NULL.equals(object) ? defaultValue : object.toString();
13901393
}
13911394

1395+
/**
1396+
* Populates the internal map of the JSONObject with the bean properties.
1397+
* The bean can not be recursive.
1398+
*
1399+
* @see JSONObject#JSONObject(Object)
1400+
*
1401+
* @param bean
1402+
* the bean
1403+
*/
13921404
private void populateMap(Object bean) {
13931405
Class<?> klass = bean.getClass();
13941406

0 commit comments

Comments
 (0)