Class MethodArgumentParser<C,T>
java.lang.Object
org.incendo.cloud.annotations.method.AnnotatedMethodHandler<C>
org.incendo.cloud.annotations.parser.MethodArgumentParser<C,T>
- Type Parameters:
C- command sender typeT- Argument type
- All Implemented Interfaces:
ArgumentParser<C,,T> SuggestionProviderHolder<C>
public final class MethodArgumentParser<C,T>
extends AnnotatedMethodHandler<C>
implements ArgumentParser<C,T>
Represents a method annotated with
Parser-
Nested Class Summary
Nested classes/interfaces inherited from interface org.incendo.cloud.parser.ArgumentParser
ArgumentParser.FutureArgumentParser<C,T> -
Constructor Summary
ConstructorsConstructorDescriptionMethodArgumentParser(@NonNull SuggestionProvider<C> suggestionProvider, @NonNull Object instance, @NonNull Method method, @NonNull ParameterInjectorRegistry<C> injectorRegistry) Creates a new parser. -
Method Summary
Modifier and TypeMethodDescriptionparse(@NonNull CommandContext<@NonNull C> commandContext, @NonNull CommandInput commandInput) Methods inherited from class org.incendo.cloud.annotations.method.AnnotatedMethodHandler
annotationAccessor, createParameterValues, createParameterValues, createParameterValues, getInjectedValue, getParameterValue, injectorRegistry, methodHandle, parametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.incendo.cloud.parser.ArgumentParser
flatMap, flatMapSuccess, mapSuccess, parseFuture
-
Constructor Details
-
MethodArgumentParser
public MethodArgumentParser(@NonNull SuggestionProvider<C> suggestionProvider, @NonNull Object instance, @NonNull Method method, @NonNull ParameterInjectorRegistry<C> injectorRegistry) Creates a new parser.- Parameters:
suggestionProvider- suggestion providerinstance- instance that owns the methodmethod- the annotated methodinjectorRegistry- injector registry
-
-
Method Details
-
parse
public @NonNull ArgumentParseResult<@NonNull T> parse(@NonNull CommandContext<@NonNull C> commandContext, @NonNull CommandInput commandInput) - Specified by:
parsein interfaceArgumentParser<C,T>
-
suggestionProvider
- Specified by:
suggestionProviderin interfaceArgumentParser<C,T> - Specified by:
suggestionProviderin interfaceSuggestionProviderHolder<C>
-