Record Class MethodDescription
java.lang.Object
java.lang.Record
com.github.kaktushose.jda.commands.definitions.description.MethodDescription
- Record Components:
declaringClass
- the declaringClass
of this methodreturnType
- theClass
this method returnsname
- the name of the methodparameters
- aSequencedCollection
of theParameterDescription
s of this methodannotations
- aCollection
of allAnnotation
s this method is annotated withinvoker
- the correspondingInvoker
, used to invoke this method
- All Implemented Interfaces:
Description
public record MethodDescription(@NotNull Class<?> declaringClass, @NotNull Class<?> returnType, @NotNull String name, @NotNull SequencedCollection<ParameterDescription> parameters, @NotNull Collection<Annotation> annotations, @NotNull Invoker invoker)
extends Record
implements Description
A
Description
that describes a method.-
Constructor Summary
ConstructorDescriptionMethodDescription
(@NotNull Class<?> declaringClass, @NotNull Class<?> returnType, @NotNull String name, @NotNull SequencedCollection<ParameterDescription> parameters, @NotNull Collection<Annotation> annotations, @NotNull Invoker invoker) Creates an instance of aMethodDescription
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Collection
<Annotation> Returns the value of theannotations
record component.@NotNull Class
<?> Returns the value of thedeclaringClass
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull Invoker
invoker()
Returns the value of theinvoker
record component.@NotNull String
name()
Returns the value of thename
record component.@NotNull SequencedCollection
<ParameterDescription> Returns the value of theparameters
record component.@NotNull Class
<?> Returns the value of thereturnType
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.github.kaktushose.jda.commands.definitions.description.Description
annotation
-
Constructor Details
-
MethodDescription
public MethodDescription(@NotNull @NotNull Class<?> declaringClass, @NotNull @NotNull Class<?> returnType, @NotNull @NotNull String name, @NotNull @NotNull SequencedCollection<ParameterDescription> parameters, @NotNull @NotNull Collection<Annotation> annotations, @NotNull @NotNull Invoker invoker) Creates an instance of aMethodDescription
record class.- Parameters:
declaringClass
- the value for thedeclaringClass
record componentreturnType
- the value for thereturnType
record componentname
- the value for thename
record componentparameters
- the value for theparameters
record componentannotations
- the value for theannotations
record componentinvoker
- the value for theinvoker
record 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)
. -
declaringClass
Returns the value of thedeclaringClass
record component.- Returns:
- the value of the
declaringClass
record component
-
returnType
Returns the value of thereturnType
record component.- Returns:
- the value of the
returnType
record component
-
name
-
parameters
Returns the value of theparameters
record component.- Returns:
- the value of the
parameters
record component
-
annotations
Returns the value of theannotations
record component.- Specified by:
annotations
in interfaceDescription
- Returns:
- the value of the
annotations
record component
-
invoker
-