-
Notifications
You must be signed in to change notification settings - Fork 326
Open
Labels
jspecifyRelated to support for jspecify standard (see jspecify.dev)Related to support for jspecify standard (see jspecify.dev)
Description
Follow up to #1407. Now that library models support nested annotations within method parameter / return types, we should parse such annotations from jspecify/jdk and generate astubx for them. Here is an example method where this support should be useful; we should be able to encode the @NonNull annotation within Class<@NonNull E> type. (See also #1409)
Rough steps (and should be done in multiple PRs):
- Update
jdk-javac-pluginto parse the nested annotations and generate corresponding JSON. Basically the JSON should encode the information in aNestedAnnotationInfoobject for each nested annotation (annotation type and path through the type to get to its position). For each parameter position and for the return type, there could be multiple such annotations. InLibraryModelsthis is encoded as anImmutableSetMultimap<Integer, NestedAnnotationInfo>, where-1represents the return type. - Update
com.uber.nullaway.jdkannotations.AstubxGeneratorto generateastubxfrom the JSON of step 1. - Update NullAway's
astubxparser to parse the data and include it in its external library models, and check support is working with an integration test.
Metadata
Metadata
Assignees
Labels
jspecifyRelated to support for jspecify standard (see jspecify.dev)Related to support for jspecify standard (see jspecify.dev)