(Type type)
| 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 | } |
nothing calls this directly
no test coverage detected