MCPcopy Create free account
hub / github.com/cschanck/single-file-java / Step

Method Step

src/main/java/org/sfj/PegLegParser.java:464–476  ·  view source on GitHub ↗
(Object thing)

Source from the content-addressed store, hash-verified

462 private Exec exec = null;
463
464 public Step(Object thing) {
465 if (thing instanceof CharSequence) {
466 this.rule = str((CharSequence) thing);
467 } else if (thing instanceof Character) {
468 this.rule = ch((Character) thing);
469 } else if (thing instanceof PegLegParser.PegLegRule) {
470 this.rule = (PegLegRule<V>) thing;
471 } else if (thing instanceof Exec) {
472 this.exec = (Exec) thing;
473 } else if (thing instanceof Runnable) { this.exec = ex((Runnable) thing); } else {
474 throw new RuntimeException("Expected String/char/PegLegRule/Exec/Runnable; found: " + thing);
475 }
476 }
477
478 public Exec asExec() { return this.exec; }
479

Callers

nothing calls this directly

Calls 3

strMethod · 0.80
chMethod · 0.80
exMethod · 0.80

Tested by

no test coverage detected