Package org.hibernate.models.spi
Interface SharedNamedAnnotationScope
- All Superinterfaces:
SharedAnnotationScope
- All Known Subinterfaces:
SourceModelBuildingContext
- All Known Implementing Classes:
SourceModelBuildingContextImpl
AnnotationScope with the ability to resolve "named" annotations
-
Method Summary
Modifier and TypeMethodDescriptiondefault <A extends Annotation>
AnnotationUsage<A>getNamedAnnotation(AnnotationDescriptor<A> annotationDescriptor, String matchName, String attributeToMatch) Get a usage of the givenannotationDescriptorwhoseattributeToMatchattribute value matches the givenmatchName.default <X extends Annotation>
AnnotationUsage<X>getNamedAnnotation(AnnotationDescriptor<X> annotationDescriptor, String matchName) Get a usage of the given annotationannotationDescriptorwhoseattributeToMatchattribute value matches the givenmatchName.Methods inherited from interface org.hibernate.models.spi.SharedAnnotationScope
forEachAnnotationUsage, forEachAnnotationUsage, getAllAnnotationUsages, getAllAnnotationUsages
-
Method Details
-
getNamedAnnotation
default <X extends Annotation> AnnotationUsage<X> getNamedAnnotation(AnnotationDescriptor<X> annotationDescriptor, String matchName) Get a usage of the given annotationannotationDescriptorwhoseattributeToMatchattribute value matches the givenmatchName.- Parameters:
annotationDescriptor- The type of annotation to searchmatchName- The name to match.- Returns:
- The matching annotation usage, or
nullif none matched
-
getNamedAnnotation
default <A extends Annotation> AnnotationUsage<A> getNamedAnnotation(AnnotationDescriptor<A> annotationDescriptor, String matchName, String attributeToMatch) Get a usage of the givenannotationDescriptorwhoseattributeToMatchattribute value matches the givenmatchName.- Parameters:
annotationDescriptor- The type of annotation to searchmatchName- The name to match.attributeToMatch- Name of the attribute to match on.- Returns:
- The matching annotation usage, or
nullif none matched
-