Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a597df86 authored by Winson Chiu's avatar Winson Chiu
Browse files

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
parent 44c0ac96
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment