Class AppHelper

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

public class AppHelper extends CliHelper
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".
  • 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

      public static AppHelper.Builder builder()
      Creates builder to build AppHelper.
      Returns:
      created builder
    • printBanner

      protected void printBanner()
      Prints the application's banner to the console.
      Overrides:
      printBanner in class CliHelper
    • printHelp

      protected void printHelp()
      Prints the application's help to the console.
      Overrides:
      printHelp in class CliHelper