Class ArgDesc


  • public class ArgDesc
    extends java.lang.Object
    Represents a command argument description used for generating command help and documentation. This class stores the name of an argument and its description as a list of attributed strings, which can include formatting and styling.
    • Constructor Summary

      Constructors 
      Constructor Description
      ArgDesc​(java.lang.String name)
      Creates a new argument description with the specified name and an empty description.
      ArgDesc​(java.lang.String name, java.util.List<AttributedString> description)
      Creates a new argument description with the specified name and description.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<ArgDesc> doArgNames​(java.util.List<java.lang.String> names)
      Creates a list of argument descriptions from a list of argument names.
      java.util.List<AttributedString> getDescription()
      Returns the description of the argument as a list of attributed strings.
      java.lang.String getName()
      Returns the name of the argument.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ArgDesc

        public ArgDesc​(java.lang.String name)
        Creates a new argument description with the specified name and an empty description.
        Parameters:
        name - the name of the argument
        Throws:
        java.lang.IllegalArgumentException - if the name contains spaces or tabs
      • ArgDesc

        public ArgDesc​(java.lang.String name,
                       java.util.List<AttributedString> description)
        Creates a new argument description with the specified name and description.
        Parameters:
        name - the name of the argument
        description - the description of the argument as a list of attributed strings
        Throws:
        java.lang.IllegalArgumentException - if the name contains spaces or tabs
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of the argument.
        Returns:
        the argument name
      • getDescription

        public java.util.List<AttributedString> getDescription()
        Returns the description of the argument as a list of attributed strings.
        Returns:
        the argument description
      • doArgNames

        public static java.util.List<ArgDesc> doArgNames​(java.util.List<java.lang.String> names)
        Creates a list of argument descriptions from a list of argument names. Each argument description will have an empty description.
        Parameters:
        names - the list of argument names
        Returns:
        a list of argument descriptions