MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / apply

Method apply

java/src/org/openqa/selenium/json/UuidCoercer.java:31–51  ·  view source on GitHub ↗
(Type type)

Source from the content-addressed store, hash-verified

29 }
30
31 @Override
32 public BiFunction<JsonInput, PropertySetting, UUID> apply(Type type) {
33 return (jsonInput, propertySetting) -> {
34 String toCoerce;
35
36 switch (jsonInput.peek()) {
37 case NAME:
38 toCoerce = jsonInput.nextName();
39 break;
40
41 case STRING:
42 toCoerce = jsonInput.nextString();
43 break;
44
45 default:
46 throw new JsonException("Unable to coerce type to UUID: " + jsonInput.peek());
47 }
48
49 return UUID.fromString(toCoerce);
50 };
51 }
52}

Callers

nothing calls this directly

Calls 4

nextNameMethod · 0.80
nextStringMethod · 0.80
peekMethod · 0.45
fromStringMethod · 0.45

Tested by

no test coverage detected