MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / readArray

Method readArray

java/src/org/openqa/selenium/json/JsonInput.java:484–494  ·  view source on GitHub ↗

Read an array of elements from the JSON input stream with elements as the specified type. @param type data type for deserialization (class or TypeToken) @return list of objects of the specified type deserialized from the JSON input stream NOTE : Returns null if the inp

(Type type)

Source from the content-addressed store, hash-verified

482 * @throws UncheckedIOException if an I/O exception is encountered
483 */
484 public <T> List<T> readArray(Type type) {
485 List<T> toReturn = new ArrayList<>();
486
487 beginArray();
488 while (hasNext()) {
489 toReturn.add(coercer.coerce(this, type, setter));
490 }
491 endArray();
492
493 return toReturn;
494 }
495
496 /**
497 * Determine if awaiting a JSON object property name.

Callers 1

canReadListOfTypeMethod · 0.80

Calls 5

beginArrayMethod · 0.95
hasNextMethod · 0.95
endArrayMethod · 0.95
coerceMethod · 0.80
addMethod · 0.65

Tested by 1

canReadListOfTypeMethod · 0.64