-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make TargetRegistrationEnvironment better encapsulated
- All fields are now private. - `targets` and `macros` are renamed `targetMap` and `macroMap` for clarity/symmetry with accessors. - New accessors for private fields, either returning the whole map or just a contains boolean, as needed. (The accessors are protected rather than public because we're using inheritance rather than composition in `Package.Builder`.) - Drive-by: made `nameIsWithinMacroNamespace()` static. - `addRuleInternal()` is made private. Its override in the builder for precondition enforcement is replaced by overrides of `addRule()` and `addRuleUnchecked()`. - Added `unwrapSnapshottableBiMap()`, which seems like a bad abstraction but is still better than allowing direct field access. Work toward #19922. PiperOrigin-RevId: 678408757 Change-Id: Ic233754e7b0e6866d1211ccfe4c362046c40321e
- Loading branch information
1 parent
f8b322a
commit b64d074
Showing
2 changed files
with
105 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.