CommandLine.Model.IExtensible (picocli 4.6.3 API)

picocli

## Interface CommandLine.Model.IExtensible

- Enclosing class:
    CommandLine.Model

      public static interface CommandLine.Model.IExtensible

  Interface to allow extending the capabilities of other interface without Java 8 default methods.

  Example usage:

       // suppose we want to add a method `getInitialValueState` to `IAnnotatedElement`
       IAnnotatedElement element = getAnnotatedElement();
       if (element instanceof IExtensible) {
           InitialValueState state = ((IExtensible) element).getExtension(InitialValueState.class);
           if (state != null) {
               // ...
           }
       }

  Since:
    4.3

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `getExtension(Class<T> cls)` Returns an instance of the specified class, or `null` if this extension is not supported.

- - ### Method Detail

    - #### getExtension

          <T> T getExtension(Class<T> cls)

      Returns an instance of the specified class, or `null` if this extension is not supported.
      Parameters:
        `cls` - class of the desired extension