Class ExampleRunner

java.lang.Object
jline.examples.ExampleRunner

public class ExampleRunner extends Object
Run one example by name, the way line-examples runs one C++ example.

Every other example class exposes a main that runs its whole family in sequence, which is the right shape for a person reading one file and the wrong shape for a harness that needs the output of a single example attributed to that example. doc/latex/harvest-java.py uses this to capture per-example evidence for the Java edition of the manual, so a page can show what its own listing prints rather than what its family prints.

   java -cp common/jline.jar jline.examples.ExampleRunner <class> <method>
 

The method must be public, static and take no arguments -- the shape every example demo already has. The exit status is 0 when the example returned and 1 when it threw, so a sweep is usable from a shell without parsing the output.

  • Constructor Details

    • ExampleRunner

      public ExampleRunner()
  • Method Details

    • main

      public static void main(String[] args)