Class AnnotationFileParser.RecordComponentStub

Enclosing class:

public static class AnnotationFileParser.RecordComponentStub extends Object
Information about a record component: its type, and whether there was an accessor in the stubs for that component. That is, for a component "foo" was there a method named exactly "foo()" in the stubs. If so, annotations on that accessor will take precedence over annotations that would otherwise be copied from the component in the stubs to the acessor.
  • Field Details

  • Constructor Details

    • RecordComponentStub

      public RecordComponentStub(AnnotatedTypeMirror type, AnnotationMirrorSet allAnnotations)
      Creates a new RecordComponentStub with the given type.
      type - the type of the record component
      allAnnotations - the declaration annotations on the component
  • Method Details

    • getAnnotationsForTarget

      public AnnotationMirrorSet getAnnotationsForTarget(ElementKind elementKind)
      Get the record component annotations that are applicable to the given element kind.
      elementKind - the element kind to apply to (e.g., FIELD, METHOD)
      the set of annotations from the component that apply
    • hasAccessorInStubs

      public boolean hasAccessorInStubs()
      Returns whether there is an accessor in a stub file.
      true if some stub file contains an accessor for this record component