All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.airlift.command.GroupSuggester Maven / Gradle / Ivy

Go to download

Airline is a Java annotation-based framework for parsing Git like command line structures.

The newest version!
package io.airlift.command;

import io.airlift.command.model.CommandGroupMetadata;
import io.airlift.command.model.CommandMetadata;
import io.airlift.command.model.OptionMetadata;

import javax.inject.Inject;

import static com.google.common.collect.Iterables.concat;
import static com.google.common.collect.Iterables.transform;

public class GroupSuggester
        implements Suggester
{
    @Inject
    public CommandGroupMetadata group;

    @Override
    public Iterable suggest()
    {
        return concat(
                transform(group.getCommands(), CommandMetadata.nameGetter()),
                concat(transform(group.getOptions(), OptionMetadata.optionsGetter()))
        );
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy