Record Class AutoCompleteDefinition
java.lang.Object
java.lang.Record
io.github.kaktushose.jdac.definitions.interactions.AutoCompleteDefinition
- Record Components:
classDescription- theClassDescriptionof the declaring class of themethodDescription()methodDescription- theMethodDescriptionof the method this definition is bound torules- the rules this autocomplete handler can handle
- All Implemented Interfaces:
Definition, Invokable, InteractionDefinition
public record AutoCompleteDefinition(ClassDescription classDescription, MethodDescription methodDescription, Set<AutoCompleteDefinition.AutoCompleteRule> rules)
extends Record
implements InteractionDefinition
Representation of an auto complete handler.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresentation of an auto complete rule.Nested classes/interfaces inherited from interface InteractionDefinition
InteractionDefinition.ReplyConfig -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionAutoCompleteDefinition(ClassDescription classDescription, MethodDescription methodDescription, Set<AutoCompleteDefinition.AutoCompleteRule> rules) Creates an instance of aAutoCompleteDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic AutoCompleteDefinitionbuild(ClassDescription clazz, MethodDescription method) Builds a newAutoCompleteDefinitionfrom the given class and method description.Returns the value of theclassDescriptionrecord component.The human-readable name of this definition.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themethodDescriptionrecord component.A possibly-emptyCollectionof permissions for this interaction.rules()Returns the value of therulesrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from interface InteractionDefinition
definitionId
-
Constructor Details
-
AutoCompleteDefinition
public AutoCompleteDefinition(ClassDescription classDescription, MethodDescription methodDescription, Set<AutoCompleteDefinition.AutoCompleteRule> rules) Creates an instance of aAutoCompleteDefinitionrecord class.- Parameters:
classDescription- the value for theclassDescriptionrecord componentmethodDescription- the value for themethodDescriptionrecord componentrules- the value for therulesrecord component
-
-
Method Details
-
build
Builds a newAutoCompleteDefinitionfrom the given class and method description.- Parameters:
clazz- the correspondingClassDescriptionmethod- the correspondingMethodDescription- Returns:
- the
AutoCompleteDefinition
-
displayName
Description copied from interface:DefinitionThe human-readable name of this definition.- Specified by:
displayNamein interfaceDefinition
-
permissions
Description copied from interface:InteractionDefinitionA possibly-emptyCollectionof permissions for this interaction.- Specified by:
permissionsin interfaceInteractionDefinition
-
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). -
classDescription
Returns the value of theclassDescriptionrecord component.- Specified by:
classDescriptionin interfaceInvokable- Returns:
- the value of the
classDescriptionrecord component
-
methodDescription
Returns the value of themethodDescriptionrecord component.- Specified by:
methodDescriptionin interfaceInvokable- Returns:
- the value of the
methodDescriptionrecord component
-
rules
-