Record Class JavaAnnotationOccurrence
java.lang.Object
java.lang.Record
dev.archunitjava.model.JavaAnnotationOccurrence
- All Implemented Interfaces:
Comparable<JavaAnnotationOccurrence>
public record JavaAnnotationOccurrence(AnnotationVisibility visibility, AnnotationSite site, JavaAnnotation annotation)
extends Record
implements Comparable<JavaAnnotationOccurrence>
One annotation and its exact visibility and class-file site.
-
Constructor Summary
ConstructorsConstructorDescriptionJavaAnnotationOccurrence(AnnotationVisibility visibility, AnnotationSite site, JavaAnnotation annotation) Creates an instance of aJavaAnnotationOccurrencerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationrecord component.intfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.site()Returns the value of thesiterecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevisibilityrecord component.
-
Constructor Details
-
JavaAnnotationOccurrence
public JavaAnnotationOccurrence(AnnotationVisibility visibility, AnnotationSite site, JavaAnnotation annotation) Creates an instance of aJavaAnnotationOccurrencerecord class.- Parameters:
visibility- the value for thevisibilityrecord componentsite- the value for thesiterecord componentannotation- the value for theannotationrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<JavaAnnotationOccurrence>
-
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). -
visibility
Returns the value of thevisibilityrecord component.- Returns:
- the value of the
visibilityrecord component
-
site
Returns the value of thesiterecord component.- Returns:
- the value of the
siterecord component
-
annotation
Returns the value of theannotationrecord component.- Returns:
- the value of the
annotationrecord component
-