summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorAshley Rose <ashleyrose@google.com>2019-03-08 17:23:38 -0500
committerAshley Rose <ashleyrose@google.com>2019-03-08 18:27:51 -0500
commitfdb5af22aa43056de570526799ddf28101037d55 (patch)
tree487531bfc81d0e98da77087d1d24fe008d7df24e /tools/aapt2/java/JavaClassGenerator_test.cpp
parenta091cc2d8b3ac4caae4f5400174927753d59477e (diff)
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
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions