Record Class ClassDescription
java.lang.Object
java.lang.Record
com.github.kaktushose.jda.commands.definitions.description.ClassDescription
- Record Components:
clazz
- theClass
thisDescription
describes.name
- the full name including packages of the classannotations
- aCollection
of allAnnotation
s this class is annotated withmethods
- aCollection
of all the publicmethods
of this class
- All Implemented Interfaces:
Description
public record ClassDescription(@NotNull Class<?> clazz, @NotNull String name, @NotNull Collection<Annotation> annotations, @NotNull Collection<MethodDescription> methods)
extends Record
implements Description
A
Description
that describes a class.-
Constructor Summary
ConstructorDescriptionClassDescription
(@NotNull Class<?> clazz, @NotNull String name, @NotNull Collection<Annotation> annotations, @NotNull Collection<MethodDescription> methods) Creates an instance of aClassDescription
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull Collection
<Annotation> Returns the value of theannotations
record component.@NotNull Class
<?> clazz()
Returns the value of theclazz
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 Collection
<MethodDescription> methods()
Returns the value of themethods
record component.@NotNull String
name()
Returns the value of thename
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
-
ClassDescription
public ClassDescription(@NotNull @NotNull Class<?> clazz, @NotNull @NotNull String name, @NotNull @NotNull Collection<Annotation> annotations, @NotNull @NotNull Collection<MethodDescription> methods) Creates an instance of aClassDescription
record class.- Parameters:
clazz
- the value for theclazz
record componentname
- the value for thename
record componentannotations
- the value for theannotations
record componentmethods
- the value for themethods
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)
. -
clazz
-
name
-
annotations
Returns the value of theannotations
record component.- Specified by:
annotations
in interfaceDescription
- Returns:
- the value of the
annotations
record component
-
methods
-