Class MCRCommand

java.lang.Object
org.mycore.frontend.cli.MCRCommand

public class MCRCommand extends Object
Represents a command understood by the command line interface. A command has an external input syntax that the user uses to invoke the command and points to a method in a class that implements the command.
Version:
$Revision$ $Date$
Author:
Frank Lützenkirchen, Jens Kupferschmidt
See Also:
  • Field Details

    • messageFormat

      protected MessageFormat messageFormat
      The input format used for invoking this command
    • parameterTypes

      protected Class<?>[] parameterTypes
      The types of the invocation parameters
    • className

      protected String className
      The class providing the implementation method
    • methodName

      protected String methodName
      The method implementing this command
    • suffix

      protected String suffix
      The beginning of the message format up to the first parameter
    • help

      protected String help
      The help text String
  • Constructor Details

    • MCRCommand

      protected MCRCommand()
      use this to overwrite this class.
    • MCRCommand

      public MCRCommand(String format, String methodSignature, String helpText)
      Creates a new MCRCommand.
      Parameters:
      format - the command syntax, e.g. "save document {0} to directory {1}"
      methodSignature - the method to invoke, e.g. "miless.commandline.DocumentCommands.saveDoc int String"
      helpText - the helpt text for this command
    • MCRCommand

      public MCRCommand(Method cmd)
  • Method Details