Record Class MethodBuildContext

java.lang.Object
java.lang.Record
io.github.kaktushose.jdac.definitions.interactions.MethodBuildContext

@Internal public record MethodBuildContext(Validators validators, LocalizationFunction localizationFunction, I18n i18n, Interaction interaction, Set<String> permissions, ClassDescription clazz, MethodDescription method, Collection<AutoCompleteDefinition> autoCompleteDefinitions, CommandDefinition.CommandConfig globalCommandConfig) extends Record
Holds all objects needed to create an InteractionDefinition.
  • Constructor Details

    • MethodBuildContext

      public MethodBuildContext(Validators validators, LocalizationFunction localizationFunction, I18n i18n, Interaction interaction, Set<String> permissions, ClassDescription clazz, MethodDescription method, Collection<AutoCompleteDefinition> autoCompleteDefinitions, CommandDefinition.CommandConfig globalCommandConfig)
      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
      i18n - the value for the i18n record component
      interaction - the value for the interaction record component
      permissions - the value for the permissions 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
      globalCommandConfig - the value for the globalCommandConfig 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

      public Validators validators()
      Returns the value of the validators record component.
      Returns:
      the value of the validators record component
    • localizationFunction

      public LocalizationFunction localizationFunction()
      Returns the value of the localizationFunction record component.
      Returns:
      the value of the localizationFunction record component
    • i18n

      public I18n i18n()
      Returns the value of the i18n record component.
      Returns:
      the value of the i18n record component
    • interaction

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

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

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

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

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

      public CommandDefinition.CommandConfig globalCommandConfig()
      Returns the value of the globalCommandConfig record component.
      Returns:
      the value of the globalCommandConfig record component