Record Class AnnotationDescription<T extends Annotation>
java.lang.Object
java.lang.Record
io.github.kaktushose.jdac.definitions.description.AnnotationDescription<T>
- Type Parameters:
T- the annotations type- Record Components:
value- the annotations value (instance)annotations- the annotations interfaces' own annotations
- All Implemented Interfaces:
Description
public record AnnotationDescription<T extends Annotation>(T extends Annotation value, Collection<AnnotationDescription<?>> annotations)
extends Record
implements Description
A
Description that describes an annotation- Implementation Requirements:
- for the goals of JDA-Commands is sufficient that the
annotations()value is only one layer deep
-
Constructor Summary
ConstructorsConstructorDescriptionAnnotationDescription(T value, Collection<AnnotationDescription<?>> annotations) Creates an instance of aAnnotationDescriptionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()value()Returns the value of thevaluerecord component.Methods inherited from interface Description
annotation
-
Constructor Details
-
AnnotationDescription
Creates an instance of aAnnotationDescriptionrecord class.- Parameters:
value- the value for thevaluerecord componentannotations- the value for theannotationsrecord component
-
-
Method Details
-
type
-
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). -
value
-
annotations
Returns the value of theannotationsrecord component.- Specified by:
annotationsin interfaceDescription- Returns:
- the value of the
annotationsrecord component
-