public class DynamicType<E,T> extends java.lang.Object implements ArgumentType<E,T>
| Modifier and Type | Class and Description |
|---|---|
static interface |
DynamicType.BiParser<E,T> |
static interface |
DynamicType.SingleParser<T> |
| Constructor and Description |
|---|
DynamicType(DynamicType.BiParser<E,T> biParser) |
DynamicType(DynamicType.SingleParser<T> singleParser) |
| Modifier and Type | Method and Description |
|---|---|
void |
parseCompletions(java.util.Set<java.lang.String> completions,
ExecutionContext<E> executionContext,
StringReader stringReader)
Provide the completions of this argument.
|
T |
parseValue(ExecutionContext<E> executionContext,
StringReader stringReader)
Parses the value of the argument.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetWeightpublic DynamicType(DynamicType.SingleParser<T> singleParser)
public DynamicType(DynamicType.BiParser<E,T> biParser)
@Nonnull public T parseValue(ExecutionContext<E> executionContext, StringReader stringReader) throws ArgumentParseException, java.lang.RuntimeException
ArgumentTypeparseValue in interface ArgumentType<E,T>executionContext - The execution contextstringReader - The string readerArgumentParseException - If the value could not be parsedjava.lang.RuntimeException - If an unexpected error occurredpublic void parseCompletions(java.util.Set<java.lang.String> completions,
ExecutionContext<E> executionContext,
StringReader stringReader)
ArgumentTypeparseCompletions in interface ArgumentType<E,T>completions - The set of completionsexecutionContext - The execution contextstringReader - The string reader