Skip to content

Commit 49b0aa8

Browse files
authoredMay 21, 2024··
Add some doc for boolean provider methods in TerminalBuider (fixes #979) (#981)
1 parent 1f9dfb7 commit 49b0aa8

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
 

‎terminal/src/main/java/org/jline/terminal/TerminalBuilder.java

+44
Original file line numberDiff line numberDiff line change
@@ -207,41 +207,85 @@ public TerminalBuilder systemOutput(SystemOutput systemOutput) {
207207
return this;
208208
}
209209

210+
/**
211+
* Forces the usage of the give terminal provider.
212+
*
213+
* @param provider The {@link TerminalProvider}'s name to use when creating the Terminal.
214+
* @return The builder.
215+
*/
210216
public TerminalBuilder provider(String provider) {
211217
this.provider = provider;
212218
return this;
213219
}
214220

221+
/**
222+
* Sets the list of providers to try when creating the terminal.
223+
* If not specified, the system property {@link #PROP_PROVIDERS} will be used if set.
224+
* Else, the value {@link #PROP_PROVIDERS_DEFAULT} will be used.
225+
*
226+
* @param providers The list of {@link TerminalProvider}'s names to check when creating the Terminal.
227+
* @return The builder.
228+
*/
215229
public TerminalBuilder providers(String providers) {
216230
this.providers = providers;
217231
return this;
218232
}
219233

234+
/**
235+
* Enables or disables the {@link #PROP_PROVIDER_JNA}/{@code jna} terminal provider.
236+
* If not specified, the system property {@link #PROP_JNA} will be used if set.
237+
* If not specified, the provider will be checked.
238+
*/
220239
public TerminalBuilder jna(boolean jna) {
221240
this.jna = jna;
222241
return this;
223242
}
224243

244+
/**
245+
* Enables or disables the {@link #PROP_PROVIDER_JANSI}/{@code jansi} terminal provider.
246+
* If not specified, the system property {@link #PROP_JANSI} will be used if set.
247+
* If not specified, the provider will be checked.
248+
*/
225249
public TerminalBuilder jansi(boolean jansi) {
226250
this.jansi = jansi;
227251
return this;
228252
}
229253

254+
/**
255+
* Enables or disables the {@link #PROP_PROVIDER_JNI}/{@code jni} terminal provider.
256+
* If not specified, the system property {@link #PROP_JNI} will be used if set.
257+
* If not specified, the provider will be checked.
258+
*/
230259
public TerminalBuilder jni(boolean jni) {
231260
this.jni = jni;
232261
return this;
233262
}
234263

264+
/**
265+
* Enables or disables the {@link #PROP_PROVIDER_EXEC}/{@code exec} terminal provider.
266+
* If not specified, the system property {@link #PROP_EXEC} will be used if set.
267+
* If not specified, the provider will be checked.
268+
*/
235269
public TerminalBuilder exec(boolean exec) {
236270
this.exec = exec;
237271
return this;
238272
}
239273

274+
/**
275+
* Enables or disables the {@link #PROP_PROVIDER_FFM}/{@code ffm} terminal provider.
276+
* If not specified, the system property {@link #PROP_FFM} will be used if set.
277+
* If not specified, the provider will be checked.
278+
*/
240279
public TerminalBuilder ffm(boolean ffm) {
241280
this.ffm = ffm;
242281
return this;
243282
}
244283

284+
/**
285+
* Enables or disables the {@link #PROP_PROVIDER_DUMB}/{@code dumb} terminal provider.
286+
* If not specified, the system property {@link #PROP_DUMB} will be used if set.
287+
* If not specified, the provider will be checked.
288+
*/
245289
public TerminalBuilder dumb(boolean dumb) {
246290
this.dumb = dumb;
247291
return this;

0 commit comments

Comments
 (0)
Please sign in to comment.