Class DefaultExtraArgument

java.lang.Object
gov.nist.secauto.metaschema.cli.processor.command.impl.DefaultExtraArgument
All Implemented Interfaces:
ExtraArgument

public class DefaultExtraArgument extends Object implements ExtraArgument
A default implementation of the ExtraArgument interface that represents a named command-line argument which can be marked as required or optional.

This implementation is used by the command processor to handle additional arguments that are not covered by specific command options.

  • Constructor Details

    • DefaultExtraArgument

      public DefaultExtraArgument(@NonNull String name, boolean required)
      Construct a new instance.
      Parameters:
      name - the argument name
      required - true if the argument is required, or false otherwise
  • Method Details

    • getName

      public String getName()
      Description copied from interface: ExtraArgument
      Get the argument name.
      Specified by:
      getName in interface ExtraArgument
      Returns:
      the name
    • isRequired

      public boolean isRequired()
      Description copied from interface: ExtraArgument
      Get if the argument is required.
      Specified by:
      isRequired in interface ExtraArgument
      Returns:
      true if the argument is required, or false otherwise