Record Class AnnotationRuleSpec
java.lang.Object
java.lang.Record
dev.archunitjava.rules.AnnotationRuleSpec
public record AnnotationRuleSpec(AnnotationQuery query, AnnotationRuleMode mode, List<AnnotationValueCondition> valueConditions, UnknownAnnotationPolicy unknownAnnotations)
extends Record
Immutable annotation relationship, mood, typed values, and traversal-gap policy.
-
Constructor Summary
ConstructorsConstructorDescriptionAnnotationRuleSpec(AnnotationQuery query, AnnotationRuleMode mode, List<AnnotationValueCondition> valueConditions, UnknownAnnotationPolicy unknownAnnotations) Creates an instance of aAnnotationRuleSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static AnnotationRuleSpecforbid(AnnotationQuery query) final inthashCode()Returns a hash code value for this object.mode()Returns the value of themoderecord component.query()Returns the value of thequeryrecord component.static AnnotationRuleSpecrequire(AnnotationQuery query) final StringtoString()Returns a string representation of this record class.Returns the value of theunknownAnnotationsrecord component.Returns the value of thevalueConditionsrecord component.withValueCondition(AnnotationValueCondition condition)
-
Constructor Details
-
AnnotationRuleSpec
public AnnotationRuleSpec(AnnotationQuery query, AnnotationRuleMode mode, List<AnnotationValueCondition> valueConditions, UnknownAnnotationPolicy unknownAnnotations) Creates an instance of aAnnotationRuleSpecrecord class.- Parameters:
query- the value for thequeryrecord componentmode- the value for themoderecord componentvalueConditions- the value for thevalueConditionsrecord componentunknownAnnotations- the value for theunknownAnnotationsrecord component
-
-
Method Details
-
require
-
forbid
-
withValueCondition
-
withUnknownAnnotations
-
semanticKey
-
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). -
query
Returns the value of thequeryrecord component.- Returns:
- the value of the
queryrecord component
-
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
valueConditions
Returns the value of thevalueConditionsrecord component.- Returns:
- the value of the
valueConditionsrecord component
-
unknownAnnotations
Returns the value of theunknownAnnotationsrecord component.- Returns:
- the value of the
unknownAnnotationsrecord component
-