CommandLine.Model.ITypeInfo (picocli 4.6.3 API)

picocli

## Interface CommandLine.Model.ITypeInfo

- Enclosing class:
    CommandLine.Model

      public static interface CommandLine.Model.ITypeInfo

  Encapculates type information for an option or parameter to make this information available both at runtime and at compile time (when `Class` values are not available). Most of the methods in this interface (but not all!) are safe to use by annotation processors.
  Since:
    4.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<String>` | `getActualGenericTypeArguments()` Returns the names of the type arguments if this is a generic type.
    `List<CommandLine.Model.ITypeInfo>` | `getAuxiliaryTypeInfos()` Returns type information of components or elements of a `multivalue` type.
    `Class<?>[]` | `getAuxiliaryTypes()` Returns the component class of an array, or the parameter type of a generic Collection, or the parameter types of the key and the value of a generic Map.
    `String` | `getClassName()`
    `String` | `getClassSimpleName()`
    `List<String>` | `getEnumConstantNames()`
    `Class<?>` | `getType()` Returns the class that the option or parameter value should be converted to when matched on the command line.
    `boolean` | `isArray()`
    `boolean` | `isBoolean()` Returns `true` if `getType()` is `boolean` or `java.lang.Boolean`.
    `boolean` | `isCollection()`
    `boolean` | `isEnum()` Returns `true` if `getType()` is an enum.
    `boolean` | `isMap()`
    `boolean` | `isMultiValue()` Returns `true` if `getType()` is an array, map or collection.
    `boolean` | `isOptional()` Returns `true` if `getType()` is `java.util.Optional`

- - ### Method Detail

    - #### isBoolean

          boolean isBoolean()

      Returns `true` if `getType()` is `boolean` or `java.lang.Boolean`.

    - #### isMultiValue

          boolean isMultiValue()

      Returns `true` if `getType()` is an array, map or collection.

    - #### isOptional

          boolean isOptional()

      Returns `true` if `getType()` is `java.util.Optional`
      Since:
        4.6

    - #### isArray

          boolean isArray()

    - #### isCollection

          boolean isCollection()

    - #### isMap

          boolean isMap()

    - #### isEnum

          boolean isEnum()

      Returns `true` if `getType()` is an enum.

    - #### getEnumConstantNames

          List<String> getEnumConstantNames()

    - #### getClassName

          String getClassName()

    - #### getClassSimpleName

          String getClassSimpleName()

    - #### getAuxiliaryTypeInfos

          List<CommandLine.Model.ITypeInfo> getAuxiliaryTypeInfos()

      Returns type information of components or elements of a `multivalue` type.

    - #### getActualGenericTypeArguments

          List<String> getActualGenericTypeArguments()

      Returns the names of the type arguments if this is a generic type. For example, returns `["java.lang.String"]` if this type is `List<String>`.

    - #### getType

          Class<?> getType()

      Returns the class that the option or parameter value should be converted to when matched on the command line. This method is not safe for annotation processors to use.
      Returns:
        the class that the option or parameter value should be converted to

    - #### getAuxiliaryTypes

          Class<?>[] getAuxiliaryTypes()

      Returns the component class of an array, or the parameter type of a generic Collection, or the parameter types of the key and the value of a generic Map. This method is not safe for annotation processors to use.
      Returns:
        the component type or types of an array, Collection or Map type