Record Class MethodBuildContext

java.lang.Object
java.lang.Record
com.github.kaktushose.jda.commands.definitions.interactions.MethodBuildContext

@Internal public record MethodBuildContext(@NotNull com.github.kaktushose.jda.commands.dispatching.validation.internal.Validators validators, @NotNull LocalizationFunction localizationFunction, @NotNull Interaction interaction, @NotNull Set<String> permissions, @Nullable SlashCommandDefinition.CooldownDefinition cooldownDefinition, @NotNull ClassDescription clazz, @NotNull MethodDescription method, @NotNull Collection<AutoCompleteDefinition> autoCompleteDefinitions) extends Record
Holds all objects needed to create an InteractionDefinition.
  • Constructor Details

    • MethodBuildContext

      public MethodBuildContext(@NotNull @NotNull com.github.kaktushose.jda.commands.dispatching.validation.internal.Validators validators, @NotNull @NotNull LocalizationFunction localizationFunction, @NotNull @NotNull Interaction interaction, @NotNull @NotNull Set<String> permissions, @Nullable @Nullable SlashCommandDefinition.CooldownDefinition cooldownDefinition, @NotNull @NotNull ClassDescription clazz, @NotNull @NotNull MethodDescription method, @NotNull @NotNull Collection<AutoCompleteDefinition> autoCompleteDefinitions)
      Creates an instance of a MethodBuildContext record class.
      Parameters:
      validators - the value for the validators record component
      localizationFunction - the value for the localizationFunction record component
      interaction - the value for the interaction record component
      permissions - the value for the permissions record component
      cooldownDefinition - the value for the cooldownDefinition record component
      clazz - the value for the clazz record component
      method - the value for the method record component
      autoCompleteDefinitions - the value for the autoCompleteDefinitions record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • validators

      @NotNull public @NotNull com.github.kaktushose.jda.commands.dispatching.validation.internal.Validators validators()
      Returns the value of the validators record component.
      Returns:
      the value of the validators record component
    • localizationFunction

      @NotNull public @NotNull LocalizationFunction localizationFunction()
      Returns the value of the localizationFunction record component.
      Returns:
      the value of the localizationFunction record component
    • interaction

      @NotNull public @NotNull Interaction interaction()
      Returns the value of the interaction record component.
      Returns:
      the value of the interaction record component
    • permissions

      @NotNull public @NotNull Set<String> permissions()
      Returns the value of the permissions record component.
      Returns:
      the value of the permissions record component
    • cooldownDefinition

      @Nullable public @Nullable SlashCommandDefinition.CooldownDefinition cooldownDefinition()
      Returns the value of the cooldownDefinition record component.
      Returns:
      the value of the cooldownDefinition record component
    • clazz

      @NotNull public @NotNull ClassDescription clazz()
      Returns the value of the clazz record component.
      Returns:
      the value of the clazz record component
    • method

      @NotNull public @NotNull MethodDescription method()
      Returns the value of the method record component.
      Returns:
      the value of the method record component
    • autoCompleteDefinitions

      @NotNull public @NotNull Collection<AutoCompleteDefinition> autoCompleteDefinitions()
      Returns the value of the autoCompleteDefinitions record component.
      Returns:
      the value of the autoCompleteDefinitions record component