code: @SuppressWarnings( "unchecked" )
      public static <T extends Option> T[] filter( final Class<T> optionType,
                                                   final Option... options )
      {
          final List<T> filtered = new ArrayList<T>();
          for( Option option : expand( options ) )
          {
              if( optionType.isAssignableFrom( option.getClass() ) )
              {
                  filtered.add( (T) option );
              }
          }
          final T[] result = (T[]) Array.newInstance( optionType, filtered.size() );
          return filtered.toArray( result );
      }
docs: Filters the provided options by class returning an array of those option that are instance of the provided class.
  Before filtering the options are expanded {@link #expand(Option[])}.
  
  @param optionType class of the desired options
  @param options    options to be filtered (can be null or empty array)
  @param <T>        type of desired options
  
  @return array of desired option type (never null). In case that the array of filtered options is null, empty or
  there is no option that matches the desired type an empty array is returned