MCPcopy Index your code
hub / github.com/google/gson / expect

Method expect

src/main/java/com/google/gson/stream/JsonReader.java:320–326  ·  view source on GitHub ↗

Consumes expected.

(JsonToken expected)

Source from the content-addressed store, hash-verified

318 * Consumes {@code expected}.
319 */
320 private void expect(JsonToken expected) throws IOException {
321 quickPeek();
322 if (token != expected) {
323 throw new IllegalStateException("Expected " + expected + " but was " + peek());
324 }
325 advance();
326 }
327
328 /**
329 * Returns true if the current array or object has another element.

Callers 4

beginArrayMethod · 0.95
endArrayMethod · 0.95
beginObjectMethod · 0.95
endObjectMethod · 0.95

Calls 3

quickPeekMethod · 0.95
peekMethod · 0.95
advanceMethod · 0.95

Tested by

no test coverage detected