Record Class AnnotationMessageTypeResolver.AnnotationSpecification
java.lang.Object
java.lang.Record
org.axonframework.messaging.core.annotation.AnnotationMessageTypeResolver.AnnotationSpecification
- Record Components:
nameAnnotation- the annotation class to search for whenAnnotationMessageTypeResolver.resolve(Class)is invoked for thenameAttributespecificallynameAttribute- the attribute for theMessageType.name(), that should be present on the givenannotationversionAnnotation- the annotation class to search for whenAnnotationMessageTypeResolver.resolve(Class)is invoked for theversionAttributespecificallyversionAttribute- the attribute for theMessageType.version(), that should be present on the givenannotationnamespaceAnnotation- the annotation class to search for whenAnnotationMessageTypeResolver.resolve(Class)is invoked for thenamespaceAttributespecificallynamespaceAttribute- the attribute for theQualifiedName.namespace()field of theQualifiedNameset in the resolvedMessageType, or just thenameAttribute()ifnull
- Enclosing class:
AnnotationMessageTypeResolver
public static record AnnotationMessageTypeResolver.AnnotationSpecification(Class<? extends Annotation> nameAnnotation, String nameAttribute, Class<? extends Annotation> versionAnnotation, String versionAttribute, Class<? extends Annotation> namespaceAnnotation, @Nullable String namespaceAttribute)
extends Record
An annotation specification unique to the
AnnotationMessageTypeResolver.-
Field Summary
FieldsModifier and TypeFieldDescriptionThe defaultAnnotationMessageTypeResolver.AnnotationSpecificationthat looks for theMessageannotation for thenameAttribute()andversionAttribute(), and theNamespaceannotation for thenamespaceAttribute(). -
Constructor Summary
ConstructorsConstructorDescriptionAnnotationSpecification(Class<? extends Annotation> nameAnnotation, String nameAttribute, Class<? extends Annotation> versionAnnotation, String versionAttribute, Class<? extends Annotation> namespaceAnnotation, @Nullable String namespaceAttribute) Creates an instance of aAnnotationSpecificationrecord class.AnnotationSpecification(Class<? extends Annotation> annotation, String nameAttribute, String versionAttribute, @Nullable String namespaceAttribute) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Class<? extends Annotation> Returns the value of thenameAnnotationrecord component.Returns the value of thenameAttributerecord component.Class<? extends Annotation> Returns the value of thenamespaceAnnotationrecord component.@Nullable StringReturns the value of thenamespaceAttributerecord component.final StringtoString()Returns a string representation of this record class.Class<? extends Annotation> Returns the value of theversionAnnotationrecord component.Returns the value of theversionAttributerecord component.
-
Field Details
-
DEFAULT
The defaultAnnotationMessageTypeResolver.AnnotationSpecificationthat looks for theMessageannotation for thenameAttribute()andversionAttribute(), and theNamespaceannotation for thenamespaceAttribute().
-
-
Constructor Details
-
AnnotationSpecification
@Deprecated(since="5.1.0") public AnnotationSpecification(Class<? extends Annotation> annotation, String nameAttribute, String versionAttribute, @Nullable String namespaceAttribute) Deprecated.in favor of theAnnotationSpecification(Class, String, Class, String, Class, String)constructor that allows annotation configuration per resolvable attributeAn annotation specification unique to theAnnotationMessageTypeResolver.- Parameters:
annotation- the annotation class to search for whenAnnotationMessageTypeResolver.resolve(Class)is invokednameAttribute- the attribute for theMessageType.name(), that should be present on the givenannotationversionAttribute- the attribute for theMessageType.version(), that should be present on the givenannotationnamespaceAttribute- the attribute for theQualifiedName.namespace()field of theQualifiedNameset in the resolvedMessageType, or just thenameAttribute()ifnull
-
AnnotationSpecification
public AnnotationSpecification(Class<? extends Annotation> nameAnnotation, String nameAttribute, Class<? extends Annotation> versionAnnotation, String versionAttribute, Class<? extends Annotation> namespaceAnnotation, @Nullable String namespaceAttribute) Creates an instance of aAnnotationSpecificationrecord class.- Parameters:
nameAnnotation- the value for thenameAnnotationrecord componentnameAttribute- the value for thenameAttributerecord componentversionAnnotation- the value for theversionAnnotationrecord componentversionAttribute- the value for theversionAttributerecord componentnamespaceAnnotation- the value for thenamespaceAnnotationrecord componentnamespaceAttribute- the value for thenamespaceAttributerecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
nameAnnotation
Returns the value of thenameAnnotationrecord component.- Returns:
- the value of the
nameAnnotationrecord component
-
nameAttribute
Returns the value of thenameAttributerecord component.- Returns:
- the value of the
nameAttributerecord component
-
versionAnnotation
Returns the value of theversionAnnotationrecord component.- Returns:
- the value of the
versionAnnotationrecord component
-
versionAttribute
Returns the value of theversionAttributerecord component.- Returns:
- the value of the
versionAttributerecord component
-
namespaceAnnotation
Returns the value of thenamespaceAnnotationrecord component.- Returns:
- the value of the
namespaceAnnotationrecord component
-
namespaceAttribute
Returns the value of thenamespaceAttributerecord component.- Returns:
- the value of the
namespaceAttributerecord component
-
AnnotationSpecification(Class, String, Class, String, Class, String)constructor that allows annotation configuration per resolvable attribute