インターフェース CommandOption

すべての既知の実装クラス:
CommandOption.DefaultCommandOption

public interface CommandOption
コマンドのオプションを表すインターフェース。
  • メソッドの詳細

    • getLongNames

      StringSE[] getLongNames()
      オプションの長い名前を取得します。
      戻り値:
      オプションの長い名前
    • getLongNamesModified

      StringSE[] getLongNamesModified()
      オプションの変更された長い名前を取得します。オプション名修飾子が元の名前に関する情報を保持するために使用された場合は、コマンド登録内で設定します。
      戻り値:
      オプションの長い名前を変更しました
    • getShortNames

      CharacterSE[] getShortNames()
      オプションの短い名前を取得します。
      戻り値:
      オプションの短い名前
    • getDescription

      StringSE getDescription()
      オプションの説明を取得します。
      戻り値:
      オプションの説明
    • getType

      org.springframework.core.ResolvableType getType()
      オプションの ResolvableType を取得します。
      戻り値:
      オプションの種類
    • isRequired

      boolean isRequired()
      オプションが必要な場合にフラグを取得します。
      戻り値:
      必要なフラグ
    • getDefaultValue

      StringSE getDefaultValue()
      オプションのデフォルト値を取得します。
      戻り値:
      デフォルト値
    • getPosition

      int getPosition()
      位置値を取得します。
      戻り値:
      位置値
    • getArityMin

      int getArityMin()
      最小アリティを取得します。
      戻り値:
      最小アリティ
    • getArityMax

      int getArityMax()
      最大アリティを取得します。
      戻り値:
      最大アリティ
    • getLabel

      StringSE getLabel()
      ラベルを取得します。
      戻り値:
      ラベル
    • getCompletion

      CompletionResolver getCompletion()
      補完関数を取得します。
      戻り値:
      補完機能
    • of

      static CommandOption of(StringSE[] longNames, CharacterSE[] shortNames, StringSE description)
      デフォルトの CommandOption のインスタンスを取得します。
      パラメーター:
      longNames - 長い名前
      shortNames - 短い名前
      description - 説明
      戻り値:
      デフォルトのコマンドオプション
    • of

      static CommandOption of(StringSE[] longNames, CharacterSE[] shortNames, StringSE description, org.springframework.core.ResolvableType type)
      デフォルトの CommandOption のインスタンスを取得します。
      パラメーター:
      longNames - 長い名前
      shortNames - 短い名前
      description - 説明
      type - 型
      戻り値:
      デフォルトのコマンドオプション
    • of

      static CommandOption of(StringSE[] longNames, StringSE[] longNamesModified, CharacterSE[] shortNames, StringSE description, org.springframework.core.ResolvableType type, boolean required, StringSE defaultValue, IntegerSE position, IntegerSE arityMin, IntegerSE arityMax, StringSE label, CompletionResolver completion)
      デフォルトの CommandOption のインスタンスを取得します。
      パラメーター:
      longNames - 長い名前
      longNamesModified - 変更された長い名前
      shortNames - 短い名前
      description - 説明
      type - 型
      required - 必要なフラグ
      defaultValue - デフォルト値
      position - 位置値
      arityMin - 最小アリティ
      arityMax - 最大アリティ
      label - ラベル
      completion - 完成
      戻り値:
      デフォルトのコマンドオプション