Skip to content

Support eea for @Owning / @NotOwning #2258

Description

@stephan-herrmann

Follow-up from #1716: it should be possible to externally add libraries with @Owning / @NotOwning in suitable locations.

I will try to blend this into the existing support for .eea files.

eea for null analysis uses this encoding:

  • 0 = @Nullable
  • 1 = @NonNull

Without modifying the general format, we still have the digits 2-9 for encoding more annotations. While there is no intuitive mapping like 0/1, I think using 8/9 is a pragmatically valid option, that still leaves us with the option to use 2 for another null related annotation etc. (Should we ever run out of digits, we can still change the format to let digits start a multi char encoding etc. - but not for now).

Technically we need to check if the existing integration via TypeAnnotationWalker can suitably "simulate" owning annotations in declaration positions. Let's see whether having @Owning specify TYPE_USE as one of its targets works for or against this strategy.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions