Skip to content

Commit

Permalink
Generate dokka
Browse files Browse the repository at this point in the history
  • Loading branch information
ajalt committed Aug 26, 2018
1 parent b1cb9e0 commit 42d65d8
Show file tree
Hide file tree
Showing 31 changed files with 704 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
package com.github.ajalt.clikt.output

import com.github.ajalt.clikt.core.Context
import java.io.Console
import java.io.IOException

/**
* An object that is used by commands and parameters to show text to the user and read input.
*
* By default, stdin and stdout are used, but you can provide an implementation of this interface to
* [Context.console] to customize the behavior.
*/
interface CliktConsole {
/**
* Show the [prompt] to the user, and return a line of their response.
Expand Down
19 changes: 19 additions & 0 deletions docs/api/clikt/alltypes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ <h3>All Types</h3>
</tr>
<tr>
<td>
<a href="../com.github.ajalt.clikt.output/-clikt-console/index.html">com.github.ajalt.clikt.output.CliktConsole</a></td>
<td>
<p>An object that is used by commands and parameters to show text to the user and read input.</p>
</td>
</tr>
<tr>
<td>
<a href="../com.github.ajalt.clikt.core/-clikt-error/index.html">com.github.ajalt.clikt.core.CliktError</a></td>
<td>
<p>An exception during command line processing that should be shown to the user.</p>
Expand Down Expand Up @@ -143,6 +150,12 @@ <h3>All Types</h3>
</tr>
<tr>
<td>
<a href="../com.github.ajalt.clikt.output/-interactive-clikt-console/index.html">com.github.ajalt.clikt.output.InteractiveCliktConsole</a></td>
<td>
</td>
</tr>
<tr>
<td>
<a href="../com.github.ajalt.clikt.core/-missing-parameter/index.html">com.github.ajalt.clikt.core.MissingParameter</a></td>
<td>
<p>A required parameter was not provided</p>
Expand All @@ -164,6 +177,12 @@ <h3>All Types</h3>
</tr>
<tr>
<td>
<a href="../com.github.ajalt.clikt.output/-non-interactive-clikt-console/index.html">com.github.ajalt.clikt.output.NonInteractiveCliktConsole</a></td>
<td>
</td>
</tr>
<tr>
<td>
<a href="../com.github.ajalt.clikt.parameters.options/-nullable-option.html">com.github.ajalt.clikt.parameters.options.NullableOption</a></td>
<td>
</td>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<HTML>
<HEAD>
<meta charset="UTF-8">
<title>CliktCommand.echo - clikt</title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">clikt</a>&nbsp;/&nbsp;<a href="../index.html">com.github.ajalt.clikt.core</a>&nbsp;/&nbsp;<a href="index.html">CliktCommand</a>&nbsp;/&nbsp;<a href="./echo.html">echo</a><br/>
<br/>
<h1>echo</h1>
<a name="com.github.ajalt.clikt.core.CliktCommand$echo(kotlin.Any, kotlin.Boolean, kotlin.Boolean)"></a>
<code><span class="keyword">protected</span> <span class="keyword">fun </span><span class="identifier">echo</span><span class="symbol">(</span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$echo(kotlin.Any, kotlin.Boolean, kotlin.Boolean)/message">message</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html"><span class="identifier">Any</span></a><span class="symbol">?</span><span class="symbol">, </span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$echo(kotlin.Any, kotlin.Boolean, kotlin.Boolean)/trailingNewline">trailingNewline</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a>&nbsp;<span class="symbol">=</span>&nbsp;true<span class="symbol">, </span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$echo(kotlin.Any, kotlin.Boolean, kotlin.Boolean)/err">err</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a>&nbsp;<span class="symbol">=</span>&nbsp;false<span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
<p>Print the <a href="echo.html#com.github.ajalt.clikt.core.CliktCommand$echo(kotlin.Any, kotlin.Boolean, kotlin.Boolean)/message">message</a> to the screen.</p>
<p>This is similar to <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.io/print.html">print</a> or <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.io/println.html">println</a>, but converts newlines to the system line separator.</p>
<p>This is equivalent to calling <a href="../../com.github.ajalt.clikt.output/-term-ui/echo.html">TermUi.echo</a> with the console from the current context.</p>
<h3>Parameters</h3>
<p><a name="message"></a>
<code>message</code> - The message to print.</p>
<p><a name="trailingNewline"></a>
<code>trailingNewline</code> - If true, behave like <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.io/println.html">println</a>, otherwise behave like <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.io/print.html">print</a></p>
<p><a name="err"></a>
<code>err</code> - If true, print to stderr instead of stdout</p>
</BODY>
</HTML>
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,15 @@ <h3>Functions</h3>
</tr>
<tr>
<td>
<p><a href="echo.html">echo</a></p>
</td>
<td>
<code><span class="keyword">fun </span><span class="identifier">echo</span><span class="symbol">(</span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$echo(kotlin.Any, kotlin.Boolean, kotlin.Boolean)/message">message</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html"><span class="identifier">Any</span></a><span class="symbol">?</span><span class="symbol">, </span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$echo(kotlin.Any, kotlin.Boolean, kotlin.Boolean)/trailingNewline">trailingNewline</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a>&nbsp;<span class="symbol">=</span>&nbsp;true<span class="symbol">, </span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$echo(kotlin.Any, kotlin.Boolean, kotlin.Boolean)/err">err</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a>&nbsp;<span class="symbol">=</span>&nbsp;false<span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
<p>Print the <a href="echo.html#com.github.ajalt.clikt.core.CliktCommand$echo(kotlin.Any, kotlin.Boolean, kotlin.Boolean)/message">message</a> to the screen.</p>
</td>
</tr>
<tr>
<td>
<p><a href="get-formatted-help.html">getFormattedHelp</a></p>
</td>
<td>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<HTML>
<HEAD>
<meta charset="UTF-8">
<title>Context.Builder.console - clikt</title>
<link rel="stylesheet" href="../../../../style.css">
</HEAD>
<BODY>
<a href="../../../index.html">clikt</a>&nbsp;/&nbsp;<a href="../../index.html">com.github.ajalt.clikt.core</a>&nbsp;/&nbsp;<a href="../index.html">Context</a>&nbsp;/&nbsp;<a href="index.html">Builder</a>&nbsp;/&nbsp;<a href="./console.html">console</a><br/>
<br/>
<h1>console</h1>
<a name="com.github.ajalt.clikt.core.Context.Builder$console"></a>
<code><span class="keyword">var </span><span class="identifier">console</span><span class="symbol">: </span><a href="../../../com.github.ajalt.clikt.output/-clikt-console/index.html"><span class="identifier">CliktConsole</span></a></code>
<p>The console that will handle reading and writing text.</p>
<p>The default uses <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/System.html">System.in</a> and <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/System.html#out">System.out</a>.</p>
</BODY>
</HTML>
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ <h3>Properties</h3>
</tr>
<tr>
<td>
<p><a href="console.html">console</a></p>
</td>
<td>
<code><span class="keyword">var </span><span class="identifier">console</span><span class="symbol">: </span><a href="../../../com.github.ajalt.clikt.output/-clikt-console/index.html"><span class="identifier">CliktConsole</span></a></code>
<p>The console that will handle reading and writing text.</p>
</td>
</tr>
<tr>
<td>
<p><a href="help-formatter.html">helpFormatter</a></p>
</td>
<td>
Expand Down
Loading

0 comments on commit 42d65d8

Please sign in to comment.