Interface ArgsSyntax

    • Method Detail

      • toOperands

        List<? extends Operand<?>> toOperands()
        Traverses the hierarchy of ArgsSyntaxs and collects all therein found Operands and sub-types such as the Flag or the Option. This is most useful when creating a list of Options, Flages and Operands when printing out detailed help.
        Returns:
        The according Operand elements.
      • toOperand

        default Operand<?> toOperand​(String aAlias)
        Traverses the hierarchy of ArgsSyntax tree and returns the (first) operand matching the given alias.
        Parameters:
        aAlias - The alias for which to seek for.
        Returns:
        The according Operand element or null if none matching was found.
      • toOperand

        default <T extends Operand<?>> T toOperand​(Class<T> aType)
        Traverses the hierarchy of ArgsSyntax tree and returns the (first) operand matching the given type.
        Parameters:
        aType - The type for which to seek for.
        Returns:
        The according Operand element or null if none matching was found
      • toOperand

        <T extends Operand<?>> T toOperand​(String aAlias,
                                           Class<T> aType)
        Traverses the hierarchy of ArgsSyntax tree and returns the (first) operand matching the given alias and type.
        Parameters:
        aAlias - The alias for which to seek for.
        aType - The type for which to seek for.
        Returns:
        The according Operand element or null if none matching was found