MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / convert

Method convert

src/main/java/field/utility/Conversions.java:335–361  ·  view source on GitHub ↗
(Object value, List<Class> fit)

Source from the content-addressed store, hash-verified

333 }
334 return alt;
335 }
336
337 static public Object convert(Object value, List<Class> fit) {
338 String[] ei = {null};
339
340 Object o = _convert(value, fit, m -> {
341 ei[0] = m;
342 });
343
344 if (ei[0] != null) {
345 provideExtraInformation(o, ei[0]);
346 }
347
348 // set error consumer on conversion
349
350 // commented out while we debug JDK9's modified-yet-again creation of SAM from functions
351
352// if (o instanceof Errors.SavesErrorConsumer) {
353// if (value instanceof Errors.SavesErrorConsumer) {
354// ((Errors.SavesErrorConsumer) o).setErrorConsumer(wrap(ei[0], ((Errors.SavesErrorConsumer) value).getErrorConsumer()));
355// } else if (value instanceof Errors.ErrorConsumer) {
356// ((Errors.SavesErrorConsumer) o).setErrorConsumer(wrap(ei[0], ((Errors.
357// ErrorConsumer) value)));
358// } else {
359// ((Errors.SavesErrorConsumer) o).setErrorConsumer(wrap(ei[0], Errors.errors.get()));
360// }
361// }
362 return o;
363 }
364

Callers 15

asMap_setMethod · 0.95
call_runnableMethod · 0.95
callMethod · 0.95
asMap_setMethod · 0.95
asMap_setMethod · 0.95
asMap_setMethod · 0.95
asMap_callMethod · 0.95
_convertMethod · 0.95
massageMethod · 0.95
wrapMethod · 0.95
applyMethod · 0.95
asMap_setMethod · 0.95

Calls 2

_convertMethod · 0.95

Tested by

no test coverage detected