Class AnnotationFileParser.RecordComponentStub
java.lang.Object
org.checkerframework.framework.stub.AnnotationFileParser.RecordComponentStub
- Enclosing class:
- AnnotationFileParser
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 Summary
-
Constructor Summary
ConstructorDescriptionRecordComponentStub
(AnnotatedTypeMirror type, AnnotationMirrorSet allAnnotations) Creates a new RecordComponentStub with the given type. -
Method Summary
Modifier and TypeMethodDescriptiongetAnnotationsForTarget
(ElementKind elementKind) Get the record component annotations that are applicable to the given element kind.boolean
Returns whether there is an accessor in a stub file.
-
Field Details
-
type
The type of the record component.
-
-
Constructor Details
-
RecordComponentStub
Creates a new RecordComponentStub with the given type.- Parameters:
type
- the type of the record componentallAnnotations
- the declaration annotations on the component
-
-
Method Details
-
getAnnotationsForTarget
Get the record component annotations that are applicable to the given element kind.- Parameters:
elementKind
- the element kind to apply to (e.g., FIELD, METHOD)- Returns:
- the set of annotations from the component that apply
-
hasAccessorInStubs
public boolean hasAccessorInStubs()Returns whether there is an accessor in a stub file.- Returns:
- true if some stub file contains an accessor for this record component
-