Add @Immutable
This annotation marks an interface as effectively immutable,
enforcing through an annotation processor that it follow these
guidelines:
- Only exposes methods and/or static final constants
- Every exposed type is an @Immutable interface or otherwise immutable class
- Every method must return a type (no void methods allowed)
- All inner classes must be @Immutable interfaces
This is in preparation of making PackageState fully immutable.
As a test case it has been marked in this change but has its
errors suppressed using @Immutable.Ignore to have the build work.
Test: atest --host ImmutabilityAnnotationProcessorUnitTests
Test: m services.core.unboosted
Change-Id: I59c615a97d5a30b83a5bcace0e2cee270ea5d1d2
12 files changed