Record Class InvocationContext.Data<T extends GenericInteractionCreateEvent>
java.lang.Object
java.lang.Record
io.github.kaktushose.jdac.dispatching.context.InvocationContext.Data<T>
- Type Parameters:
T- The used type ofGenericInteractionCreateEvent- Record Components:
event- the underlying jda eventkeyValueStore- theKeyValueStorebelonging to this interaction over its whole lifetimedefinition- theInteractionDefinitiondefining this interaction (referring to the user defined method)replyConfig- theInteractionDefinition.ReplyConfigto userawArguments- the arguments used to call the final user defined method viaInvokable.invoke(java.lang.Object, io.github.kaktushose.jdac.dispatching.context.InvocationContext)
- Enclosing class:
InvocationContext<T extends GenericInteractionCreateEvent>
public static record InvocationContext.Data<T extends GenericInteractionCreateEvent>(T extends GenericInteractionCreateEvent event, KeyValueStore keyValueStore, InteractionDefinition definition, InteractionDefinition.ReplyConfig replyConfig, SequencedCollection<@Nullable Object> rawArguments)
extends Record
An object holding data exposed to the user that is crucial for invoking the user defined method.
-
Constructor Summary
ConstructorsConstructorDescriptionData(T event, KeyValueStore keyValueStore, InteractionDefinition definition, InteractionDefinition.ReplyConfig replyConfig, SequencedCollection<@Nullable Object> rawArguments) Creates an instance of aDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedefinitionrecord component.final booleanIndicates whether some other object is "equal to" this one.event()Returns the value of theeventrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thekeyValueStorerecord component.SequencedCollection<@Nullable Object> Returns the value of therawArgumentsrecord component.Returns the value of thereplyConfigrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Data
public Data(T event, KeyValueStore keyValueStore, InteractionDefinition definition, InteractionDefinition.ReplyConfig replyConfig, SequencedCollection<@Nullable Object> rawArguments) Creates an instance of aDatarecord class.- Parameters:
event- the value for theeventrecord componentkeyValueStore- the value for thekeyValueStorerecord componentdefinition- the value for thedefinitionrecord componentreplyConfig- the value for thereplyConfigrecord componentrawArguments- the value for therawArgumentsrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
event
-
keyValueStore
Returns the value of thekeyValueStorerecord component.- Returns:
- the value of the
keyValueStorerecord component
-
definition
Returns the value of thedefinitionrecord component.- Returns:
- the value of the
definitionrecord component
-
replyConfig
Returns the value of thereplyConfigrecord component.- Returns:
- the value of the
replyConfigrecord component
-
rawArguments
Returns the value of therawArgumentsrecord component.- Returns:
- the value of the
rawArgumentsrecord component
-