Class MethodSuggestionsProvider<C>

  • Type Parameters:
    C - Command sender type
    All Implemented Interfaces:
    java.util.function.BiFunction<cloud.commandframework.context.CommandContext<C>,​java.lang.String,​java.util.List<java.lang.String>>

    public final class MethodSuggestionsProvider<C>
    extends java.lang.Object
    implements java.util.function.BiFunction<cloud.commandframework.context.CommandContext<C>,​java.lang.String,​java.util.List<java.lang.String>>
    Represents a method annotated with Suggestions
    Since:
    1.3.0
    • Constructor Summary

      Constructors 
      Constructor Description
      MethodSuggestionsProvider​(@NonNull java.lang.Object instance, @NonNull java.lang.reflect.Method method)
      Create a new provider
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.lang.String> apply​(cloud.commandframework.context.CommandContext<C> context, java.lang.String s)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.BiFunction

        andThen
    • Constructor Detail

      • MethodSuggestionsProvider

        public MethodSuggestionsProvider​(@NonNull java.lang.Object instance,
                                         @NonNull java.lang.reflect.Method method)
                                  throws java.lang.Exception
        Create a new provider
        Parameters:
        instance - Instance that owns the method
        method - The annotated method
        Throws:
        java.lang.Exception - If the method lookup fails
    • Method Detail

      • apply

        public java.util.List<java.lang.String> apply​(cloud.commandframework.context.CommandContext<C> context,
                                                      java.lang.String s)
        Specified by:
        apply in interface java.util.function.BiFunction<cloud.commandframework.context.CommandContext<C>,​java.lang.String,​java.util.List<java.lang.String>>