<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Sat Apr 06 19:36:16 JST 2019 -->
<title>CommandLine.RunFirst (picocli 3.9.6 API)</title>
<meta name="date" content="2019-04-06">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
<script type="text/javascript" src="../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="CommandLine.RunFirst (picocli 3.9.6 API)";
        }
    }
    catch(err) {
    }
//-->
var methods = {"i0":10,"i1":10,"i2":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../picocli/CommandLine.RunAll.html" title="class in picocli"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../picocli/CommandLine.RunLast.html" title="class in picocli"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?picocli/CommandLine.RunFirst.html" target="_top">Frames</a></li>
<li><a href="CommandLine.RunFirst.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">picocli</div>
<h2 title="Class CommandLine.RunFirst" class="title">Class CommandLine.RunFirst</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../picocli/CommandLine.AbstractHandler.html" title="class in picocli">picocli.CommandLine.AbstractHandler</a>&lt;R,<a href="../picocli/CommandLine.AbstractParseResultHandler.html" title="class in picocli">CommandLine.AbstractParseResultHandler</a>&lt;R&gt;&gt;</li>
<li>
<ul class="inheritance">
<li><a href="../picocli/CommandLine.AbstractParseResultHandler.html" title="class in picocli">picocli.CommandLine.AbstractParseResultHandler</a>&lt;java.util.List&lt;java.lang.Object&gt;&gt;</li>
<li>
<ul class="inheritance">
<li>picocli.CommandLine.RunFirst</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../picocli/CommandLine.IParseResultHandler.html" title="interface in picocli">CommandLine.IParseResultHandler</a>, <a href="../picocli/CommandLine.IParseResultHandler2.html" title="interface in picocli">CommandLine.IParseResultHandler2</a>&lt;java.util.List&lt;java.lang.Object&gt;&gt;</dd>
</dl>
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../picocli/CommandLine.html" title="class in picocli">CommandLine</a></dd>
</dl>
<hr>
<br>
<pre>public static class <span class="typeNameLabel">CommandLine.RunFirst</span>
extends <a href="../picocli/CommandLine.AbstractParseResultHandler.html" title="class in picocli">CommandLine.AbstractParseResultHandler</a>&lt;java.util.List&lt;java.lang.Object&gt;&gt;
implements <a href="../picocli/CommandLine.IParseResultHandler.html" title="interface in picocli">CommandLine.IParseResultHandler</a></pre>
<div class="block">Command line parse result handler that prints help if requested, and otherwise executes the top-level
 <code>Runnable</code> or <code>Callable</code> command.
 For use in the <a href="../picocli/CommandLine.html#parseWithHandlers-picocli.CommandLine.IParseResultHandler2-picocli.CommandLine.IExceptionHandler2-java.lang.String...-"><code>parseWithHandler</code></a> methods.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>2.0</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../picocli/CommandLine.RunFirst.html#RunFirst--">RunFirst</a></span>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected java.util.List&lt;java.lang.Object&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../picocli/CommandLine.RunFirst.html#handle-picocli.CommandLine.ParseResult-">handle</a></span>(<a href="../picocli/CommandLine.ParseResult.html" title="class in picocli">CommandLine.ParseResult</a>&nbsp;parseResult)</code>
<div class="block">Executes the top-level <code>Runnable</code> or <code>Callable</code> subcommand.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>java.util.List&lt;java.lang.Object&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../picocli/CommandLine.RunFirst.html#handleParseResult-java.util.List-java.io.PrintStream-picocli.CommandLine.Help.Ansi-">handleParseResult</a></span>(java.util.List&lt;<a href="../picocli/CommandLine.html" title="class in picocli">CommandLine</a>&gt;&nbsp;parsedCommands,
                 java.io.PrintStream&nbsp;out,
                 <a href="../picocli/CommandLine.Help.Ansi.html" title="enum in picocli">CommandLine.Help.Ansi</a>&nbsp;ansi)</code>
<div class="block">Prints help if requested, and otherwise executes the top-level <code>Runnable</code> or <code>Callable</code> command.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>protected <a href="../picocli/CommandLine.RunFirst.html" title="class in picocli">CommandLine.RunFirst</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../picocli/CommandLine.RunFirst.html#self--">self</a></span>()</code>
<div class="block">Returns <code>this</code> to allow method chaining when calling the setters for a fluent API.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.picocli.CommandLine.AbstractParseResultHandler">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;picocli.<a href="../picocli/CommandLine.AbstractParseResultHandler.html" title="class in picocli">CommandLine.AbstractParseResultHandler</a></h3>
<code><a href="../picocli/CommandLine.AbstractParseResultHandler.html#handleParseResult-picocli.CommandLine.ParseResult-">handleParseResult</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.picocli.CommandLine.AbstractHandler">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;picocli.<a href="../picocli/CommandLine.AbstractHandler.html" title="class in picocli">CommandLine.AbstractHandler</a></h3>
<code><a href="../picocli/CommandLine.AbstractHandler.html#andExit-int-">andExit</a>, <a href="../picocli/CommandLine.AbstractHandler.html#ansi--">ansi</a>, <a href="../picocli/CommandLine.AbstractHandler.html#err--">err</a>, <a href="../picocli/CommandLine.AbstractHandler.html#exit-int-">exit</a>, <a href="../picocli/CommandLine.AbstractHandler.html#exitCode--">exitCode</a>, <a href="../picocli/CommandLine.AbstractHandler.html#hasExitCode--">hasExitCode</a>, <a href="../picocli/CommandLine.AbstractHandler.html#out--">out</a>, <a href="../picocli/CommandLine.AbstractHandler.html#returnResultOrExit-R-">returnResultOrExit</a>, <a href="../picocli/CommandLine.AbstractHandler.html#throwOrExit-picocli.CommandLine.ExecutionException-">throwOrExit</a>, <a href="../picocli/CommandLine.AbstractHandler.html#useAnsi-picocli.CommandLine.Help.Ansi-">useAnsi</a>, <a href="../picocli/CommandLine.AbstractHandler.html#useErr-java.io.PrintStream-">useErr</a>, <a href="../picocli/CommandLine.AbstractHandler.html#useOut-java.io.PrintStream-">useOut</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="RunFirst--">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>RunFirst</h4>
<pre>public&nbsp;RunFirst()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="handleParseResult-java.util.List-java.io.PrintStream-picocli.CommandLine.Help.Ansi-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handleParseResult</h4>
<pre>public&nbsp;java.util.List&lt;java.lang.Object&gt;&nbsp;handleParseResult(java.util.List&lt;<a href="../picocli/CommandLine.html" title="class in picocli">CommandLine</a>&gt;&nbsp;parsedCommands,
                                                          java.io.PrintStream&nbsp;out,
                                                          <a href="../picocli/CommandLine.Help.Ansi.html" title="enum in picocli">CommandLine.Help.Ansi</a>&nbsp;ansi)</pre>
<div class="block">Prints help if requested, and otherwise executes the top-level <code>Runnable</code> or <code>Callable</code> command.
 Finally, either a list of result objects is returned, or the JVM is terminated if an exit code <a href="../picocli/CommandLine.AbstractHandler.html#andExit-int-">was set</a>.
 If the top-level command does not implement either <code>Runnable</code> or <code>Callable</code>, an <code>ExecutionException</code>
 is thrown detailing the problem and capturing the offending <code>CommandLine</code> object.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../picocli/CommandLine.IParseResultHandler.html#handleParseResult-java.util.List-java.io.PrintStream-picocli.CommandLine.Help.Ansi-">handleParseResult</a></code>&nbsp;in interface&nbsp;<code><a href="../picocli/CommandLine.IParseResultHandler.html" title="interface in picocli">CommandLine.IParseResultHandler</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>parsedCommands</code> - the <code>CommandLine</code> objects that resulted from successfully parsing the command line arguments</dd>
<dd><code>out</code> - the <code>PrintStream</code> to print help to if requested</dd>
<dd><code>ansi</code> - for printing help messages using ANSI styles and colors</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an empty list if help was requested, or a list containing a single element: the result of calling the
      <code>Callable</code>, or a <code>null</code> element if the top-level command was a <code>Runnable</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../picocli/CommandLine.ParameterException.html" title="class in picocli">CommandLine.ParameterException</a></code> - if the <a href="../picocli/CommandLine.HelpCommand.html" title="class in picocli"><code>HelpCommand</code></a> was invoked for an unknown subcommand. Any <code>ParameterExceptions</code>
      thrown from this method are treated as if this exception was thrown during parsing and passed to the <a href="../picocli/CommandLine.IExceptionHandler.html" title="interface in picocli"><code>CommandLine.IExceptionHandler</code></a></dd>
<dd><code><a href="../picocli/CommandLine.ExecutionException.html" title="class in picocli">CommandLine.ExecutionException</a></code> - if a problem occurred while processing the parse results; use
      <a href="../picocli/CommandLine.ExecutionException.html#getCommandLine--"><code>CommandLine.ExecutionException.getCommandLine()</code></a> to get the command or subcommand where processing failed</dd>
</dl>
</li>
</ul>
<a name="handle-picocli.CommandLine.ParseResult-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handle</h4>
<pre>protected&nbsp;java.util.List&lt;java.lang.Object&gt;&nbsp;handle(<a href="../picocli/CommandLine.ParseResult.html" title="class in picocli">CommandLine.ParseResult</a>&nbsp;parseResult)
                                           throws <a href="../picocli/CommandLine.ExecutionException.html" title="class in picocli">CommandLine.ExecutionException</a></pre>
<div class="block">Executes the top-level <code>Runnable</code> or <code>Callable</code> subcommand.
 If the top-level command does not implement either <code>Runnable</code> or <code>Callable</code>, an <code>ExecutionException</code>
 is thrown detailing the problem and capturing the offending <code>CommandLine</code> object.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../picocli/CommandLine.AbstractParseResultHandler.html#handle-picocli.CommandLine.ParseResult-">handle</a></code>&nbsp;in class&nbsp;<code><a href="../picocli/CommandLine.AbstractParseResultHandler.html" title="class in picocli">CommandLine.AbstractParseResultHandler</a>&lt;java.util.List&lt;java.lang.Object&gt;&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>parseResult</code> - the <code>ParseResult</code> that resulted from successfully parsing the command line arguments</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an empty list if help was requested, or a list containing a single element: the result of calling the
      <code>Callable</code>, or a <code>null</code> element if the last (sub)command was a <code>Runnable</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../picocli/CommandLine.ExecutionException.html" title="class in picocli">CommandLine.ExecutionException</a></code> - if a problem occurred while processing the parse results; use
      <a href="../picocli/CommandLine.ExecutionException.html#getCommandLine--"><code>CommandLine.ExecutionException.getCommandLine()</code></a> to get the command or subcommand where processing failed</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>3.0</dd>
</dl>
</li>
</ul>
<a name="self--">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>self</h4>
<pre>protected&nbsp;<a href="../picocli/CommandLine.RunFirst.html" title="class in picocli">CommandLine.RunFirst</a>&nbsp;self()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../picocli/CommandLine.AbstractHandler.html#self--">CommandLine.AbstractHandler</a></code></span></div>
<div class="block">Returns <code>this</code> to allow method chaining when calling the setters for a fluent API.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../picocli/CommandLine.AbstractHandler.html#self--">self</a></code>&nbsp;in class&nbsp;<code><a href="../picocli/CommandLine.AbstractHandler.html" title="class in picocli">CommandLine.AbstractHandler</a>&lt;java.util.List&lt;java.lang.Object&gt;,<a href="../picocli/CommandLine.AbstractParseResultHandler.html" title="class in picocli">CommandLine.AbstractParseResultHandler</a>&lt;java.util.List&lt;java.lang.Object&gt;&gt;&gt;</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li><a href="../index-all.html">Index</a></li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../picocli/CommandLine.RunAll.html" title="class in picocli"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../picocli/CommandLine.RunLast.html" title="class in picocli"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?picocli/CommandLine.RunFirst.html" target="_top">Frames</a></li>
<li><a href="CommandLine.RunFirst.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>