public interface Provider<T>
Providers do the heavy work of reading passed in arguments and transforming them into Java objects.
| Modifier and Type | Method and Description |
|---|---|
T |
get(CommandArgs arguments,
List<? extends Annotation> modifiers)
Provide a value given the arguments.
|
List<String> |
getSuggestions(String prefix)
Get a list of suggestions for the given parameter and user arguments.
|
boolean |
isProvided()
Gets whether this provider does not actually consume values
from the argument stack and instead generates them otherwise.
|
boolean isProvided()
@Nullable T get(CommandArgs arguments, List<? extends Annotation> modifiers) throws ArgumentException, ProvisionException
arguments - The argumentsmodifiers - The modifiers on the parameterArgumentException - If there is a problem with the argumentProvisionException - If there is a problem with the providerList<String> getSuggestions(String prefix)
If no suggestions could be enumerated, an empty list should be returned.
prefix - What the user has typed so far (may be an empty string)Copyright © 2015. All Rights Reserved.