Class JLineMessageBuilderFactory

java.lang.Object
org.apache.maven.jline.JLineMessageBuilderFactory
All Implemented Interfaces:
Service, MessageBuilderFactory, org.codehaus.plexus.components.interactivity.InputHandler, org.codehaus.plexus.components.interactivity.OutputHandler, org.codehaus.plexus.components.interactivity.Prompter

@Experimental @Named @Singleton @Priority(10) public class JLineMessageBuilderFactory extends Object implements MessageBuilderFactory, org.codehaus.plexus.components.interactivity.Prompter, org.codehaus.plexus.components.interactivity.InputHandler, org.codehaus.plexus.components.interactivity.OutputHandler
  • Constructor Details

    • JLineMessageBuilderFactory

      public JLineMessageBuilderFactory()
  • Method Details

    • isColorEnabled

      public boolean isColorEnabled()
      Description copied from interface: MessageBuilderFactory
      Checks if the underlying output does support styling or not.
      Specified by:
      isColorEnabled in interface MessageBuilderFactory
      Returns:
      whether color styling is supported or not
    • getTerminalWidth

      public int getTerminalWidth()
      Description copied from interface: MessageBuilderFactory
      Returns the terminal width or -1 if not supported.
      Specified by:
      getTerminalWidth in interface MessageBuilderFactory
      Returns:
      the terminal width
    • builder

      public MessageBuilder builder()
      Description copied from interface: MessageBuilderFactory
      Creates a new message builder.
      Specified by:
      builder in interface MessageBuilderFactory
      Returns:
      a new message builder
    • builder

      public MessageBuilder builder(int size)
      Description copied from interface: MessageBuilderFactory
      Creates a new message builder of the specified size.
      Specified by:
      builder in interface MessageBuilderFactory
      Parameters:
      size - the initial size of the message builder buffer
      Returns:
      a new message builder
    • readLine

      public String readLine() throws IOException
      Specified by:
      readLine in interface org.codehaus.plexus.components.interactivity.InputHandler
      Throws:
      IOException
    • readPassword

      public String readPassword() throws IOException
      Specified by:
      readPassword in interface org.codehaus.plexus.components.interactivity.InputHandler
      Throws:
      IOException
    • readMultipleLines

      public List<String> readMultipleLines() throws IOException
      Specified by:
      readMultipleLines in interface org.codehaus.plexus.components.interactivity.InputHandler
      Throws:
      IOException
    • write

      public void write(String line) throws IOException
      Specified by:
      write in interface org.codehaus.plexus.components.interactivity.OutputHandler
      Throws:
      IOException
    • writeLine

      public void writeLine(String line) throws IOException
      Specified by:
      writeLine in interface org.codehaus.plexus.components.interactivity.OutputHandler
      Throws:
      IOException
    • prompt

      public String prompt(String message) throws org.codehaus.plexus.components.interactivity.PrompterException
      Specified by:
      prompt in interface org.codehaus.plexus.components.interactivity.Prompter
      Throws:
      org.codehaus.plexus.components.interactivity.PrompterException
    • prompt

      public String prompt(String message, String defaultReply) throws org.codehaus.plexus.components.interactivity.PrompterException
      Specified by:
      prompt in interface org.codehaus.plexus.components.interactivity.Prompter
      Throws:
      org.codehaus.plexus.components.interactivity.PrompterException
    • prompt

      public String prompt(String message, List possibleValues) throws org.codehaus.plexus.components.interactivity.PrompterException
      Specified by:
      prompt in interface org.codehaus.plexus.components.interactivity.Prompter
      Throws:
      org.codehaus.plexus.components.interactivity.PrompterException
    • prompt

      public String prompt(String message, List possibleValues, String defaultReply) throws org.codehaus.plexus.components.interactivity.PrompterException
      Specified by:
      prompt in interface org.codehaus.plexus.components.interactivity.Prompter
      Throws:
      org.codehaus.plexus.components.interactivity.PrompterException
    • promptForPassword

      public String promptForPassword(String message) throws org.codehaus.plexus.components.interactivity.PrompterException
      Specified by:
      promptForPassword in interface org.codehaus.plexus.components.interactivity.Prompter
      Throws:
      org.codehaus.plexus.components.interactivity.PrompterException
    • showMessage

      public void showMessage(String message) throws org.codehaus.plexus.components.interactivity.PrompterException
      Specified by:
      showMessage in interface org.codehaus.plexus.components.interactivity.Prompter
      Throws:
      org.codehaus.plexus.components.interactivity.PrompterException