Interface SharedNamedAnnotationScope

All Superinterfaces:
SharedAnnotationScope
All Known Subinterfaces:
SourceModelBuildingContext
All Known Implementing Classes:
SourceModelBuildingContextImpl

public interface SharedNamedAnnotationScope extends SharedAnnotationScope
AnnotationScope with the ability to resolve "named" annotations
  • Method Details

    • getNamedAnnotation

      default <X extends Annotation> AnnotationUsage<X> getNamedAnnotation(AnnotationDescriptor<X> annotationDescriptor, String matchName)
      Get a usage of the given annotation annotationDescriptor whose attributeToMatch attribute value matches the given matchName.
      Parameters:
      annotationDescriptor - The type of annotation to search
      matchName - The name to match.
      Returns:
      The matching annotation usage, or null if none matched
    • getNamedAnnotation

      default <A extends Annotation> AnnotationUsage<A> getNamedAnnotation(AnnotationDescriptor<A> annotationDescriptor, String matchName, String attributeToMatch)
      Get a usage of the given annotationDescriptor whose attributeToMatch attribute value matches the given matchName.
      Parameters:
      annotationDescriptor - The type of annotation to search
      matchName - The name to match.
      attributeToMatch - Name of the attribute to match on.
      Returns:
      The matching annotation usage, or null if none matched