java.lang.Object
org.refcodes.archetype.CliHelper
org.refcodes.archetype.AppHelper
- All Implemented Interfaces:
org.refcodes.cli.Optionable
,org.refcodes.mixin.VerboseAccessor
,org.refcodes.properties.ext.application.ApplicationPropertiesAccessor
The
AppHelper
is a stripped down CliHelper
intended to be
used by GUI applications which must(!) avoid (to link to)
java.awt
which might not be available on a target platform such
as Android. Background: For mere nerd purposes, the CliHelper
comes
with a full blown ASCII-Art banner which uses an AWT graphics context to
convert text fonts or graphics to ASCII-Art. The AWT graphics context is not
available on Android and causes applications built with the GraalVM and
Gluon's substrate to crash as of an unavailable "fontmanager symbol".-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.properties.ext.application.ApplicationPropertiesAccessor
org.refcodes.properties.ext.application.ApplicationPropertiesAccessor.ApplicationPropertiesBuilder<B extends org.refcodes.properties.ext.application.ApplicationPropertiesAccessor.ApplicationPropertiesBuilder<B>>, org.refcodes.properties.ext.application.ApplicationPropertiesAccessor.ApplicationPropertiesMutator, org.refcodes.properties.ext.application.ApplicationPropertiesAccessor.ApplicationPropertiesProperty
Nested classes/interfaces inherited from interface org.refcodes.mixin.VerboseAccessor
org.refcodes.mixin.VerboseAccessor.VerboseMutator, org.refcodes.mixin.VerboseAccessor.VerboseProperty
-
Field Summary
Fields inherited from class org.refcodes.archetype.CliHelper
_properties, DEFAULT_PASSWORD_PROMPT
-
Constructor Summary
ConstructorDescriptionAppHelper
(String[] aArgs, Character aShortOptionPrefix, String aLongOptionPrefix, org.refcodes.cli.Constituent aArgsSyntax, org.refcodes.cli.SyntaxMetrics aSyntaxMetrics, String aTitle, String aName, String aDescription, String aCopyright, String aLicense, Collection<org.refcodes.cli.Example> aExamples, URL aUrl, InputStream aInputStream, File aFile, String aFilePath, org.refcodes.runtime.ConfigLocator aConfigLocator, Class<?> aResourceClass, char[] aDelimiters, boolean isVerboseFallback, String aPasswordPrompt, org.refcodes.textual.Font aBannerFont, char[] aBannerFontPalette, Character aSeparatorLnChar, org.refcodes.textual.TextBoxGrid aTextBoxGrid, String aLineBreak, Integer aConsoleWidth, Integer aMaxConsoleWidth, Boolean aIsEscCodesEnabled, String aBannerEscCode, String aBannerBorderEscCode, String aArgumentEscCode, String aCommandEscCode, String aOptionEscCode, String aDescriptionEscCode, String aLineSeparatorEscCode, String aResetEscCode, Consumer<Integer> aShutdownHook, PrintStream aStandardOut, PrintStream aErrorOut, org.refcodes.logger.RuntimeLogger aLogger) -
Method Summary
Modifier and TypeMethodDescriptionstatic AppHelper.Builder
builder()
Creates builder to buildAppHelper
.protected void
Prints the application's banner to the console.protected void
Prints the application's help to the console.Methods inherited from class org.refcodes.archetype.CliHelper
createResourceFile, createResourceFile, exit, exit, exitOnException, getApplicationProperties, isVerbose, printException, printSysInfo, readPassword, readPassword, toOptions
-
Constructor Details
-
AppHelper
public AppHelper(String[] aArgs, Character aShortOptionPrefix, String aLongOptionPrefix, org.refcodes.cli.Constituent aArgsSyntax, org.refcodes.cli.SyntaxMetrics aSyntaxMetrics, String aTitle, String aName, String aDescription, String aCopyright, String aLicense, Collection<org.refcodes.cli.Example> aExamples, URL aUrl, InputStream aInputStream, File aFile, String aFilePath, org.refcodes.runtime.ConfigLocator aConfigLocator, Class<?> aResourceClass, char[] aDelimiters, boolean isVerboseFallback, String aPasswordPrompt, org.refcodes.textual.Font aBannerFont, char[] aBannerFontPalette, Character aSeparatorLnChar, org.refcodes.textual.TextBoxGrid aTextBoxGrid, String aLineBreak, Integer aConsoleWidth, Integer aMaxConsoleWidth, Boolean aIsEscCodesEnabled, String aBannerEscCode, String aBannerBorderEscCode, String aArgumentEscCode, String aCommandEscCode, String aOptionEscCode, String aDescriptionEscCode, String aLineSeparatorEscCode, String aResetEscCode, Consumer<Integer> aShutdownHook, PrintStream aStandardOut, PrintStream aErrorOut, org.refcodes.logger.RuntimeLogger aLogger)
-
-
Method Details
-
builder
Creates builder to buildAppHelper
.- Returns:
- created builder
-
printBanner
protected void printBanner()Prints the application's banner to the console.- Overrides:
printBanner
in classCliHelper
-
printHelp
protected void printHelp()Prints the application's help to the console.
-