Skip to content
Commit fdb5af22 authored by Ember Rose's avatar Ember Rose
Browse files

InspectionCompanions as nested classes

+ Generate inspection companions as MyClass$InspectionCompanion instead
  of MyClass$$InspectionCompanion. This allows the discovery of custom
  inspection companions written as nested classes.
+ Rename GeneratedInspectionCompanionProvider to
  StaticInspectionCompanionProvider to more clearly articulate how it
  function in the new world.
+ StaticInspectionCompanionProvider now explicitly checks if a class it
  discovered implements InspectionCompanion, and returns null instead of
  throwing a ClassCastException.
+ The annotation processor checks for the existence of a nested class
  named InspectionCompanion, and fails the build if a class has both a
  custom InspectionCompanion and @InspectableProperty annotations.

Test: atest --host view-inspector-annotation-processor-test
Bug: 126913705
Change-Id: Ic0d2100ec22420e36f9db44e56c66fe9146eeb0c
parent a091cc2d
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