From 4fb8af50256a20fa03f68ff28d084685d7b29fea Mon Sep 17 00:00:00 2001 From: John Wu Date: Tue, 15 Oct 2024 08:42:06 +0000 Subject: [Ravenwood] Move hoststubgen into f/b/ravenwood Flag: EXEMPT host test change only Bug: 292141694 Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh Change-Id: If20a35043dbff7ef3c432d8d7d688ab212d448bd --- ravenwood/tools/hoststubgen/.gitignore | 4 + ravenwood/tools/hoststubgen/Android.bp | 171 + ravenwood/tools/hoststubgen/README.md | 78 + .../annotation/HostSideTestClassLoadHook.java | 38 + .../hosttest/annotation/HostSideTestIgnore.java | 34 + .../hosttest/annotation/HostSideTestKeep.java | 43 + .../hosttest/annotation/HostSideTestRedirect.java | 32 + .../annotation/HostSideTestRedirectionClass.java | 35 + .../hosttest/annotation/HostSideTestRemove.java | 39 + .../HostSideTestStaticInitializerKeep.java | 36 + .../annotation/HostSideTestSubstitute.java | 40 + .../hosttest/annotation/HostSideTestThrow.java | 36 + .../annotation/HostSideTestWholeClassKeep.java | 34 + .../annotation/tests/HostSideTestSuppress.java | 31 + ravenwood/tools/hoststubgen/common.sh | 116 + .../hoststubgen/framework-policy-override.txt | 105 + .../hosthelper/HostStubGenProcessedAsIgnore.java | 32 + .../hosthelper/HostStubGenProcessedAsKeep.java | 35 + .../HostStubGenProcessedAsSubstitute.java | 36 + .../hosthelper/HostStubGenProcessedAsThrow.java | 32 + .../hoststubgen/hosthelper/HostTestException.java | 26 + .../hoststubgen/hosthelper/HostTestSuite.java | 102 + .../hoststubgen/hosthelper/HostTestUtils.java | 191 + .../hoststubgen/hoststubgen-standard-options.txt | 43 + ravenwood/tools/hoststubgen/invoketest/Android.bp | 20 + .../invoketest/hoststubgen-invoke-test.sh | 228 + ravenwood/tools/hoststubgen/jarjar-rules.txt | 2 + ravenwood/tools/hoststubgen/scripts/Android.bp | 20 + ...ild-framework-hostside-jars-without-genrules.sh | 76 + ravenwood/tools/hoststubgen/scripts/dump-jar | 159 + .../src/com/android/hoststubgen/Exceptions.kt | 72 + .../src/com/android/hoststubgen/HostStubGen.kt | 424 ++ .../com/android/hoststubgen/HostStubGenErrors.kt | 24 + .../com/android/hoststubgen/HostStubGenLogger.kt | 320 ++ .../src/com/android/hoststubgen/HostStubGenMain.kt | 66 + .../com/android/hoststubgen/HostStubGenOptions.kt | 384 ++ .../com/android/hoststubgen/HostStubGenStats.kt | 92 + .../src/com/android/hoststubgen/Utils.kt | 98 + .../src/com/android/hoststubgen/asm/AsmUtils.kt | 478 ++ .../src/com/android/hoststubgen/asm/ClassNodes.kt | 273 ++ .../com/android/hoststubgen/dumper/ApiDumper.kt | 202 + .../hoststubgen/filters/AndroidHeuristicsFilter.kt | 87 + .../hoststubgen/filters/AnnotationBasedFilter.kt | 366 ++ .../filters/ClassWidePolicyPropagatingFilter.kt | 93 + .../android/hoststubgen/filters/ConstantFilter.kt | 66 + .../filters/DefaultHookInjectingFilter.kt | 53 + .../hoststubgen/filters/DelegatingFilter.kt | 109 + .../android/hoststubgen/filters/FilterPolicy.kt | 134 + .../hoststubgen/filters/FilterPolicyWithReason.kt | 47 + .../android/hoststubgen/filters/FilterRemapper.kt | 41 + .../hoststubgen/filters/ImplicitOutputFilter.kt | 164 + .../hoststubgen/filters/InMemoryOutputFilter.kt | 140 + .../hoststubgen/filters/KeepNativeFilter.kt | 43 + .../android/hoststubgen/filters/OutputFilter.kt | 119 + .../android/hoststubgen/filters/PackageFilter.kt | 61 + .../hoststubgen/filters/SanitizationFilter.kt | 57 + .../android/hoststubgen/filters/SubclassFilter.kt | 76 + .../filters/TextFileFilterPolicyParser.kt | 376 ++ .../filters/TextFilePolicyMethodReplaceFilter.kt | 59 + .../filters/TextFilePolicyRemapperFilter.kt | 50 + .../com/android/hoststubgen/utils/ClassFilter.kt | 165 + .../src/com/android/hoststubgen/utils/Trie.kt | 58 + .../android/hoststubgen/visitors/BaseAdapter.kt | 275 ++ .../visitors/BodyReplacingMethodVisitor.kt | 324 ++ .../src/com/android/hoststubgen/visitors/Helper.kt | 68 + .../hoststubgen/visitors/ImplGeneratingAdapter.kt | 427 ++ .../visitors/PackageRedirectRemapper.kt | 94 + .../hoststubgen/test-tiny-framework/Android.bp | 166 + .../test-tiny-framework/AndroidTest-host.xml | 29 + .../hoststubgen/test-tiny-framework/README.md | 21 + .../annotation-allowed-classes-tiny-framework.txt | 29 + .../test-tiny-framework/diff-and-update-golden.sh | 134 + ...1-hoststubgen-test-tiny-framework-orig-dump.txt | 3718 +++++++++++++++ ...3-hoststubgen-test-tiny-framework-host-dump.txt | 3757 +++++++++++++++ ...ststubgen-test-tiny-framework-host-ext-dump.txt | 4926 ++++++++++++++++++++ .../policy-override-tiny-framework.txt | 75 + .../test-tiny-framework/run-test-manually.sh | 130 + .../tiny-framework-dump-test.py | 64 + .../test/tinyframework/IPretendingAidl.java | 36 + .../android/hoststubgen/test/tinyframework/R.java | 22 + .../tinyframework/TinyFrameworkAnnotations.java | 80 + .../tinyframework/TinyFrameworkClassLoadHook.java | 33 + .../TinyFrameworkClassWideAnnotations.java | 55 + .../TinyFrameworkClassWithInitializerDefault.java | 30 + .../TinyFrameworkClassWithInitializerStub.java | 35 + .../tinyframework/TinyFrameworkEnumComplex.java | 50 + .../tinyframework/TinyFrameworkEnumSimple.java | 26 + .../TinyFrameworkExceptionTester.java | 29 + .../tinyframework/TinyFrameworkForTextPolicy.java | 92 + .../test/tinyframework/TinyFrameworkLambdas.java | 77 + .../TinyFrameworkMethodCallReplace.java | 58 + .../test/tinyframework/TinyFrameworkNative.java | 75 + .../tinyframework/TinyFrameworkNative_host.java | 45 + .../tinyframework/TinyFrameworkNestedClasses.java | 90 + .../TinyFrameworkPackageRedirect.java | 31 + .../TinyFrameworkRenamedClassCaller.java | 28 + .../tinyframework/TinyFrameworkToBeRenamed.java | 34 + .../test/tinyframework/packagetest/A.java | 19 + .../test/tinyframework/packagetest/B.java | 19 + .../test/tinyframework/packagetest/sub/A.java | 19 + .../test/tinyframework/packagetest/sub/B.java | 19 + .../test/tinyframework/subclasstest/C1.java | 19 + .../test/tinyframework/subclasstest/C2.java | 19 + .../test/tinyframework/subclasstest/C3.java | 19 + .../test/tinyframework/subclasstest/CA.java | 19 + .../test/tinyframework/subclasstest/CB.java | 19 + .../test/tinyframework/subclasstest/Class_C1.java | 19 + .../test/tinyframework/subclasstest/Class_C2.java | 19 + .../test/tinyframework/subclasstest/Class_C3.java | 19 + .../test/tinyframework/subclasstest/Class_CA.java | 19 + .../test/tinyframework/subclasstest/Class_CB.java | 19 + .../tinyframework/subclasstest/Class_CB_IA.java | 19 + .../test/tinyframework/subclasstest/Class_I1.java | 19 + .../tinyframework/subclasstest/Class_I1_IA.java | 19 + .../test/tinyframework/subclasstest/Class_I2.java | 19 + .../test/tinyframework/subclasstest/Class_I3.java | 19 + .../tinyframework/subclasstest/Class_I3_IA.java | 19 + .../test/tinyframework/subclasstest/Class_IA.java | 19 + .../tinyframework/subclasstest/Class_IA_I1.java | 19 + .../tinyframework/subclasstest/Class_IA_I3.java | 19 + .../test/tinyframework/subclasstest/Class_IB.java | 19 + .../tinyframework/subclasstest/Class_IB_IA.java | 19 + .../tinyframework/subclasstest/Class_None.java | 19 + .../test/tinyframework/subclasstest/I1.java | 19 + .../test/tinyframework/subclasstest/I2.java | 19 + .../test/tinyframework/subclasstest/I3.java | 19 + .../test/tinyframework/subclasstest/IA.java | 19 + .../test/tinyframework/subclasstest/IB.java | 19 + .../src/com/supported/UnsupportedClass.java | 32 + .../src/com/unsupported/UnsupportedClass.java | 30 + .../TinyFrameworkAnnotationsTest.java | 64 + .../test/tinyframework/TinyFrameworkClassTest.java | 321 ++ .../TinyFrameworkClassWideAnnotationsTest.java | 112 + .../com/android/hoststubgen/asm/AsmUtilsTest.kt | 37 + .../android/hoststubgen/utils/ClassFilterTest.kt | 115 + .../test/com/android/hoststubgen/utils/TrieTest.kt | 47 + .../com/android/hoststubgen/visitors/HelperTest.kt | 102 + tools/hoststubgen/.gitignore | 3 - tools/hoststubgen/OWNERS | 1 - tools/hoststubgen/README.md | 81 - tools/hoststubgen/TEST_MAPPING | 7 - tools/hoststubgen/common.sh | 116 - tools/hoststubgen/hoststubgen/.gitignore | 1 - tools/hoststubgen/hoststubgen/Android.bp | 171 - .../annotation/HostSideTestClassLoadHook.java | 38 - .../hosttest/annotation/HostSideTestIgnore.java | 34 - .../hosttest/annotation/HostSideTestKeep.java | 43 - .../hosttest/annotation/HostSideTestRedirect.java | 32 - .../annotation/HostSideTestRedirectionClass.java | 35 - .../hosttest/annotation/HostSideTestRemove.java | 39 - .../HostSideTestStaticInitializerKeep.java | 36 - .../annotation/HostSideTestSubstitute.java | 40 - .../hosttest/annotation/HostSideTestThrow.java | 36 - .../annotation/HostSideTestWholeClassKeep.java | 34 - .../annotation/tests/HostSideTestSuppress.java | 31 - .../hoststubgen/framework-policy-override.txt | 105 - .../hosthelper/HostStubGenProcessedAsIgnore.java | 32 - .../hosthelper/HostStubGenProcessedAsKeep.java | 35 - .../HostStubGenProcessedAsSubstitute.java | 36 - .../hosthelper/HostStubGenProcessedAsThrow.java | 32 - .../hoststubgen/hosthelper/HostTestException.java | 26 - .../hoststubgen/hosthelper/HostTestSuite.java | 102 - .../hoststubgen/hosthelper/HostTestUtils.java | 191 - .../hoststubgen/hoststubgen-standard-options.txt | 43 - .../hoststubgen/hoststubgen/invoketest/Android.bp | 20 - .../invoketest/hoststubgen-invoke-test.sh | 228 - tools/hoststubgen/hoststubgen/jarjar-rules.txt | 2 - .../src/com/android/hoststubgen/Exceptions.kt | 72 - .../src/com/android/hoststubgen/HostStubGen.kt | 424 -- .../com/android/hoststubgen/HostStubGenErrors.kt | 24 - .../com/android/hoststubgen/HostStubGenLogger.kt | 320 -- .../src/com/android/hoststubgen/HostStubGenMain.kt | 66 - .../com/android/hoststubgen/HostStubGenOptions.kt | 384 -- .../com/android/hoststubgen/HostStubGenStats.kt | 92 - .../src/com/android/hoststubgen/Utils.kt | 98 - .../src/com/android/hoststubgen/asm/AsmUtils.kt | 478 -- .../src/com/android/hoststubgen/asm/ClassNodes.kt | 273 -- .../com/android/hoststubgen/dumper/ApiDumper.kt | 202 - .../hoststubgen/filters/AndroidHeuristicsFilter.kt | 87 - .../hoststubgen/filters/AnnotationBasedFilter.kt | 366 -- .../filters/ClassWidePolicyPropagatingFilter.kt | 93 - .../android/hoststubgen/filters/ConstantFilter.kt | 66 - .../filters/DefaultHookInjectingFilter.kt | 53 - .../hoststubgen/filters/DelegatingFilter.kt | 109 - .../android/hoststubgen/filters/FilterPolicy.kt | 134 - .../hoststubgen/filters/FilterPolicyWithReason.kt | 47 - .../android/hoststubgen/filters/FilterRemapper.kt | 41 - .../hoststubgen/filters/ImplicitOutputFilter.kt | 164 - .../hoststubgen/filters/InMemoryOutputFilter.kt | 140 - .../hoststubgen/filters/KeepNativeFilter.kt | 43 - .../android/hoststubgen/filters/OutputFilter.kt | 119 - .../android/hoststubgen/filters/PackageFilter.kt | 61 - .../hoststubgen/filters/SanitizationFilter.kt | 57 - .../android/hoststubgen/filters/SubclassFilter.kt | 76 - .../filters/TextFileFilterPolicyParser.kt | 376 -- .../filters/TextFilePolicyMethodReplaceFilter.kt | 59 - .../filters/TextFilePolicyRemapperFilter.kt | 50 - .../com/android/hoststubgen/utils/ClassFilter.kt | 165 - .../src/com/android/hoststubgen/utils/Trie.kt | 58 - .../android/hoststubgen/visitors/BaseAdapter.kt | 275 -- .../visitors/BodyReplacingMethodVisitor.kt | 324 -- .../src/com/android/hoststubgen/visitors/Helper.kt | 68 - .../hoststubgen/visitors/ImplGeneratingAdapter.kt | 427 -- .../visitors/PackageRedirectRemapper.kt | 94 - .../hoststubgen/test-tiny-framework/Android.bp | 166 - .../test-tiny-framework/AndroidTest-host.xml | 29 - .../hoststubgen/test-tiny-framework/README.md | 21 - .../annotation-allowed-classes-tiny-framework.txt | 29 - .../test-tiny-framework/diff-and-update-golden.sh | 134 - ...1-hoststubgen-test-tiny-framework-orig-dump.txt | 3718 --------------- ...3-hoststubgen-test-tiny-framework-host-dump.txt | 3757 --------------- ...ststubgen-test-tiny-framework-host-ext-dump.txt | 4926 -------------------- .../policy-override-tiny-framework.txt | 75 - .../test-tiny-framework/run-test-manually.sh | 130 - .../tiny-framework-dump-test.py | 64 - .../test/tinyframework/IPretendingAidl.java | 36 - .../android/hoststubgen/test/tinyframework/R.java | 22 - .../tinyframework/TinyFrameworkAnnotations.java | 80 - .../tinyframework/TinyFrameworkClassLoadHook.java | 33 - .../TinyFrameworkClassWideAnnotations.java | 55 - .../TinyFrameworkClassWithInitializerDefault.java | 30 - .../TinyFrameworkClassWithInitializerStub.java | 35 - .../tinyframework/TinyFrameworkEnumComplex.java | 50 - .../tinyframework/TinyFrameworkEnumSimple.java | 26 - .../TinyFrameworkExceptionTester.java | 29 - .../tinyframework/TinyFrameworkForTextPolicy.java | 92 - .../test/tinyframework/TinyFrameworkLambdas.java | 77 - .../TinyFrameworkMethodCallReplace.java | 58 - .../test/tinyframework/TinyFrameworkNative.java | 75 - .../tinyframework/TinyFrameworkNative_host.java | 45 - .../tinyframework/TinyFrameworkNestedClasses.java | 90 - .../TinyFrameworkPackageRedirect.java | 31 - .../TinyFrameworkRenamedClassCaller.java | 28 - .../tinyframework/TinyFrameworkToBeRenamed.java | 34 - .../test/tinyframework/packagetest/A.java | 19 - .../test/tinyframework/packagetest/B.java | 19 - .../test/tinyframework/packagetest/sub/A.java | 19 - .../test/tinyframework/packagetest/sub/B.java | 19 - .../test/tinyframework/subclasstest/C1.java | 19 - .../test/tinyframework/subclasstest/C2.java | 19 - .../test/tinyframework/subclasstest/C3.java | 19 - .../test/tinyframework/subclasstest/CA.java | 19 - .../test/tinyframework/subclasstest/CB.java | 19 - .../test/tinyframework/subclasstest/Class_C1.java | 19 - .../test/tinyframework/subclasstest/Class_C2.java | 19 - .../test/tinyframework/subclasstest/Class_C3.java | 19 - .../test/tinyframework/subclasstest/Class_CA.java | 19 - .../test/tinyframework/subclasstest/Class_CB.java | 19 - .../tinyframework/subclasstest/Class_CB_IA.java | 19 - .../test/tinyframework/subclasstest/Class_I1.java | 19 - .../tinyframework/subclasstest/Class_I1_IA.java | 19 - .../test/tinyframework/subclasstest/Class_I2.java | 19 - .../test/tinyframework/subclasstest/Class_I3.java | 19 - .../tinyframework/subclasstest/Class_I3_IA.java | 19 - .../test/tinyframework/subclasstest/Class_IA.java | 19 - .../tinyframework/subclasstest/Class_IA_I1.java | 19 - .../tinyframework/subclasstest/Class_IA_I3.java | 19 - .../test/tinyframework/subclasstest/Class_IB.java | 19 - .../tinyframework/subclasstest/Class_IB_IA.java | 19 - .../tinyframework/subclasstest/Class_None.java | 19 - .../test/tinyframework/subclasstest/I1.java | 19 - .../test/tinyframework/subclasstest/I2.java | 19 - .../test/tinyframework/subclasstest/I3.java | 19 - .../test/tinyframework/subclasstest/IA.java | 19 - .../test/tinyframework/subclasstest/IB.java | 19 - .../src/com/supported/UnsupportedClass.java | 32 - .../src/com/unsupported/UnsupportedClass.java | 30 - .../TinyFrameworkAnnotationsTest.java | 64 - .../test/tinyframework/TinyFrameworkClassTest.java | 321 -- .../TinyFrameworkClassWideAnnotationsTest.java | 112 - .../com/android/hoststubgen/asm/AsmUtilsTest.kt | 37 - .../android/hoststubgen/utils/ClassFilterTest.kt | 115 - .../test/com/android/hoststubgen/utils/TrieTest.kt | 47 - .../com/android/hoststubgen/visitors/HelperTest.kt | 102 - tools/hoststubgen/scripts/Android.bp | 20 - ...ild-framework-hostside-jars-without-genrules.sh | 76 - tools/hoststubgen/scripts/dump-jar | 159 - 277 files changed, 23283 insertions(+), 23294 deletions(-) create mode 100644 ravenwood/tools/hoststubgen/.gitignore create mode 100644 ravenwood/tools/hoststubgen/Android.bp create mode 100644 ravenwood/tools/hoststubgen/README.md create mode 100644 ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestClassLoadHook.java create mode 100644 ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestIgnore.java create mode 100644 ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestKeep.java create mode 100644 ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRedirect.java create mode 100644 ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRedirectionClass.java create mode 100644 ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRemove.java create mode 100644 ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestStaticInitializerKeep.java create mode 100644 ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestSubstitute.java create mode 100644 ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestThrow.java create mode 100644 ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestWholeClassKeep.java create mode 100644 ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/tests/HostSideTestSuppress.java create mode 100644 ravenwood/tools/hoststubgen/common.sh create mode 100644 ravenwood/tools/hoststubgen/framework-policy-override.txt create mode 100644 ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsIgnore.java create mode 100644 ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsKeep.java create mode 100644 ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsSubstitute.java create mode 100644 ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsThrow.java create mode 100644 ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestException.java create mode 100644 ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestSuite.java create mode 100644 ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestUtils.java create mode 100644 ravenwood/tools/hoststubgen/hoststubgen-standard-options.txt create mode 100644 ravenwood/tools/hoststubgen/invoketest/Android.bp create mode 100755 ravenwood/tools/hoststubgen/invoketest/hoststubgen-invoke-test.sh create mode 100644 ravenwood/tools/hoststubgen/jarjar-rules.txt create mode 100644 ravenwood/tools/hoststubgen/scripts/Android.bp create mode 100755 ravenwood/tools/hoststubgen/scripts/build-framework-hostside-jars-without-genrules.sh create mode 100755 ravenwood/tools/hoststubgen/scripts/dump-jar create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/Exceptions.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGen.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenErrors.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenLogger.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenMain.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenOptions.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenStats.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/Utils.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/asm/AsmUtils.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/asm/ClassNodes.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/dumper/ApiDumper.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/AndroidHeuristicsFilter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/AnnotationBasedFilter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/ClassWidePolicyPropagatingFilter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/ConstantFilter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/DefaultHookInjectingFilter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/DelegatingFilter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicy.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicyWithReason.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/FilterRemapper.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/ImplicitOutputFilter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/InMemoryOutputFilter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/KeepNativeFilter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/OutputFilter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/PackageFilter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/SanitizationFilter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/SubclassFilter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/TextFileFilterPolicyParser.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/TextFilePolicyMethodReplaceFilter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/TextFilePolicyRemapperFilter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/utils/ClassFilter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/utils/Trie.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/BaseAdapter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/BodyReplacingMethodVisitor.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/Helper.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/ImplGeneratingAdapter.kt create mode 100644 ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/PackageRedirectRemapper.kt create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/Android.bp create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/AndroidTest-host.xml create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/README.md create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/annotation-allowed-classes-tiny-framework.txt create mode 100755 ravenwood/tools/hoststubgen/test-tiny-framework/diff-and-update-golden.sh create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/01-hoststubgen-test-tiny-framework-orig-dump.txt create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/03-hoststubgen-test-tiny-framework-host-dump.txt create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/13-hoststubgen-test-tiny-framework-host-ext-dump.txt create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/policy-override-tiny-framework.txt create mode 100755 ravenwood/tools/hoststubgen/test-tiny-framework/run-test-manually.sh create mode 100755 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework-dump-test.py create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/IPretendingAidl.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/R.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/A.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/B.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/sub/A.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/sub/B.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C1.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C2.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C3.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/CA.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/CB.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CA.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB_IA.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3_IA.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I1.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I3.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB_IA.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_None.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I1.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I2.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I3.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/IA.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/IB.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/supported/UnsupportedClass.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/unsupported/UnsupportedClass.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotationsTest.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassTest.java create mode 100644 ravenwood/tools/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotationsTest.java create mode 100644 ravenwood/tools/hoststubgen/test/com/android/hoststubgen/asm/AsmUtilsTest.kt create mode 100644 ravenwood/tools/hoststubgen/test/com/android/hoststubgen/utils/ClassFilterTest.kt create mode 100644 ravenwood/tools/hoststubgen/test/com/android/hoststubgen/utils/TrieTest.kt create mode 100644 ravenwood/tools/hoststubgen/test/com/android/hoststubgen/visitors/HelperTest.kt delete mode 100644 tools/hoststubgen/.gitignore delete mode 100644 tools/hoststubgen/OWNERS delete mode 100644 tools/hoststubgen/README.md delete mode 100644 tools/hoststubgen/TEST_MAPPING delete mode 100644 tools/hoststubgen/common.sh delete mode 100644 tools/hoststubgen/hoststubgen/.gitignore delete mode 100644 tools/hoststubgen/hoststubgen/Android.bp delete mode 100644 tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestClassLoadHook.java delete mode 100644 tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestIgnore.java delete mode 100644 tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestKeep.java delete mode 100644 tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRedirect.java delete mode 100644 tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRedirectionClass.java delete mode 100644 tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRemove.java delete mode 100644 tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestStaticInitializerKeep.java delete mode 100644 tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestSubstitute.java delete mode 100644 tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestThrow.java delete mode 100644 tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestWholeClassKeep.java delete mode 100644 tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/tests/HostSideTestSuppress.java delete mode 100644 tools/hoststubgen/hoststubgen/framework-policy-override.txt delete mode 100644 tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsIgnore.java delete mode 100644 tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsKeep.java delete mode 100644 tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsSubstitute.java delete mode 100644 tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsThrow.java delete mode 100644 tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestException.java delete mode 100644 tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestSuite.java delete mode 100644 tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestUtils.java delete mode 100644 tools/hoststubgen/hoststubgen/hoststubgen-standard-options.txt delete mode 100644 tools/hoststubgen/hoststubgen/invoketest/Android.bp delete mode 100755 tools/hoststubgen/hoststubgen/invoketest/hoststubgen-invoke-test.sh delete mode 100644 tools/hoststubgen/hoststubgen/jarjar-rules.txt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/Exceptions.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGen.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenErrors.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenLogger.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenMain.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenOptions.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenStats.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/Utils.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/asm/AsmUtils.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/asm/ClassNodes.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/dumper/ApiDumper.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/AndroidHeuristicsFilter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/AnnotationBasedFilter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/ClassWidePolicyPropagatingFilter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/ConstantFilter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/DefaultHookInjectingFilter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/DelegatingFilter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicy.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicyWithReason.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/FilterRemapper.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/ImplicitOutputFilter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/InMemoryOutputFilter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/KeepNativeFilter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/OutputFilter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/PackageFilter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/SanitizationFilter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/SubclassFilter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/TextFileFilterPolicyParser.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/TextFilePolicyMethodReplaceFilter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/TextFilePolicyRemapperFilter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/utils/ClassFilter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/utils/Trie.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/BaseAdapter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/BodyReplacingMethodVisitor.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/Helper.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/ImplGeneratingAdapter.kt delete mode 100644 tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/PackageRedirectRemapper.kt delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/Android.bp delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/AndroidTest-host.xml delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/README.md delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/annotation-allowed-classes-tiny-framework.txt delete mode 100755 tools/hoststubgen/hoststubgen/test-tiny-framework/diff-and-update-golden.sh delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/golden-output/01-hoststubgen-test-tiny-framework-orig-dump.txt delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/golden-output/03-hoststubgen-test-tiny-framework-host-dump.txt delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/golden-output/13-hoststubgen-test-tiny-framework-host-ext-dump.txt delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/policy-override-tiny-framework.txt delete mode 100755 tools/hoststubgen/hoststubgen/test-tiny-framework/run-test-manually.sh delete mode 100755 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework-dump-test.py delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/IPretendingAidl.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/R.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/A.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/B.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/sub/A.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/sub/B.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C1.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C2.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C3.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/CA.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/CB.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CA.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB_IA.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3_IA.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I1.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I3.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB_IA.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_None.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I1.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I2.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I3.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/IA.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/IB.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/supported/UnsupportedClass.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/unsupported/UnsupportedClass.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotationsTest.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassTest.java delete mode 100644 tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotationsTest.java delete mode 100644 tools/hoststubgen/hoststubgen/test/com/android/hoststubgen/asm/AsmUtilsTest.kt delete mode 100644 tools/hoststubgen/hoststubgen/test/com/android/hoststubgen/utils/ClassFilterTest.kt delete mode 100644 tools/hoststubgen/hoststubgen/test/com/android/hoststubgen/utils/TrieTest.kt delete mode 100644 tools/hoststubgen/hoststubgen/test/com/android/hoststubgen/visitors/HelperTest.kt delete mode 100644 tools/hoststubgen/scripts/Android.bp delete mode 100755 tools/hoststubgen/scripts/build-framework-hostside-jars-without-genrules.sh delete mode 100755 tools/hoststubgen/scripts/dump-jar diff --git a/ravenwood/tools/hoststubgen/.gitignore b/ravenwood/tools/hoststubgen/.gitignore new file mode 100644 index 000000000000..82158c9b25e3 --- /dev/null +++ b/ravenwood/tools/hoststubgen/.gitignore @@ -0,0 +1,4 @@ +framework-all-stub-out +out/ +*-out/ +*.log diff --git a/ravenwood/tools/hoststubgen/Android.bp b/ravenwood/tools/hoststubgen/Android.bp new file mode 100644 index 000000000000..a5ff4964b0a4 --- /dev/null +++ b/ravenwood/tools/hoststubgen/Android.bp @@ -0,0 +1,171 @@ +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], + + // OWNER: g/ravenwood + // Bug component: 25698 + default_team: "trendy_team_ravenwood", +} + +// Visibility only for ravenwood prototype uses. +genrule_defaults { + name: "ravenwood-internal-only-visibility-genrule", + visibility: [ + ":__subpackages__", + "//frameworks/base", + "//frameworks/base/ravenwood:__subpackages__", + ], +} + +// Visibility only for ravenwood prototype uses. +java_defaults { + name: "ravenwood-internal-only-visibility-java", + visibility: [ + ":__subpackages__", + "//frameworks/base", + "//frameworks/base/ravenwood:__subpackages__", + ], +} + +// Visibility only for ravenwood prototype uses. +filegroup_defaults { + name: "ravenwood-internal-only-visibility-filegroup", + visibility: [ + ":__subpackages__", + "//frameworks/base", + "//frameworks/base/ravenwood:__subpackages__", + ], +} + +// This library contains the standard hoststubgen annotations. +// This is only for the prototype. The productionized version is "ravenwood-annotations". +java_library { + name: "hoststubgen-annotations", + defaults: ["ravenwood-internal-only-visibility-java"], + srcs: [ + "annotations-src/**/*.java", + ], + host_supported: true, + + sdk_version: "core_current", +} + +// This library contains helper classes used in the host side test environment at runtime. +// This library is _not_ specific to Android APIs. +java_library_host { + name: "hoststubgen-helper-runtime", + defaults: ["ravenwood-internal-only-visibility-java"], + srcs: [ + "helper-runtime-src/**/*.java", + ], + libs: [ + "junit", + ], + static_libs: [ + "guava", + ], + jarjar_rules: "jarjar-rules.txt", +} + +java_library { + name: "hoststubgen-helper-runtime.ravenwood", + defaults: ["ravenwood-internal-only-visibility-java"], + srcs: [ + "helper-runtime-src/**/*.java", + ], + libs: [ + "junit", + ], + static_libs: [ + "guava", + ], + jarjar_rules: "jarjar-rules.txt", +} + +// For sharing the code with other tools +java_library_host { + name: "hoststubgen-lib", + defaults: ["ravenwood-internal-only-visibility-java"], + srcs: ["src/**/*.kt"], + static_libs: [ + "hoststubgen-helper-runtime", + ], + libs: [ + "junit", + "ow2-asm", + "ow2-asm-analysis", + "ow2-asm-commons", + "ow2-asm-tree", + "ow2-asm-util", + ], +} + +// Host-side stub generator tool. +java_binary_host { + name: "hoststubgen", + main_class: "com.android.hoststubgen.HostStubGenMain", + static_libs: [ + "hoststubgen-lib", + "junit", + "ow2-asm", + "ow2-asm-analysis", + "ow2-asm-commons", + "ow2-asm-tree", + "ow2-asm-util", + ], + visibility: ["//visibility:public"], +} + +java_test_host { + name: "hoststubgentest", + srcs: ["test/**/*.kt"], + static_libs: [ + "hoststubgen", + "truth", + ], + test_suites: ["general-tests"], + visibility: ["//visibility:private"], +} + +// File that contains the standard command line argumetns to hoststubgen. +// This is only for the prototype. The productionized version is "ravenwood-standard-options". +filegroup { + name: "hoststubgen-standard-options", + defaults: ["ravenwood-internal-only-visibility-filegroup"], + srcs: [ + "hoststubgen-standard-options.txt", + ], +} + +hoststubgen_common_options = "$(location hoststubgen) " + + // "--in-jar $(location :framework-all) " + + // "--policy-override-file $(location framework-policy-override.txt) " + + "@$(location :hoststubgen-standard-options) " + + + "--out-jar $(location host.jar) " + + + // "--keep-all-classes " + // Used it for an experiment. See KeepAllClassesFilter. + "--gen-keep-all-file $(location hoststubgen_keep_all.txt) " + + "--gen-input-dump-file $(location hoststubgen_dump.txt) " + + "" + +// Common defaults for stub generation. +// This one is not specific to Android APIs. +genrule_defaults { + name: "hoststubgen-command-defaults", + tools: ["hoststubgen"], + srcs: [ + ":hoststubgen-standard-options", + ], + out: [ + "host.jar", + + // Following files are created just as FYI. + "hoststubgen_keep_all.txt", + "hoststubgen_dump.txt", + ], +} diff --git a/ravenwood/tools/hoststubgen/README.md b/ravenwood/tools/hoststubgen/README.md new file mode 100644 index 000000000000..615e7671bea1 --- /dev/null +++ b/ravenwood/tools/hoststubgen/README.md @@ -0,0 +1,78 @@ +# HostStubGen + +## Overview + +HostStubGen is a tool built for ravenwood. It can read an Android framework jar file +(such as `framework-minus-apex.jar` or `framework-all.jar`) and +converts them, so that they can be used on the Ravenwood environment. + +This directory contains the HostStubGen source code, tests and some library source files +used at runtime. + +- HostStubGen itself is design to be agnostic to Android. It doesn't use any Android APIs +(hidden or not). But it may use Android specific knowledge -- e.g. as of now, +AndroidHeuristicsFilter has hardcoded heuristics to detect AIDL generated classes. + +- `test-tiny-framework/` contains basic tests that are agnostic to Android. + +- More Android specific build files and code are stored in `frameworks/base/Ravenwood.bp` + `frameworks/base/ravenwood`. + +## Directories and files + +- `src/` + + HostStubGen tool source code. + +- `annotations-src/` See `Android.bp`. +- `helper-framework-buildtime-src/` See `Android.bp`. +- `helper-framework-runtime-src/` See `Android.bp`. +- `helper-runtime-src/` See `Android.bp`. + +- `test-tiny-framework/` See `README.md` in it. + +- `scripts` + - `dump-jar.sh` + + A script to dump the content of `*.class` and `*.jar` files. + + - `run-all-tests.sh` + + Run all tests. Many tests may fail, but at least this should run til the end. + (It should print `run-all-tests.sh finished` at the end) + +## Build and run + +### Building `HostStubGen` binary + +``` +m hoststubgen +``` + +### Run the tests + +- Run all relevant tests and test scripts. All of it is expected to pass, and it'll print + "Ready to submit" at the end. + + However, because some of the script it executes depend on internal file paths to Soong's + intermediate directory, some of it might fail when something changes in the build system. + + We need proper build system integration to fix them. +``` +$ ./scripts/run-all-tests.sh +``` + +- See also `README.md` in `test-*` directories. + +## TODOs, etc + + - Make sure the parent's visibility is not smaller than the member's. + +- @HostSideTestNativeSubstitutionClass should automatically add class-keep to the substitute class. + (or at least check it.) + + - The `HostStubGenTest-framework-test-host-test-lib` jar somehow contain all ASM classes? Figure out where the dependency is coming from. + +- At some point, we can move or delete all Android specific code to `frameworks/base/ravenwood`. + - `helper-framework-*-src` should be moved to `frameworks/base/ravenwood` + - `test-framework` should be deleted. diff --git a/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestClassLoadHook.java b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestClassLoadHook.java new file mode 100644 index 000000000000..a774336a897c --- /dev/null +++ b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestClassLoadHook.java @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.hosttest.annotation; + +import static java.lang.annotation.ElementType.TYPE; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY + * QUESTIONS ABOUT IT. + * + * Add this with a fully-specified method name (e.g. {@code "com.package.Class.methodName"}) + * of a callback to get a callback at the class load time. + * + * The method must be {@code public static} with a single argument that takes + * {@link java.lang.Class}. + */ +@Target({TYPE}) +@Retention(RetentionPolicy.CLASS) +public @interface HostSideTestClassLoadHook { + String value(); +} diff --git a/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestIgnore.java b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestIgnore.java new file mode 100644 index 000000000000..501fd652145e --- /dev/null +++ b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestIgnore.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.hosttest.annotation; + +import static java.lang.annotation.ElementType.CONSTRUCTOR; +import static java.lang.annotation.ElementType.METHOD; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY + * QUESTIONS ABOUT IT. + * + * @hide + */ +@Target({METHOD, CONSTRUCTOR}) +@Retention(RetentionPolicy.CLASS) +public @interface HostSideTestIgnore { +} diff --git a/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestKeep.java b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestKeep.java new file mode 100644 index 000000000000..06ad1c266a14 --- /dev/null +++ b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestKeep.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.hosttest.annotation; + +import static java.lang.annotation.ElementType.CONSTRUCTOR; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY + * QUESTIONS ABOUT IT. + * + * Mark a class, field or a method as "Stub", meaning tests can _not_ see the APIs, but they + * can indirectly be used on the host side. + * When applied to a class, it will _not_ affect the visibility of its members. They need to be + * individually marked. + * + *

In order to expose a class and all its members, use {@link HostSideTestWholeClassStub} + * instead. + * @hide + */ +@Target({TYPE, FIELD, METHOD, CONSTRUCTOR}) +@Retention(RetentionPolicy.CLASS) +public @interface HostSideTestKeep { +} diff --git a/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRedirect.java b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRedirect.java new file mode 100644 index 000000000000..bc9471b84b97 --- /dev/null +++ b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRedirect.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.hosttest.annotation; + +import static java.lang.annotation.ElementType.METHOD; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY + * QUESTIONS ABOUT IT. + * @hide + */ +@Target({METHOD}) +@Retention(RetentionPolicy.CLASS) +public @interface HostSideTestRedirect { +} diff --git a/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRedirectionClass.java b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRedirectionClass.java new file mode 100644 index 000000000000..28ad236a66f3 --- /dev/null +++ b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRedirectionClass.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.hosttest.annotation; + +import static java.lang.annotation.ElementType.TYPE; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY + * QUESTIONS ABOUT IT. + * + * If a class has this annotation, all its native methods will be delegated to another class. + * (See {@link android.os.Parcel} as an example.) + */ +@Target({TYPE}) +@Retention(RetentionPolicy.CLASS) +public @interface HostSideTestRedirectionClass { + String value(); +} diff --git a/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRemove.java b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRemove.java new file mode 100644 index 000000000000..46e5078fb05d --- /dev/null +++ b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRemove.java @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.hosttest.annotation; + +import static java.lang.annotation.ElementType.CONSTRUCTOR; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY + * QUESTIONS ABOUT IT. + * + * Mark an item as "remove", so this cannot be used on the host side even indirectly. + * This is the default behavior. + * + * @hide + */ +@Target({TYPE, FIELD, METHOD, CONSTRUCTOR}) +@Retention(RetentionPolicy.CLASS) +public @interface HostSideTestRemove { +} diff --git a/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestStaticInitializerKeep.java b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestStaticInitializerKeep.java new file mode 100644 index 000000000000..eec72269e0d3 --- /dev/null +++ b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestStaticInitializerKeep.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.hosttest.annotation; + +import static java.lang.annotation.ElementType.CONSTRUCTOR; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY + * QUESTIONS ABOUT IT. + * + * @hide + */ +@Target({TYPE, FIELD, METHOD, CONSTRUCTOR}) +@Retention(RetentionPolicy.CLASS) +public @interface HostSideTestStaticInitializerKeep { +} diff --git a/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestSubstitute.java b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestSubstitute.java new file mode 100644 index 000000000000..510a67e0aaed --- /dev/null +++ b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestSubstitute.java @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.hosttest.annotation; + +import static java.lang.annotation.ElementType.METHOD; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY + * QUESTIONS ABOUT IT. + * + * If a method has this annotation, we'll replace it with another method on the host side. + * + * See {@link android.util.LruCache#getEldest()} and its substitution. + * + * @hide + */ +@Target({METHOD}) +@Retention(RetentionPolicy.CLASS) +public @interface HostSideTestSubstitute { + // TODO We should add "_host" as default. We're not doing it yet, because extractign the default + // value with ASM doesn't seem trivial. (? not sure.) + String suffix(); +} diff --git a/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestThrow.java b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestThrow.java new file mode 100644 index 000000000000..cd1bef4be505 --- /dev/null +++ b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestThrow.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.hosttest.annotation; + +import static java.lang.annotation.ElementType.CONSTRUCTOR; +import static java.lang.annotation.ElementType.METHOD; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY + * QUESTIONS ABOUT IT. + * + * If a method has this annotation, it will throw on the host side. + * + * @hide + */ +@Target({METHOD, CONSTRUCTOR}) +@Retention(RetentionPolicy.CLASS) +public @interface HostSideTestThrow { +} diff --git a/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestWholeClassKeep.java b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestWholeClassKeep.java new file mode 100644 index 000000000000..3d1ddea2cbb7 --- /dev/null +++ b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestWholeClassKeep.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.hosttest.annotation; + +import static java.lang.annotation.ElementType.TYPE; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY + * QUESTIONS ABOUT IT. + * + * Same as {@link HostSideTestKeep} but it'll change the visibility of all its members too. + * @hide + */ +@Target({TYPE}) +@Retention(RetentionPolicy.CLASS) +public @interface HostSideTestWholeClassKeep { +} diff --git a/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/tests/HostSideTestSuppress.java b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/tests/HostSideTestSuppress.java new file mode 100644 index 000000000000..b10f0ff1a4b1 --- /dev/null +++ b/ravenwood/tools/hoststubgen/annotations-src/android/hosttest/annotation/tests/HostSideTestSuppress.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package android.hosttest.annotation.tests; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; + +import java.lang.annotation.Target; + +/** + * Use this annotation to skip certain tests for host side tests. + * + * TODO: Actually use it in the test runner. + */ +@Target({TYPE, FIELD, METHOD}) +public @interface HostSideTestSuppress { +} diff --git a/ravenwood/tools/hoststubgen/common.sh b/ravenwood/tools/hoststubgen/common.sh new file mode 100644 index 000000000000..b49ee39a3142 --- /dev/null +++ b/ravenwood/tools/hoststubgen/common.sh @@ -0,0 +1,116 @@ +# Copyright (C) 2023 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -e # Exit at failure +shopt -s globstar # Enable double-star wildcards (**) + +cd "${0%/*}" # Move to the script dir + +fail() { + echo "Error: $*" 1>&2 + exit 1 +} + +# Print the arguments and then execute. +run() { + echo "Running: $*" 1>&2 + "$@" +} + +# Concatenate the second and subsequent args with the first arg as a separator. +# e.g. `join : a b c` -> prints `a:b:c` +join() { + local IFS="$1" + shift + echo "$*" +} + +abspath() { + for name in "${@}"; do + readlink -f $name + done +} + +m() { + if (( $SKIP_BUILD )) ; then + echo "Skipping build: $*" 1>&2 + return 0 + fi + run ${ANDROID_BUILD_TOP}/build/soong/soong_ui.bash --make-mode "$@" +} + +# Extract given jar files +extract() { + for f in "${@}"; do + local out=$f.ext + run rm -fr $out + run mkdir -p $out + + # It's too noisy, so only show the first few lines. + { + # Hmm unzipping kotlin jar files may produce a warning? Let's just add `|| true`... + run unzip $f -d $out || true + } |& sed -e '5,$d' + echo ' (omitting remaining output)' + + done +} + +# Find all *.java files in $1, and print them as Java class names. +# For example, if there's a file `src/com/android/test/Test.java`, and you run +# `list_all_classes_under_dir src`, then it'll print `com.android.test.Test`. +list_all_classes_under_dir() { + local dir="$1" + ( # Use a subshell, so we won't change the current directory on the caller side. + cd "$dir" + + # List the java files, but replace the slashes with dots, and remove the `.java` suffix. + ls **/*.java | sed -e 's!/!.!g' -e 's!.java$!!' + ) +} + +checkenv() { + # Make sure $ANDROID_BUILD_TOP is set. + : ${ANDROID_BUILD_TOP:?} + + # Make sure ANDROID_BUILD_TOP doesn't contain whitespace. + set ${ANDROID_BUILD_TOP} + if [[ $# != 1 ]] ; then + fail "\$ANDROID_BUILD_TOP cannot contain whitespace." + fi +} + +checkenv + +JAVAC=${JAVAC:-javac} +JAVA=${JAVA:-java} +JAR=${JAR:-jar} + +JAVAC_OPTS=${JAVAC_OPTS:--Xmaxerrs 99999 -Xlint:none} + +SOONG_INT=$ANDROID_BUILD_TOP/out/soong/.intermediates + +JUNIT_TEST_MAIN_CLASS=com.android.hoststubgen.hosthelper.HostTestSuite + +run_junit_test_jar() { + local jar="$1" + echo "Starting test: $jar ..." + run cd "${jar%/*}" + + run $JAVA $JAVA_OPTS \ + -cp $jar \ + org.junit.runner.JUnitCore \ + $main_class || return 1 + return 0 +} diff --git a/ravenwood/tools/hoststubgen/framework-policy-override.txt b/ravenwood/tools/hoststubgen/framework-policy-override.txt new file mode 100644 index 000000000000..af3789e270a4 --- /dev/null +++ b/ravenwood/tools/hoststubgen/framework-policy-override.txt @@ -0,0 +1,105 @@ +# -------------------------------------------------------------------------------------------------- +# This file contains rules to process `framework-all.jar` to generate the host side test "stub" and +# "impl" jars, without using Java annotations. +# +# Useful when: +# - The class is auto-generated and annotations can't be added. +# (We need to figure out what to do on auto-generated classes.) +# - Want to quickly change filter rules without having to rebuild framework.jar. +# +# Using this file, one can control the visibility of APIs on a per-class, per-field and per-method +# basis, but in most cases, per-class directives would be sufficient. That is: +# +# - To put the entire class, including its members and nested classes, in the "stub" jar, +# so that the test / target code can use the API, use `stubclass`. +# +# class package.class stubclass +# +# - To put the entire class, including its members and nested classes, in the "impl" jar, +# but not in the "stub" jar, use `keepclass`. Use this when you don't want to expose an API to +# tests/target directly, but it's still needed at runtime, because it's used by other "stub" APIs +# directly or indirectly. +# +# class package.class keepclass +# +# All other classes will be removed from both the stub jar and impl jar. +# +# -------------------------------------------------------------------------------------------------- + +# -------------------------------------------------------------------------------------------------- +# Directions on auto-generated classes, where we can't use Java annotations (yet). +# -------------------------------------------------------------------------------------------------- +class android.Manifest stubclass +class android.R stubclass +class android.os.PersistableBundleProto keepclass + +# This is in module-utils, where using a HostStubGen annotation would be complicated, so we +# add a direction here rather than using a java annotation. +# The build file says it's deprecated, anyway...? Figure out what to do with it. +class com.android.internal.util.Preconditions keepclass + +# -------------------------------------------------------------------------------------------------- +# Actual framework classes +# -------------------------------------------------------------------------------------------------- + +# Put basic exception classes in the "impl" jar. +# We don't put them in stub yet (until something actually needs them). +class android.os.DeadObjectException keepclass +class android.os.DeadSystemRuntimeException keepclass +class android.os.NetworkOnMainThreadException keepclass +class android.os.RemoteException keepclass +class android.os.ServiceSpecificException keepclass +class android.util.AndroidException keepclass +class android.util.AndroidRuntimeException keepclass +class android.os.DeadSystemException keepclass + + +# For now, we only want to expose ArrayMap and Log, but they and their tests depend on +# more classes. + +class android.util.ArrayMap stubclass + +# Used by ArrayMap. No need to put them in the stub, but we need them in impl. +class android.util.MapCollections keepclass +class android.util.ContainerHelpers keepclass +class android.util.EmptyArray stubclass +class com.android.internal.util.XmlUtils keepclass +class com.android.internal.util.FastMath keepclass +class android.util.MathUtils keepclass + + +class android.util.Log stubclass +class android.util.Slog stubclass +# We don't use Log's native code, yet. Instead, the following line enables the Java substitution. +# Comment it out to disable Java substitution of Log's native methods. +class android.util.Log !com.android.hoststubgen.nativesubstitution.Log_host + +# Used by log +class com.android.internal.util.FastPrintWriter keepclass +class com.android.internal.util.LineBreakBufferedWriter keepclass + +class android.util.EventLog stubclass +class android.util.EventLog !com.android.hoststubgen.nativesubstitution.EventLog_host +class android.util.EventLog$Event stubclass + +# Expose Context because it's referred to by AndroidTestCase, but don't need to expose any of +# its members. +class android.content.Context keep + +# Expose Parcel, Parcel and there relevant classes, which are used by ArrayMapTets. +class android.os.Parcelable StubClass +class android.os.Parcel StubClass +class android.os.Parcel !com.android.hoststubgen.nativesubstitution.Parcel_host + +class android.os.IBinder stubClass +class android.os.IInterface stubclass + +class android.os.BadParcelableException stubclass +class android.os.BadTypeParcelableException stubclass + +class android.os.BaseBundle stubclass +class android.os.Bundle stubclass +class android.os.PersistableBundle stubclass + +class android.os.MessageQueue stubclass +class android.os.MessageQueue !com.android.hoststubgen.nativesubstitution.MessageQueue_host diff --git a/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsIgnore.java b/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsIgnore.java new file mode 100644 index 000000000000..b01710347537 --- /dev/null +++ b/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsIgnore.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.hosthelper; + +import static java.lang.annotation.ElementType.METHOD; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Annotation injected to all methods processed as "ignore". + */ +@Target({METHOD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface HostStubGenProcessedAsIgnore { + String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenProcessedAsIgnore.class); + String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; +} diff --git a/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsKeep.java b/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsKeep.java new file mode 100644 index 000000000000..18ef1bab203e --- /dev/null +++ b/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsKeep.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.hosthelper; + +import static java.lang.annotation.ElementType.CONSTRUCTOR; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Annotation injected to all classes/methods/fields that are kept in the processes jar. + */ +@Target({TYPE, METHOD, CONSTRUCTOR, FIELD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface HostStubGenProcessedAsKeep { + String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenProcessedAsKeep.class); + String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; +} diff --git a/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsSubstitute.java b/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsSubstitute.java new file mode 100644 index 000000000000..99e38c0b1725 --- /dev/null +++ b/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsSubstitute.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.hosthelper; + +import static java.lang.annotation.ElementType.CONSTRUCTOR; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Annotation injected to all methods that are processed as "substitute". + */ +@Target({TYPE, METHOD, CONSTRUCTOR, FIELD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface HostStubGenProcessedAsSubstitute { + String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName( + HostStubGenProcessedAsSubstitute.class); + String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; +} diff --git a/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsThrow.java b/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsThrow.java new file mode 100644 index 000000000000..4933cf8784d9 --- /dev/null +++ b/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsThrow.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.hosthelper; + +import static java.lang.annotation.ElementType.METHOD; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Annotation injected to all methods that are processed as "throw". + */ +@Target({METHOD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface HostStubGenProcessedAsThrow { + String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenProcessedAsThrow.class); + String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; +} diff --git a/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestException.java b/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestException.java new file mode 100644 index 000000000000..c54c2c111229 --- /dev/null +++ b/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestException.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.hosthelper; + +public class HostTestException extends RuntimeException { + public HostTestException(String message) { + super(message); + } + + public HostTestException(String message, Throwable inner) { + super(message, inner); + } +} diff --git a/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestSuite.java b/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestSuite.java new file mode 100644 index 000000000000..29f7be008eef --- /dev/null +++ b/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestSuite.java @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.hosthelper; + +import com.google.common.reflect.ClassPath; +import com.google.common.reflect.ClassPath.ClassInfo; + +import junit.framework.JUnit4TestAdapter; +import junit.framework.TestSuite; + +import java.util.regex.Pattern; + +/** + * A very simple Junit {@link TestSuite} builder that finds all classes that look like test classes. + * + * We use it to run ravenwood test jars from the command line. + */ +public class HostTestSuite { + private static final String CLASS_NAME_REGEX_ENV = "HOST_TEST_CLASS_NAME_REGEX"; + + /** + * Called by junit, and return all test-looking classes as a suite. + */ + public static TestSuite suite() { + TestSuite suite = new TestSuite(); + + final Pattern classNamePattern; + final var filterRegex = System.getenv(CLASS_NAME_REGEX_ENV); + if (filterRegex == null) { + classNamePattern = Pattern.compile(""); + } else { + classNamePattern = Pattern.compile(filterRegex); + } + try { + // We use guava to list all classes. + ClassPath cp = ClassPath.from(HostTestSuite.class.getClassLoader()); + + for (var classInfo : cp.getAllClasses()) { + Class clazz = asTestClass(classInfo); + if (clazz != null) { + if (classNamePattern.matcher(clazz.getSimpleName()).find()) { + System.out.println("Test class found " + clazz.getName()); + } else { + System.out.println("Skipping test class (for $" + + CLASS_NAME_REGEX_ENV + "): " + clazz.getName()); + } + suite.addTest(new JUnit4TestAdapter(clazz)); + } + } + } catch (Exception e) { + throw new RuntimeException(e); + } + return suite; + } + + /** + * Decide whether a class looks like a test class or not, and if so, return it as a Class + * instance. + */ + private static Class asTestClass(ClassInfo classInfo) { + try { + final Class clazz = classInfo.load(); + + // Does it extend junit.framework.TestCase? + if (junit.framework.TestCase.class.isAssignableFrom(clazz)) { + // Ignore classes in JUnit itself, or the android(x) test lib. + if (classInfo.getName().startsWith("junit.") + || classInfo.getName().startsWith("org.junit.") + || classInfo.getName().startsWith("android.test.") + || classInfo.getName().startsWith("androidx.test.")) { + return null; // Ignore junit classes. + } + return clazz; + } + // Does it have any "@Test" method? + for (var method : clazz.getMethods()) { + for (var an : method.getAnnotations()) { + if (an.annotationType() == org.junit.Test.class) { + return clazz; + } + } + } + return null; + } catch (java.lang.NoClassDefFoundError e) { + // Ignore unloadable classes. + return null; + } + } +} diff --git a/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestUtils.java b/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestUtils.java new file mode 100644 index 000000000000..78fd8f7f960a --- /dev/null +++ b/ravenwood/tools/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestUtils.java @@ -0,0 +1,191 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.hosthelper; + +import java.io.PrintStream; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; + +/** + * Utilities used in the host side test environment. + */ +public class HostTestUtils { + private HostTestUtils() { + } + + /** + * Same as ASM's Type.getInternalName(). Copied here, to avoid having a reference to ASM + * in this JAR. + */ + public static String getInternalName(final Class clazz) { + return clazz.getName().replace('.', '/'); + } + + public static final String CLASS_INTERNAL_NAME = getInternalName(HostTestUtils.class); + + /** If true, we won't print method call log. */ + private static final boolean SKIP_METHOD_LOG = "1".equals(System.getenv( + "HOSTTEST_SKIP_METHOD_LOG")); + + /** If true, we won't print class load log. */ + private static final boolean SKIP_CLASS_LOG = "1".equals(System.getenv( + "HOSTTEST_SKIP_CLASS_LOG")); + + /** If true, we won't perform non-stub method direct call check. */ + private static final boolean SKIP_NON_STUB_METHOD_CHECK = "1".equals(System.getenv( + "HOSTTEST_SKIP_NON_STUB_METHOD_CHECK")); + + + /** + * Method call log will be printed to it. + */ + public static PrintStream logPrintStream = System.out; + + /** + * Called from methods with FilterPolicy.Throw. + */ + public static void onThrowMethodCalled() { + // TODO: Maybe add call tracking? + throw new RuntimeException( + "This method is not yet supported under the Ravenwood deviceless testing " + + "environment; consider requesting support from the API owner or " + + "consider using Mockito; more details at go/ravenwood-docs"); + } + + /** + * Trampoline method for method-call-hook. + */ + public static void callMethodCallHook( + Class methodClass, + String methodName, + String methodDescriptor, + String callbackMethod + ) { + callStaticMethodByName(callbackMethod, "method call hook", methodClass, + methodName, methodDescriptor); + } + + /** + * I can be used as + * {@code --default-method-call-hook + * com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall}. + * + * It logs every single methods called. + */ + public static void logMethodCall( + Class methodClass, + String methodName, + String methodDescriptor + ) { + if (SKIP_METHOD_LOG) { + return; + } + logPrintStream.println("# method called: " + methodClass.getCanonicalName() + "." + + methodName + methodDescriptor); + } + + /** + * Called when any top level class (not nested classes) in the impl jar is loaded. + * + * When HostStubGen inject a class-load hook, it's always a call to this method, with the + * actual method name as the second argument. + * + * This method discovers the hook method with reflections and call it. + * + * TODO: Add a unit test. + */ + public static void onClassLoaded(Class loadedClass, String callbackMethod) { + logPrintStream.println("! Class loaded: " + loadedClass.getCanonicalName() + + " calling hook " + callbackMethod); + + callStaticMethodByName(callbackMethod, "class load hook", loadedClass); + } + + private static void callStaticMethodByName(String classAndMethodName, + String description, Object... args) { + // Forward the call to callbackMethod. + final int lastPeriod = classAndMethodName.lastIndexOf("."); + + if ((lastPeriod) < 0 || (lastPeriod == classAndMethodName.length() - 1)) { + throw new HostTestException(String.format( + "Unable to find %s: malformed method name \"%s\"", + description, + classAndMethodName)); + } + + final String className = classAndMethodName.substring(0, lastPeriod); + final String methodName = classAndMethodName.substring(lastPeriod + 1); + + Class clazz = null; + try { + clazz = Class.forName(className); + } catch (Exception e) { + throw new HostTestException(String.format( + "Unable to find %s: Class %s not found", + description, + className), e); + } + if (!Modifier.isPublic(clazz.getModifiers())) { + throw new HostTestException(String.format( + "Unable to find %s: Class %s must be public", + description, + className)); + } + + Class[] argTypes = new Class[args.length]; + for (int i = 0; i < args.length; i++) { + argTypes[i] = args[i].getClass(); + } + + Method method = null; + try { + method = clazz.getMethod(methodName, argTypes); + } catch (Exception e) { + throw new HostTestException(String.format( + "Unable to find %s: class %s doesn't have method %s" + + " (method must take exactly one parameter of type Class," + + " and public static)", + description, className, methodName), e); + } + if (!(Modifier.isPublic(method.getModifiers()) + && Modifier.isStatic(method.getModifiers()))) { + throw new HostTestException(String.format( + "Unable to find %s: Method %s in class %s must be public static", + description, methodName, className)); + } + try { + method.invoke(null, args); + } catch (Exception e) { + throw new HostTestException(String.format( + "Unable to invoke %s %s.%s", + description, className, methodName), e); + } + } + + /** + * I can be used as + * {@code --default-class-load-hook + * com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded}. + * + * It logs every loaded class. + */ + public static void logClassLoaded(Class clazz) { + if (SKIP_CLASS_LOG) { + return; + } + logPrintStream.println("# class loaded: " + clazz.getCanonicalName()); + } +} diff --git a/ravenwood/tools/hoststubgen/hoststubgen-standard-options.txt b/ravenwood/tools/hoststubgen/hoststubgen-standard-options.txt new file mode 100644 index 000000000000..001943c18d6b --- /dev/null +++ b/ravenwood/tools/hoststubgen/hoststubgen-standard-options.txt @@ -0,0 +1,43 @@ +# File containing standard options to HostStubGen + +--debug + +# Uncomment below lines to enable each feature. + +#--default-method-call-hook +# com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall +#--default-class-load-hook +# com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + +# Standard annotations. +# Note, each line is a single argument, so we need newlines after each `--xxx-annotation`. + +--keep-annotation + android.hosttest.annotation.HostSideTestKeep + +--keep-class-annotation + android.hosttest.annotation.HostSideTestWholeClassKeep + +--throw-annotation + android.hosttest.annotation.HostSideTestThrow + +--remove-annotation + android.hosttest.annotation.HostSideTestRemove + +--ignore-annotation + android.hosttest.annotation.HostSideTestIgnore + +--substitute-annotation + android.hosttest.annotation.HostSideTestSubstitute + +--redirect-annotation + android.hosttest.annotation.HostSideTestRedirect + +--redirection-class-annotation + android.hosttest.annotation.HostSideTestRedirectionClass + +--class-load-hook-annotation + android.hosttest.annotation.HostSideTestClassLoadHook + +--keep-static-initializer-annotation + android.hosttest.annotation.HostSideTestStaticInitializerKeep diff --git a/ravenwood/tools/hoststubgen/invoketest/Android.bp b/ravenwood/tools/hoststubgen/invoketest/Android.bp new file mode 100644 index 000000000000..7e90e421a1f9 --- /dev/null +++ b/ravenwood/tools/hoststubgen/invoketest/Android.bp @@ -0,0 +1,20 @@ +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +sh_test_host { + name: "hoststubgen-invoke-test", + src: "hoststubgen-invoke-test.sh", + test_suites: ["general-tests"], + + // Note: java_data: ["hoststubgen"] will only install the jar file, but not the command wrapper. + java_data: [ + "hoststubgen", + "hoststubgen-test-tiny-framework", + ], +} diff --git a/ravenwood/tools/hoststubgen/invoketest/hoststubgen-invoke-test.sh b/ravenwood/tools/hoststubgen/invoketest/hoststubgen-invoke-test.sh new file mode 100755 index 000000000000..084448d0a797 --- /dev/null +++ b/ravenwood/tools/hoststubgen/invoketest/hoststubgen-invoke-test.sh @@ -0,0 +1,228 @@ +#!/bin/bash +# Copyright (C) 2023 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This command is expected to be executed with: atest hoststubgen-invoke-test + +set -e # Exit when any command files + +# This script runs HostStubGen directly with various arguments and make sure +# the tool behaves in the expected way. + + +echo "# Listing files in the test environment" +ls -lR + +echo "# Dumping the environment variables" +env + +# Set up the constants and variables + +# Bazel sets $TEST_TMPDIR. +export TEMP=$TEST_TMPDIR + +if [[ "$TEMP" == "" ]] ; then + TEMP=./tmp + mkdir -p $TEMP +fi + +cleanup_temp() { + rm -fr $TEMP/* +} + +cleanup_temp + +INJAR=hoststubgen-test-tiny-framework.jar +OUTJAR=$TEMP/host.jar + +ANNOTATION_FILTER=$TEMP/annotation-filter.txt + +HOSTSTUBGEN_OUT=$TEMP/output.txt + +EXTRA_ARGS="" + +# Because of `set -e`, we can't return non-zero from functions, so we store +# HostStubGen result in it. +HOSTSTUBGEN_RC=0 + +# Note, because the build rule will only install hoststubgen.jar, but not the wrapper script, +# we need to execute it manually with the java command. +hoststubgen() { + echo "Running hoststubgen with: $*" + java -jar ./hoststubgen.jar "$@" +} + +run_hoststubgen() { + local test_name="$1" + local annotation_filter="$2" + + echo "# Test: $test_name" + + cleanup_temp + + local filter_arg="" + + if [[ "$annotation_filter" != "" ]] ; then + echo "$annotation_filter" > $ANNOTATION_FILTER + filter_arg="--annotation-allowed-classes-file $ANNOTATION_FILTER" + echo "=== filter ===" + cat $ANNOTATION_FILTER + fi + + local out_arg="" + + if [[ "$OUTJAR" != "" ]] ; then + out_arg="--out-jar $OUTJAR" + fi + + hoststubgen \ + --debug \ + --in-jar $INJAR \ + $out_arg \ + --keep-annotation \ + android.hosttest.annotation.HostSideTestKeep \ + --keep-class-annotation \ + android.hosttest.annotation.HostSideTestWholeClassKeep \ + --throw-annotation \ + android.hosttest.annotation.HostSideTestThrow \ + --remove-annotation \ + android.hosttest.annotation.HostSideTestRemove \ + --substitute-annotation \ + android.hosttest.annotation.HostSideTestSubstitute \ + --redirect-annotation \ + android.hosttest.annotation.HostSideTestRedirect \ + --redirection-class-annotation \ + android.hosttest.annotation.HostSideTestRedirectionClass \ + --class-load-hook-annotation \ + android.hosttest.annotation.HostSideTestClassLoadHook \ + --keep-static-initializer-annotation \ + android.hosttest.annotation.HostSideTestStaticInitializerKeep \ + $filter_arg \ + $EXTRA_ARGS \ + |& tee $HOSTSTUBGEN_OUT + HOSTSTUBGEN_RC=${PIPESTATUS[0]} + echo "HostStubGen exited with $HOSTSTUBGEN_RC" + return 0 +} + +assert_file_generated() { + local file="$1" + if [[ "$file" == "" ]] ; then + if [[ -f "$file" ]] ; then + echo "HostStubGen shouldn't have generated $file" + return 1 + fi + else + if ! [[ -f "$file" ]] ; then + echo "HostStubGen didn't generate $file" + return 1 + fi + fi +} + +run_hoststubgen_for_success() { + run_hoststubgen "$@" + + if (( $HOSTSTUBGEN_RC != 0 )) ; then + echo "HostStubGen expected to finish successfully, but failed with $rc" + return 1 + fi + + assert_file_generated "$STUB" + assert_file_generated "$IMPL" +} + +run_hoststubgen_for_failure() { + local test_name="$1" + local expected_error_message="$2" + shift 2 + + run_hoststubgen "$test_name" "$@" + + if (( $HOSTSTUBGEN_RC == 0 )) ; then + echo "HostStubGen expected to fail, but it didn't fail" + return 1 + fi + + # The output should contain the expected message. (note we se fgrep here.) + grep -Fq "$expected_error_message" $HOSTSTUBGEN_OUT +} + +# Start the tests... + +# Pass "" as a filter to _not_ add `--annotation-allowed-classes-file`. +run_hoststubgen_for_success "No annotation filter" "" + +# Now, we use " ", so we do add `--annotation-allowed-classes-file`. +run_hoststubgen_for_failure "No classes are allowed to have annotations" \ + "not allowed to have Ravenwood annotations" \ + " " + +run_hoststubgen_for_success "All classes allowed (wildcard)" \ + " +* # Allow all classes +" + +run_hoststubgen_for_failure "All classes disallowed (wildcard)" \ + "not allowed to have Ravenwood annotations" \ + " +!* # Disallow all classes +" + +run_hoststubgen_for_failure "Some classes not allowed (1)" \ + "not allowed to have Ravenwood annotations" \ + " +android.hosttest.* +com.android.hoststubgen.* +com.supported.* +" + +run_hoststubgen_for_failure "Some classes not allowed (2)" \ + "not allowed to have Ravenwood annotations" \ + " +android.hosttest.* +com.android.hoststubgen.* +com.unsupported.* +" + +run_hoststubgen_for_success "All classes allowed (package wildcard)" \ + " +android.hosttest.* +com.android.hoststubgen.* +com.supported.* +com.unsupported.* +" + +run_hoststubgen_for_failure "One specific class disallowed" \ + "TinyFrameworkAnnotations is not allowed to have Ravenwood annotations" \ + " +!com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations +* # All other classes allowed +" + +run_hoststubgen_for_success "One specific class disallowed, but it doesn't use annotations" \ + " +!com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPolicy +* # All other classes allowed +" + +OUTJAR="" run_hoststubgen_for_success "No output generation" "" + +EXTRA_ARGS="--in-jar abc" run_hoststubgen_for_failure "Duplicate arg" \ + "Duplicate or conflicting argument found: --in-jar" \ + "" + + +echo "All tests passed" +exit 0 diff --git a/ravenwood/tools/hoststubgen/jarjar-rules.txt b/ravenwood/tools/hoststubgen/jarjar-rules.txt new file mode 100644 index 000000000000..b1f2fc21c8e9 --- /dev/null +++ b/ravenwood/tools/hoststubgen/jarjar-rules.txt @@ -0,0 +1,2 @@ +# Rename guava +rule com.google.** com.android.hoststubgen.x.google.@0 \ No newline at end of file diff --git a/ravenwood/tools/hoststubgen/scripts/Android.bp b/ravenwood/tools/hoststubgen/scripts/Android.bp new file mode 100644 index 000000000000..b1ba07ec540d --- /dev/null +++ b/ravenwood/tools/hoststubgen/scripts/Android.bp @@ -0,0 +1,20 @@ +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +sh_binary_host { + name: "dump-jar", + src: "dump-jar", + visibility: ["//visibility:public"], +} + +genrule_defaults { + name: "hoststubgen-jar-dump-defaults", + tools: ["dump-jar"], + cmd: "$(location dump-jar) -s -o $(out) $(in)", +} diff --git a/ravenwood/tools/hoststubgen/scripts/build-framework-hostside-jars-without-genrules.sh b/ravenwood/tools/hoststubgen/scripts/build-framework-hostside-jars-without-genrules.sh new file mode 100755 index 000000000000..c3605a9ffaa5 --- /dev/null +++ b/ravenwood/tools/hoststubgen/scripts/build-framework-hostside-jars-without-genrules.sh @@ -0,0 +1,76 @@ +#!/bin/bash +# Copyright (C) 2023 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Script to build hoststubgen and run it directly (without using the build rules) +# on framework-all.jar. + + +echo "THIS SCRIPT IS BROKEN DUE TO CHANGES TO FILE PATHS TO DEPENDENT FILES. FIX IT WHEN YOU NEED TO USE IT." 1>&2 + +exit 99 + + +source "${0%/*}"/../common.sh + +out=out + +mkdir -p $out + +# Build the tool and target jar. +run m hoststubgen framework-all + +base_args=( + @../hoststubgen/hoststubgen-standard-options.txt + + --in-jar $ANDROID_BUILD_TOP/out/soong/.intermediates/frameworks/base/framework-all/android_common/combined/framework-all.jar + --policy-override-file ../hoststubgen/framework-policy-override.txt "${@}" + + # This file will contain all classes as an annotation file, with "keep all" policy. + --gen-keep-all-file $out/framework-all-keep-all-policy.txt + + # This file will contains dump of all classes in the input jar. + --gen-input-dump-file $out/framework-all-dump.txt +) + +do_it() { + local out_file_stem="$1" + shift + local extra_args=("${@}") + + run hoststubgen \ + "${base_args[@]}" \ + "${extra_args[@]}" \ + --out-stub-jar ${out_file_stem}_stub.jar \ + --out-impl-jar ${out_file_stem}_impl.jar \ + $HOSTSTUBGEN_OPTS + + # Extract the jar files, so we can look into them. + run extract ${out_file_stem}_*.jar +} + +#----------------------------------------------------------------------------- +# framework-all, with all hidden APIs. +#----------------------------------------------------------------------------- + +# No extra args. +do_it $out/framework-all_host + +#----------------------------------------------------------------------------- +# framework-test-api, only public/system/test-APIs in the stub. +#----------------------------------------------------------------------------- + +do_it $out/framework-test-api_host \ + --intersect-stub-jar $SOONG_INT/frameworks/base/api/android_test_stubs_current/android_common/combined/*.jar diff --git a/ravenwood/tools/hoststubgen/scripts/dump-jar b/ravenwood/tools/hoststubgen/scripts/dump-jar new file mode 100755 index 000000000000..87652451359d --- /dev/null +++ b/ravenwood/tools/hoststubgen/scripts/dump-jar @@ -0,0 +1,159 @@ +#!/bin/bash +# Copyright (C) 2023 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -e + + +help() { + cat <<'EOF' + + dump-jar: Dump java classes in jar files + + Usage: + dump-jar [-v] CLASS-FILE [...] + + Dump a *.class file + + dump-jar [-v] [-s] [-o OUTPUT-FILENAME] JAR-FILE[: class internal name regex] [...] + + Dump a jar file. + + If a filename contains a ':', then the following part + will be used to filter files in the jar file that matches against class internal names. + + For example, "file.jar:/MyClass$" will only dump "MyClass" in file.jar. + + Options: + -v: Enable verbose output. + + -s: Simple output mode, used to check HostStubGen output jars. + + -o: Write the output to a specified file. +EOF +} + +# Parse the options. + +verbose=0 +simple=0 +output="" +while getopts "hvso:" opt; do +case "$opt" in + h) + help + exit 0 + ;; + v) + verbose=1 + ;; + s) + simple=1 + ;; + o) + output="$OPTARG" + ;; + '?') + help + exit 1 + ;; +esac +done +shift $(($OPTIND - 1)) + +JAVAP_OPTS="${JAVAP_OPTS:--v -p -s -sysinfo -constants}" + +if (( $simple )) ; then + JAVAP_OPTS="-p -c -v" +fi + +# Convert the output for `-s` as needed. +filter_output() { + if (( $simple )) ; then + # For "simple output" mode, + # - Normalize the constant numbers (replace with "#x") + # - Normalize byte code offsets and other similar numbers. (e.g. "0:" -> "x:") + # - Remove the constant pool + # - Remove the line number table + # - Some other transient lines + # - Sometimes the javap shows mysterious warnings, so remove them too. + # + # `/PATTERN-1/,/PATTERN-1/{//!d}` is a trick to delete lines between two patterns, without + # the start and the end lines. + sed -e 's/#[0-9][0-9]*/#x/g' \ + -e 's/^\( *\)[0-9][0-9]*:/\1x:/' \ + -e '/^Constant pool:/,/^[^ ]/{//!d}' \ + -e '/^ *line *[0-9][0-9]*: *[0-9][0-9]*$/d' \ + -e '/SHA-256 checksum/d' \ + -e '/Last modified/d' \ + -e '/^Classfile jar/d' \ + -e '/\[warning\]/d' + else + cat # Print as-is. + fi +} + +# Write to the output file (specified with -o) as needed. +write_to_out() { + if [[ -n "$output" ]] ; then + cat >"$output" + echo "Wrote output to $output" 1>&2 + else + cat # print to stdout + fi +} + +# Read jar file names and remove the .class suffix. +# Also remove non-class files. +to_internal_names() { + sed -ne 's/\.class$//p' +} + +for file in "${@}"; do + + # *.class? + if echo "$file" | grep -qE '\.class$' ; then + echo "# Class: $file" 1>&2 + javap $dump_code_opt $JAVAP_OPTS $file + + # *.jar? + elif echo "$file" | grep -qE '\.jar(:.*)?$' ; then + # Take the regex. Remove everything up to : in $file + regex="" + if [[ "$file" =~ : ]] ; then + regex="${file##*:}" + fi + + # Remove everything after ':', inclusively, in $file. + file="${file%:*}" + + # Print the filename and the regex. + if ! (( $simple )) ; then + echo -n "# Jar: $file" + if [[ "$regex" != "" ]] ;then + echo -n " (regex: $regex)" + fi + echo + fi + + jar tf "$file" | sort | to_internal_names | grep -- "$regex" | while read -r class ; do + echo "## Class: $class.class" + javap $dump_code_opt $JAVAP_OPTS -cp "$file" "${class}" + done + + else + echo "Unknown file type: $file" 1>&2 + exit 1 + fi +done | filter_output | write_to_out diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/Exceptions.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/Exceptions.kt new file mode 100644 index 000000000000..f59e143c1e4e --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/Exceptions.kt @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen + +import java.io.File + +/** + * We will not print the stack trace for exceptions implementing it. + */ +interface UserErrorException + +/** + * Exceptions about parsing class files. + */ +class ClassParseException(message: String) : Exception(message) + +/** + * Use it for internal exception that really shouldn't happen. + */ +class HostStubGenInternalException(message: String) : Exception(message) + +/** + * Exceptions about the content in a jar file. + */ +class InvalidJarFileException(message: String) : Exception(message), UserErrorException + +/** + * Exceptions missing classes, fields, methods, etc. + */ +class UnknownApiException(message: String) : Exception(message), UserErrorException + +/** + * Exceptions related to invalid annotations -- e.g. more than one visibility annotation + * on a single API. + */ +class InvalidAnnotationException(message: String) : Exception(message), UserErrorException + +/** + * We use this for general "user" errors. + */ +class GeneralUserErrorException(message: String) : Exception(message), UserErrorException + +/** Base exception class for invalid command line arguments. */ +open class ArgumentsException(message: String?) : Exception(message), UserErrorException + +/** Thrown when the same annotation is used with different annotation arguments. */ +class DuplicateAnnotationException(annotationName: String?) : + ArgumentsException("Duplicate annotation specified: '$annotationName'") + +/** Thrown when an input file does not exist. */ +class InputFileNotFoundException(filename: String) : + ArgumentsException("File '$filename' not found") + +fun String.ensureFileExists(): String { + if (!File(this).exists()) { + throw InputFileNotFoundException(this) + } + return this +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGen.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGen.kt new file mode 100644 index 000000000000..6d8d7b768b91 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGen.kt @@ -0,0 +1,424 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen + +import com.android.hoststubgen.asm.ClassNodes +import com.android.hoststubgen.dumper.ApiDumper +import com.android.hoststubgen.filters.AnnotationBasedFilter +import com.android.hoststubgen.filters.ClassWidePolicyPropagatingFilter +import com.android.hoststubgen.filters.ConstantFilter +import com.android.hoststubgen.filters.DefaultHookInjectingFilter +import com.android.hoststubgen.filters.FilterPolicy +import com.android.hoststubgen.filters.FilterRemapper +import com.android.hoststubgen.filters.ImplicitOutputFilter +import com.android.hoststubgen.filters.KeepNativeFilter +import com.android.hoststubgen.filters.OutputFilter +import com.android.hoststubgen.filters.SanitizationFilter +import com.android.hoststubgen.filters.TextFileFilterPolicyParser +import com.android.hoststubgen.filters.printAsTextPolicy +import com.android.hoststubgen.utils.ClassFilter +import com.android.hoststubgen.visitors.BaseAdapter +import com.android.hoststubgen.visitors.PackageRedirectRemapper +import java.io.BufferedInputStream +import java.io.BufferedOutputStream +import java.io.FileOutputStream +import java.io.InputStream +import java.io.OutputStream +import java.io.PrintWriter +import java.util.zip.ZipEntry +import java.util.zip.ZipFile +import java.util.zip.ZipOutputStream +import org.objectweb.asm.ClassReader +import org.objectweb.asm.ClassVisitor +import org.objectweb.asm.ClassWriter +import org.objectweb.asm.commons.ClassRemapper +import org.objectweb.asm.commons.Remapper +import org.objectweb.asm.util.CheckClassAdapter + +/** + * Actual main class. + */ +class HostStubGen(val options: HostStubGenOptions) { + fun run() { + val errors = HostStubGenErrors() + val stats = HostStubGenStats() + + // Load all classes. + val allClasses = ClassNodes.loadClassStructures(options.inJar.get) + + // Dump the classes, if specified. + options.inputJarDumpFile.ifSet { + log.iTime("Dump file created at $it") { + PrintWriter(it).use { pw -> allClasses.dump(pw) } + } + } + + options.inputJarAsKeepAllFile.ifSet { + log.iTime("Dump file created at $it") { + PrintWriter(it).use { pw -> + allClasses.forEach { classNode -> + printAsTextPolicy(pw, classNode) + } + } + } + } + + // Build the filters. + val filter = buildFilter(errors, allClasses, options) + + val filterRemapper = FilterRemapper(filter) + + // Transform the jar. + convert( + options.inJar.get, + options.outJar.get, + filter, + options.enableClassChecker.get, + allClasses, + errors, + stats, + filterRemapper, + options.numShards.get, + options.shard.get, + ) + + // Dump statistics, if specified. + options.statsFile.ifSet { + log.iTime("Dump file created at $it") { + PrintWriter(it).use { pw -> stats.dumpOverview(pw) } + } + } + options.apiListFile.ifSet { + log.iTime("API list file created at $it") { + PrintWriter(it).use { pw -> + // TODO, when dumping a jar that's not framework-minus-apex.jar, we need to feed + // framework-minus-apex.jar so that we can dump inherited methods from it. + ApiDumper(pw, allClasses, null, filter).dump() + } + } + } + } + + /** + * Build the filter, which decides what classes/methods/fields should be put in stub or impl + * jars, and "how". (e.g. with substitution?) + */ + private fun buildFilter( + errors: HostStubGenErrors, + allClasses: ClassNodes, + options: HostStubGenOptions, + ): OutputFilter { + // We build a "chain" of multiple filters here. + // + // The filters are build in from "inside", meaning the first filter created here is + // the last filter used, so it has the least precedence. + // + // So, for example, the "remove" annotation, which is handled by AnnotationBasedFilter, + // can override a class-wide annotation, which is handled by + // ClassWidePolicyPropagatingFilter, and any annotations can be overridden by the + // text-file based filter, which is handled by parseTextFilterPolicyFile. + + // The first filter is for the default policy from the command line options. + var filter: OutputFilter = ConstantFilter(options.defaultPolicy.get, "default-by-options") + + // Next, we build a filter that preserves all native methods by default + filter = KeepNativeFilter(allClasses, filter) + + // Next, we need a filter that resolves "class-wide" policies. + // This is used when a member (methods, fields, nested classes) don't get any polices + // from upper filters. e.g. when a method has no annotations, then this filter will apply + // the class-wide policy, if any. (if not, we'll fall back to the above filter.) + filter = ClassWidePolicyPropagatingFilter(allClasses, filter) + + // Inject default hooks from options. + filter = DefaultHookInjectingFilter( + options.defaultClassLoadHook.get, + options.defaultMethodCallHook.get, + filter + ) + + val annotationAllowedClassesFilter = options.annotationAllowedClassesFile.get.let { file -> + if (file == null) { + ClassFilter.newNullFilter(true) // Allow all classes + } else { + ClassFilter.loadFromFile(file, false) + } + } + + // Next, Java annotation based filter. + filter = AnnotationBasedFilter( + errors, + allClasses, + options.keepAnnotations, + options.keepClassAnnotations, + options.throwAnnotations, + options.removeAnnotations, + options.ignoreAnnotations, + options.substituteAnnotations, + options.redirectAnnotations, + options.redirectionClassAnnotations, + options.classLoadHookAnnotations, + options.keepStaticInitializerAnnotations, + annotationAllowedClassesFilter, + filter + ) + + // Next, "text based" filter, which allows to override polices without touching + // the target code. + if (options.policyOverrideFiles.isNotEmpty()) { + val parser = TextFileFilterPolicyParser(allClasses, filter) + options.policyOverrideFiles.forEach(parser::parse) + filter = parser.createOutputFilter() + } + + // Apply the implicit filter. + filter = ImplicitOutputFilter(errors, allClasses, filter) + + // Add a final sanitization step. + filter = SanitizationFilter(errors, allClasses, filter) + + return filter + } + + /** + * Convert a JAR file into "stub" and "impl" JAR files. + */ + private fun convert( + inJar: String, + outJar: String?, + filter: OutputFilter, + enableChecker: Boolean, + classes: ClassNodes, + errors: HostStubGenErrors, + stats: HostStubGenStats, + remapper: Remapper?, + numShards: Int, + shard: Int + ) { + log.i("Converting %s into %s ...", inJar, outJar) + log.i("ASM CheckClassAdapter is %s", if (enableChecker) "enabled" else "disabled") + + log.iTime("Transforming jar") { + val packageRedirector = PackageRedirectRemapper(options.packageRedirects) + + var itemIndex = 0 + var numItemsProcessed = 0 + var numItems = -1 // == Unknown + + log.withIndent { + // Open the input jar file and process each entry. + ZipFile(inJar).use { inZip -> + + numItems = inZip.size() + val shardStart = numItems * shard / numShards + val shardNextStart = numItems * (shard + 1) / numShards + + maybeWithZipOutputStream(outJar) { outStream -> + val inEntries = inZip.entries() + while (inEntries.hasMoreElements()) { + val entry = inEntries.nextElement() + val inShard = (shardStart <= itemIndex) + && (itemIndex < shardNextStart) + itemIndex++ + if (!inShard) { + continue + } + convertSingleEntry( + inZip, entry, outStream, filter, + packageRedirector, remapper, enableChecker, + classes, errors, stats + ) + numItemsProcessed++ + } + log.i("Converted all entries.") + } + outJar?.let { log.i("Created: $it") } + } + } + log.i("%d / %d item(s) processed.", numItemsProcessed, numItems) + } + } + + private fun maybeWithZipOutputStream(filename: String?, block: (ZipOutputStream?) -> T): T { + if (filename == null) { + return block(null) + } + return ZipOutputStream(BufferedOutputStream(FileOutputStream(filename))).use(block) + } + + /** + * Convert a single ZIP entry, which may or may not be a class file. + */ + private fun convertSingleEntry( + inZip: ZipFile, + entry: ZipEntry, + outStream: ZipOutputStream?, + filter: OutputFilter, + packageRedirector: PackageRedirectRemapper, + remapper: Remapper?, + enableChecker: Boolean, + classes: ClassNodes, + errors: HostStubGenErrors, + stats: HostStubGenStats + ) { + log.d("Entry: %s", entry.name) + log.withIndent { + val name = entry.name + + // Just ignore all the directories. (TODO: make sure it's okay) + if (name.endsWith("/")) { + return + } + + // If it's a class, convert it. + if (name.endsWith(".class")) { + processSingleClass( + inZip, entry, outStream, filter, packageRedirector, + remapper, enableChecker, classes, errors, stats + ) + return + } + + // Handle other file types... + + // - *.uau seems to contain hidden API information. + // - *_compat_config.xml is also about compat-framework. + if (name.endsWith(".uau") || name.endsWith("_compat_config.xml")) { + log.d("Not needed: %s", entry.name) + return + } + + // Unknown type, we just copy it to both output zip files. + log.v("Copying: %s", entry.name) + outStream?.let { copyZipEntry(inZip, entry, it) } + } + } + + /** + * Copy a single ZIP entry to the output. + */ + private fun copyZipEntry( + inZip: ZipFile, + entry: ZipEntry, + out: ZipOutputStream, + ) { + // TODO: It seems like copying entries this way is _very_ slow, + // even with out.setLevel(0). Look for other ways to do it. + + inZip.getInputStream(entry).use { ins -> + // Copy unknown entries as is to the impl out. (but not to the stub out.) + val outEntry = ZipEntry(entry.name) + out.putNextEntry(outEntry) + ins.transferTo(out) + out.closeEntry() + } + } + + /** + * Convert a single class to "stub" and "impl". + */ + private fun processSingleClass( + inZip: ZipFile, + entry: ZipEntry, + outStream: ZipOutputStream?, + filter: OutputFilter, + packageRedirector: PackageRedirectRemapper, + remapper: Remapper?, + enableChecker: Boolean, + classes: ClassNodes, + errors: HostStubGenErrors, + stats: HostStubGenStats + ) { + val classInternalName = entry.name.replaceFirst("\\.class$".toRegex(), "") + val classPolicy = filter.getPolicyForClass(classInternalName) + if (classPolicy.policy == FilterPolicy.Remove) { + log.d("Removing class: %s %s", classInternalName, classPolicy) + return + } + // If we're applying a remapper, we need to rename the file too. + var newName = entry.name + remapper?.mapType(classInternalName)?.let { remappedName -> + if (remappedName != classInternalName) { + log.d("Renaming class file: %s -> %s", classInternalName, remappedName) + newName = "$remappedName.class" + } + } + + if (outStream != null) { + log.v("Creating class: %s Policy: %s", classInternalName, classPolicy) + log.withIndent { + BufferedInputStream(inZip.getInputStream(entry)).use { bis -> + val newEntry = ZipEntry(newName) + outStream.putNextEntry(newEntry) + convertClass( + classInternalName, bis, + outStream, filter, packageRedirector, remapper, + enableChecker, classes, errors, stats + ) + outStream.closeEntry() + } + } + } + } + + /** + * Convert a single class to either "stub" or "impl". + */ + private fun convertClass( + classInternalName: String, + input: InputStream, + out: OutputStream, + filter: OutputFilter, + packageRedirector: PackageRedirectRemapper, + remapper: Remapper?, + enableChecker: Boolean, + classes: ClassNodes, + errors: HostStubGenErrors, + stats: HostStubGenStats? + ) { + val cr = ClassReader(input) + + // COMPUTE_FRAMES wouldn't be happy if code uses + val flags = ClassWriter.COMPUTE_MAXS // or ClassWriter.COMPUTE_FRAMES + val cw = ClassWriter(flags) + + // Connect to the class writer + var outVisitor: ClassVisitor = cw + if (enableChecker) { + outVisitor = CheckClassAdapter(outVisitor) + } + + // Remapping should happen at the end. + remapper?.let { + outVisitor = ClassRemapper(outVisitor, remapper) + } + + val visitorOptions = BaseAdapter.Options( + errors = errors, + stats = stats, + enablePreTrace = options.enablePreTrace.get, + enablePostTrace = options.enablePostTrace.get, + ) + outVisitor = BaseAdapter.getVisitor( + classInternalName, classes, outVisitor, filter, + packageRedirector, visitorOptions + ) + + cr.accept(outVisitor, ClassReader.EXPAND_FRAMES) + val data = cw.toByteArray() + out.write(data) + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenErrors.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenErrors.kt new file mode 100644 index 000000000000..a218c5599553 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenErrors.kt @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen + +open class HostStubGenErrors { + open fun onErrorFound(message: String) { + // TODO: For now, we just throw as soon as any error is found, but eventually we should keep + // all errors and print them at the end. + throw GeneralUserErrorException(message) + } +} \ No newline at end of file diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenLogger.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenLogger.kt new file mode 100644 index 000000000000..4bcee409aaec --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenLogger.kt @@ -0,0 +1,320 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen + +import java.io.BufferedOutputStream +import java.io.FileOutputStream +import java.io.PrintWriter +import java.io.Writer + +val log: HostStubGenLogger = HostStubGenLogger().setConsoleLogLevel(LogLevel.Info) + +/** Logging level */ +enum class LogLevel { + None, + Error, + Warn, + Info, + Verbose, + Debug, +} + +/** + * Simple logging class. + * + * By default, it has no printers set. Use [setConsoleLogLevel] or [addFilePrinter] to actually + * write log. + */ +class HostStubGenLogger { + private var indentLevel: Int = 0 + get() = field + set(value) { + field = value + indent = " ".repeat(value) + } + private var indent: String = "" + + private val printers: MutableList = mutableListOf() + + private var consolePrinter: LogPrinter? = null + + private var maxLogLevel = LogLevel.None + + private fun updateMaxLogLevel() { + maxLogLevel = LogLevel.None + + printers.forEach { + if (maxLogLevel < it.logLevel) { + maxLogLevel = it.logLevel + } + } + } + + private fun addPrinter(printer: LogPrinter) { + printers.add(printer) + updateMaxLogLevel() + } + + private fun removePrinter(printer: LogPrinter) { + printers.remove(printer) + updateMaxLogLevel() + } + + fun setConsoleLogLevel(level: LogLevel): HostStubGenLogger { + // If there's already a console log printer set, remove it, and then add a new one + consolePrinter?.let { + removePrinter(it) + } + val cp = StreamPrinter(level, PrintWriter(System.out)) + addPrinter(cp) + consolePrinter = cp + + return this + } + + fun addFilePrinter(level: LogLevel, logFilename: String): HostStubGenLogger { + addPrinter(StreamPrinter(level, PrintWriter(BufferedOutputStream( + FileOutputStream(logFilename))))) + + log.i("Log file set: $logFilename for $level") + + return this + } + + /** Flush all the printers */ + fun flush() { + printers.forEach { it.flush() } + } + + fun indent() { + indentLevel++ + } + + fun unindent() { + if (indentLevel <= 0) { + throw IllegalStateException("Unbalanced unindent() call.") + } + indentLevel-- + } + + inline fun withIndent(block: () -> T): T { + try { + indent() + return block() + } finally { + unindent() + } + } + + fun isEnabled(level: LogLevel): Boolean { + return level.ordinal <= maxLogLevel.ordinal + } + + fun println(level: LogLevel, message: String) { + if (message.isEmpty()) { + return // Don't print an empty message. + } + printers.forEach { + if (it.logLevel.ordinal >= level.ordinal) { + it.println(level, indent, message) + } + } + } + + fun println(level: LogLevel, format: String, vararg args: Any?) { + if (isEnabled(level)) { + println(level, String.format(format, *args)) + } + } + + /** Log an error. */ + fun e(message: String) { + println(LogLevel.Error, message) + } + + /** Log an error. */ + fun e(format: String, vararg args: Any?) { + println(LogLevel.Error, format, *args) + } + + /** Log a warning. */ + fun w(message: String) { + println(LogLevel.Warn, message) + } + + /** Log a warning. */ + fun w(format: String, vararg args: Any?) { + println(LogLevel.Warn, format, *args) + } + + /** Log an info message. */ + fun i(message: String) { + println(LogLevel.Info, message) + } + + /** Log an info message. */ + fun i(format: String, vararg args: Any?) { + println(LogLevel.Info, format, *args) + } + + /** Log a verbose message. */ + fun v(message: String) { + println(LogLevel.Verbose, message) + } + + /** Log a verbose message. */ + fun v(format: String, vararg args: Any?) { + println(LogLevel.Verbose, format, *args) + } + + /** Log a debug message. */ + fun d(message: String) { + println(LogLevel.Debug, message) + } + + /** Log a debug message. */ + fun d(format: String, vararg args: Any?) { + println(LogLevel.Debug, format, *args) + } + + inline fun logTime(level: LogLevel, message: String, block: () -> T): Double { + var ret: Double = -1.0 + val start = System.currentTimeMillis() + try { + block() + } finally { + val end = System.currentTimeMillis() + ret = (end - start) / 1000.0 + if (isEnabled(level)) { + println(level, + String.format("%s: took %.1f second(s).", message, (end - start) / 1000.0)) + } + } + return ret + } + + /** Do an "i" log with how long it took. */ + inline fun iTime(message: String, block: () -> T): Double { + return logTime(LogLevel.Info, message, block) + } + + /** Do a "v" log with how long it took. */ + inline fun vTime(message: String, block: () -> T): Double { + return logTime(LogLevel.Verbose, message, block) + } + + /** Do a "d" log with how long it took. */ + inline fun dTime(message: String, block: () -> T): Double { + return logTime(LogLevel.Debug, message, block) + } + + /** + * Similar to the other "xTime" methods, but the message is not supposed to be printed. + * It's only used to measure the duration with the same interface as other log methods. + */ + inline fun nTime(block: () -> T): Double { + return logTime(LogLevel.Debug, "", block) + } + + inline fun forVerbose(block: () -> Unit) { + if (isEnabled(LogLevel.Verbose)) { + block() + } + } + + inline fun forDebug(block: () -> Unit) { + if (isEnabled(LogLevel.Debug)) { + block() + } + } + + /** Return a Writer for a given log level. */ + fun getWriter(level: LogLevel): Writer { + return MultiplexingWriter(level) + } + + private inner class MultiplexingWriter(val level: LogLevel) : Writer() { + private inline fun forPrinters(callback: (LogPrinter) -> Unit) { + printers.forEach { + if (it.logLevel.ordinal >= level.ordinal) { + callback(it) + } + } + } + + override fun close() { + flush() + } + + override fun flush() { + forPrinters { + it.flush() + } + } + + override fun write(cbuf: CharArray, off: Int, len: Int) { + // TODO Apply indent + forPrinters { + it.write(cbuf, off, len) + } + } + } + + /** + * Handle log-related command line arguments. + */ + fun maybeHandleCommandLineArg(currentArg: String, nextArgProvider: () -> String): Boolean { + when (currentArg) { + "-v", "--verbose" -> setConsoleLogLevel(LogLevel.Verbose) + "-d", "--debug" -> setConsoleLogLevel(LogLevel.Debug) + "-q", "--quiet" -> setConsoleLogLevel(LogLevel.None) + "--verbose-log" -> addFilePrinter(LogLevel.Verbose, nextArgProvider()) + "--debug-log" -> addFilePrinter(LogLevel.Debug, nextArgProvider()) + else -> return false + } + return true + } +} + +private interface LogPrinter { + val logLevel: LogLevel + + fun println(logLevel: LogLevel, indent: String, message: String) + + // TODO: This should be removed once MultiplexingWriter starts applying indent, at which point + // println() should be used instead. + fun write(cbuf: CharArray, off: Int, len: Int) + + fun flush() +} + +private class StreamPrinter( + override val logLevel: LogLevel, + val out: PrintWriter, +) : LogPrinter { + override fun println(logLevel: LogLevel, indent: String, message: String) { + out.print(indent) + out.println(message) + } + + override fun write(cbuf: CharArray, off: Int, len: Int) { + out.write(cbuf, off, len) + } + + override fun flush() { + out.flush() + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenMain.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenMain.kt new file mode 100644 index 000000000000..85064661cd2b --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenMain.kt @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +@file:JvmName("HostStubGenMain") + +package com.android.hoststubgen + +import java.io.PrintWriter + +/** + * Entry point. + */ +fun main(args: Array) { + executableName = "HostStubGen" + runMainWithBoilerplate { + // Parse the command line arguments. + var clanupOnError = false + try { + val options = HostStubGenOptions.parseArgs(args) + clanupOnError = options.cleanUpOnError.get + + log.v("$executableName started") + log.v("Options: $options") + + // Run. + HostStubGen(options).run() + } catch (e: Throwable) { + if (clanupOnError) { + TODO("Remove output jars here") + } + throw e + } + } +} + +inline fun runMainWithBoilerplate(realMain: () -> Unit) { + var success = false + + try { + realMain() + + success = true + } catch (e: Throwable) { + log.e("$executableName: Error: ${e.message}") + if (e !is UserErrorException) { + e.printStackTrace(PrintWriter(log.getWriter(LogLevel.Error))) + } + } finally { + log.i("$executableName finished") + log.flush() + } + + System.exit(if (success) 0 else 1 ) +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenOptions.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenOptions.kt new file mode 100644 index 000000000000..55e853e3e2fb --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenOptions.kt @@ -0,0 +1,384 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen + +import com.android.hoststubgen.filters.FilterPolicy +import java.io.BufferedReader +import java.io.FileReader + +/** + * A single value that can only set once. + */ +open class SetOnce(private var value: T) { + class SetMoreThanOnceException : Exception() + + private var set = false + + fun set(v: T): T { + if (set) { + throw SetMoreThanOnceException() + } + if (v == null) { + throw NullPointerException("This shouldn't happen") + } + set = true + value = v + return v + } + + val get: T + get() = this.value + + val isSet: Boolean + get() = this.set + + fun ifSet(block: (T & Any) -> R): R? { + if (isSet) { + return block(value!!) + } + return null + } + + override fun toString(): String { + return "$value" + } +} + +class IntSetOnce(value: Int) : SetOnce(value) { + fun set(v: String): Int { + try { + return this.set(v.toInt()) + } catch (e: NumberFormatException) { + throw ArgumentsException("Invalid integer $v") + } + } +} + +/** + * Options that can be set from command line arguments. + */ +class HostStubGenOptions( + /** Input jar file*/ + var inJar: SetOnce = SetOnce(""), + + /** Output jar file */ + var outJar: SetOnce = SetOnce(null), + + var inputJarDumpFile: SetOnce = SetOnce(null), + + var inputJarAsKeepAllFile: SetOnce = SetOnce(null), + + var keepAnnotations: MutableSet = mutableSetOf(), + var throwAnnotations: MutableSet = mutableSetOf(), + var removeAnnotations: MutableSet = mutableSetOf(), + var ignoreAnnotations: MutableSet = mutableSetOf(), + var keepClassAnnotations: MutableSet = mutableSetOf(), + var redirectAnnotations: MutableSet = mutableSetOf(), + + var substituteAnnotations: MutableSet = mutableSetOf(), + var redirectionClassAnnotations: MutableSet = mutableSetOf(), + var classLoadHookAnnotations: MutableSet = mutableSetOf(), + var keepStaticInitializerAnnotations: MutableSet = mutableSetOf(), + + var packageRedirects: MutableList> = mutableListOf(), + + var annotationAllowedClassesFile: SetOnce = SetOnce(null), + + var defaultClassLoadHook: SetOnce = SetOnce(null), + var defaultMethodCallHook: SetOnce = SetOnce(null), + + var policyOverrideFiles: MutableList = mutableListOf(), + + var defaultPolicy: SetOnce = SetOnce(FilterPolicy.Remove), + + var cleanUpOnError: SetOnce = SetOnce(false), + + var enableClassChecker: SetOnce = SetOnce(false), + var enablePreTrace: SetOnce = SetOnce(false), + var enablePostTrace: SetOnce = SetOnce(false), + + var statsFile: SetOnce = SetOnce(null), + + var apiListFile: SetOnce = SetOnce(null), + + var numShards: IntSetOnce = IntSetOnce(1), + var shard: IntSetOnce = IntSetOnce(0), +) { + companion object { + + private fun parsePackageRedirect(fromColonTo: String): Pair { + val colon = fromColonTo.indexOf(':') + if ((colon < 1) || (colon + 1 >= fromColonTo.length)) { + throw ArgumentsException("--package-redirect must be a colon-separated string") + } + // TODO check for duplicates + return Pair(fromColonTo.substring(0, colon), fromColonTo.substring(colon + 1)) + } + + fun parseArgs(args: Array): HostStubGenOptions { + val ret = HostStubGenOptions() + + val ai = ArgIterator.withAtFiles(args) + + var allAnnotations = mutableSetOf() + + fun ensureUniqueAnnotation(name: String): String { + if (!allAnnotations.add(name)) { + throw DuplicateAnnotationException(ai.current) + } + return name + } + + while (true) { + val arg = ai.nextArgOptional() ?: break + + // Define some shorthands... + fun nextArg(): String = ai.nextArgRequired(arg) + fun MutableSet.addUniqueAnnotationArg(): String = + nextArg().also { this += ensureUniqueAnnotation(it) } + + if (log.maybeHandleCommandLineArg(arg) { nextArg() }) { + continue + } + try { + when (arg) { + // TODO: Write help + "-h", "--help" -> TODO("Help is not implemented yet") + + "--in-jar" -> ret.inJar.set(nextArg()).ensureFileExists() + // We support both arguments because some AOSP dependencies + // still use the old argument + "--out-jar", "--out-impl-jar" -> ret.outJar.set(nextArg()) + + "--policy-override-file" -> + ret.policyOverrideFiles.add(nextArg().ensureFileExists()) + + "--clean-up-on-error" -> ret.cleanUpOnError.set(true) + "--no-clean-up-on-error" -> ret.cleanUpOnError.set(false) + + "--default-remove" -> ret.defaultPolicy.set(FilterPolicy.Remove) + "--default-throw" -> ret.defaultPolicy.set(FilterPolicy.Throw) + "--default-keep" -> ret.defaultPolicy.set(FilterPolicy.Keep) + + "--keep-annotation" -> + ret.keepAnnotations.addUniqueAnnotationArg() + + "--keep-class-annotation" -> + ret.keepClassAnnotations.addUniqueAnnotationArg() + + "--throw-annotation" -> + ret.throwAnnotations.addUniqueAnnotationArg() + + "--remove-annotation" -> + ret.removeAnnotations.addUniqueAnnotationArg() + + "--ignore-annotation" -> + ret.ignoreAnnotations.addUniqueAnnotationArg() + + "--substitute-annotation" -> + ret.substituteAnnotations.addUniqueAnnotationArg() + + "--redirect-annotation" -> + ret.redirectAnnotations.addUniqueAnnotationArg() + + "--redirection-class-annotation" -> + ret.redirectionClassAnnotations.addUniqueAnnotationArg() + + "--class-load-hook-annotation" -> + ret.classLoadHookAnnotations.addUniqueAnnotationArg() + + "--keep-static-initializer-annotation" -> + ret.keepStaticInitializerAnnotations.addUniqueAnnotationArg() + + "--package-redirect" -> + ret.packageRedirects += parsePackageRedirect(nextArg()) + + "--annotation-allowed-classes-file" -> + ret.annotationAllowedClassesFile.set(nextArg()) + + "--default-class-load-hook" -> + ret.defaultClassLoadHook.set(nextArg()) + + "--default-method-call-hook" -> + ret.defaultMethodCallHook.set(nextArg()) + + "--gen-keep-all-file" -> + ret.inputJarAsKeepAllFile.set(nextArg()) + + // Following options are for debugging. + "--enable-class-checker" -> ret.enableClassChecker.set(true) + "--no-class-checker" -> ret.enableClassChecker.set(false) + + "--enable-pre-trace" -> ret.enablePreTrace.set(true) + "--no-pre-trace" -> ret.enablePreTrace.set(false) + + "--enable-post-trace" -> ret.enablePostTrace.set(true) + "--no-post-trace" -> ret.enablePostTrace.set(false) + + "--gen-input-dump-file" -> ret.inputJarDumpFile.set(nextArg()) + + "--stats-file" -> ret.statsFile.set(nextArg()) + "--supported-api-list-file" -> ret.apiListFile.set(nextArg()) + + "--num-shards" -> ret.numShards.set(nextArg()).also { + if (it < 1) { + throw ArgumentsException("$arg must be positive integer") + } + } + "--shard-index" -> ret.shard.set(nextArg()).also { + if (it < 0) { + throw ArgumentsException("$arg must be positive integer or zero") + } + } + + else -> throw ArgumentsException("Unknown option: $arg") + } + } catch (e: SetOnce.SetMoreThanOnceException) { + throw ArgumentsException("Duplicate or conflicting argument found: $arg") + } + } + + if (!ret.inJar.isSet) { + throw ArgumentsException("Required option missing: --in-jar") + } + if (!ret.outJar.isSet) { + log.w("--out-jar is not set. $executableName will not generate jar files.") + } + if (ret.numShards.isSet != ret.shard.isSet) { + throw ArgumentsException("--num-shards and --shard-index must be used together") + } + + if (ret.numShards.isSet) { + if (ret.shard.get >= ret.numShards.get) { + throw ArgumentsException("--shard-index must be smaller than --num-shards") + } + } + + return ret + } + } + + override fun toString(): String { + return """ + HostStubGenOptions{ + inJar='$inJar', + outJar='$outJar', + inputJarDumpFile=$inputJarDumpFile, + inputJarAsKeepAllFile=$inputJarAsKeepAllFile, + keepAnnotations=$keepAnnotations, + throwAnnotations=$throwAnnotations, + removeAnnotations=$removeAnnotations, + ignoreAnnotations=$ignoreAnnotations, + keepClassAnnotations=$keepClassAnnotations, + substituteAnnotations=$substituteAnnotations, + nativeSubstituteAnnotations=$redirectionClassAnnotations, + classLoadHookAnnotations=$classLoadHookAnnotations, + keepStaticInitializerAnnotations=$keepStaticInitializerAnnotations, + packageRedirects=$packageRedirects, + annotationAllowedClassesFile=$annotationAllowedClassesFile, + defaultClassLoadHook=$defaultClassLoadHook, + defaultMethodCallHook=$defaultMethodCallHook, + policyOverrideFiles=${policyOverrideFiles.toTypedArray().contentToString()}, + defaultPolicy=$defaultPolicy, + cleanUpOnError=$cleanUpOnError, + enableClassChecker=$enableClassChecker, + enablePreTrace=$enablePreTrace, + enablePostTrace=$enablePostTrace, + statsFile=$statsFile, + apiListFile=$apiListFile, + numShards=$numShards, + shard=$shard, + } + """.trimIndent() + } +} + +class ArgIterator( + private val args: List, + private var currentIndex: Int = -1 +) { + val current: String + get() = args.get(currentIndex) + + /** + * Get the next argument, or [null] if there's no more arguments. + */ + fun nextArgOptional(): String? { + if ((currentIndex + 1) >= args.size) { + return null + } + return args.get(++currentIndex) + } + + /** + * Get the next argument, or throw if + */ + fun nextArgRequired(argName: String): String { + nextArgOptional().let { + if (it == null) { + throw ArgumentsException("Missing parameter for option $argName") + } + if (it.isEmpty()) { + throw ArgumentsException("Parameter can't be empty for option $argName") + } + return it + } + } + + companion object { + fun withAtFiles(args: Array): ArgIterator { + return ArgIterator(expandAtFiles(args)) + } + } +} + +/** + * Scan the arguments, and if any of them starts with an `@`, then load from the file + * and use its content as arguments. + * + * In this file, each line is treated as a single argument. + * + * The file can contain '#' as comments. + */ +private fun expandAtFiles(args: Array): List { + val ret = mutableListOf() + + args.forEach { arg -> + if (!arg.startsWith('@')) { + ret += arg + return@forEach + } + // Read from the file, and add each line to the result. + val filename = arg.substring(1).ensureFileExists() + + log.v("Expanding options file $filename") + + BufferedReader(FileReader(filename)).use { reader -> + while (true) { + var line = reader.readLine() + if (line == null) { + break // EOF + } + + line = normalizeTextLine(line) + if (line.isNotEmpty()) { + ret += line + } + } + } + } + return ret +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenStats.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenStats.kt new file mode 100644 index 000000000000..9045db210495 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/HostStubGenStats.kt @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen + +import com.android.hoststubgen.asm.getOuterClassNameFromFullClassName +import com.android.hoststubgen.asm.getPackageNameFromFullClassName +import com.android.hoststubgen.filters.FilterPolicyWithReason +import org.objectweb.asm.Opcodes +import java.io.PrintWriter + +open class HostStubGenStats { + data class Stats( + var supported: Int = 0, + var total: Int = 0, + val children: MutableMap = mutableMapOf(), + ) + + private val stats = mutableMapOf() + + data class Api( + val fullClassName: String, + val methodName: String, + val methodDesc: String, + ) + + private val apis = mutableListOf() + + fun onVisitPolicyForMethod( + fullClassName: String, + methodName: String, + descriptor: String, + policy: FilterPolicyWithReason, + access: Int + ) { + if (policy.policy.isSupported) { + apis.add(Api(fullClassName, methodName, descriptor)) + } + + // Ignore methods that aren't public + if ((access and Opcodes.ACC_PUBLIC) == 0) return + // Ignore methods that are abstract + if ((access and Opcodes.ACC_ABSTRACT) != 0) return + // Ignore methods where policy isn't relevant + if (policy.isIgnoredForStats) return + + val packageName = getPackageNameFromFullClassName(fullClassName) + val className = getOuterClassNameFromFullClassName(fullClassName) + + // Ignore methods for certain generated code + if (className.endsWith("Proto") + or className.endsWith("ProtoEnums") + or className.endsWith("LogTags") + or className.endsWith("StatsLog")) { + return + } + + val packageStats = stats.getOrPut(packageName) { Stats() } + val classStats = packageStats.children.getOrPut(className) { Stats() } + + if (policy.policy.isSupported) { + packageStats.supported += 1 + classStats.supported += 1 + } + packageStats.total += 1 + classStats.total += 1 + } + + fun dumpOverview(pw: PrintWriter) { + pw.printf("PackageName,ClassName,SupportedMethods,TotalMethods\n") + stats.toSortedMap().forEach { (packageName, packageStats) -> + if (packageStats.supported > 0) { + packageStats.children.toSortedMap().forEach { (className, classStats) -> + pw.printf("%s,%s,%d,%d\n", packageName, className, + classStats.supported, classStats.total) + } + } + } + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/Utils.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/Utils.kt new file mode 100644 index 000000000000..10179eefcb95 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/Utils.kt @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen + +/** + * Name of this executable. Set it in the main method. + */ +var executableName = "[command name not set]" + +/** + * A regex that maches whitespate. + */ +val whitespaceRegex = """\s+""".toRegex() + +/** + * Remove the comment ('#' and following) and surrounding whitespace from a line. + */ +fun normalizeTextLine(s: String): String { + // Remove # and after. (comment) + val pos = s.indexOf('#') + val uncommented = if (pos < 0) s else s.substring(0, pos) + + // Remove surrounding whitespace. + return uncommented.trim() +} + +/** + * Concatenate list [a] and [b] and return it. As an optimization, it returns an input + * [List] as-is if the other [List] is empty, so do not modify input [List]'s. + */ +fun addLists(a: List, b: List): List { + if (a.isEmpty()) { + return b + } + if (b.isEmpty()) { + return a + } + return a + b +} + +/** + * Add element [b] to list [a] if [b] is not null. Otherwise, just return [a]. + * (because the method may return [a] as-is, do not modify it after passing it.) + */ +fun addNonNullElement(a: List, b: T?): List { + if (b == null) { + return a + } + if (a.isEmpty()) { + return listOf(b) + } + return a + b +} + + +/** + * Exception for a parse error in a file + */ +class ParseException : Exception, UserErrorException { + val hasSourceInfo: Boolean + + constructor(message: String) : super(message) { + hasSourceInfo = false + } + + constructor(message: String, file: String, line: Int) : + super("$message in file $file line $line") { + hasSourceInfo = true + } + + fun withSourceInfo(filename: String, lineNo: Int): ParseException { + if (hasSourceInfo) { + return this // Already has source information. + } else { + return ParseException(this.message ?: "", filename, lineNo) + } + } +} + +/** + * Escape a string for a CSV field. + */ +fun csvEscape(value: String): String { + return "\"" + value.replace("\"", "\"\"") + "\"" +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/asm/AsmUtils.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/asm/AsmUtils.kt new file mode 100644 index 000000000000..a02082d12934 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/asm/AsmUtils.kt @@ -0,0 +1,478 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.asm + +import com.android.hoststubgen.ClassParseException +import com.android.hoststubgen.HostStubGenInternalException +import org.objectweb.asm.ClassVisitor +import org.objectweb.asm.FieldVisitor +import org.objectweb.asm.MethodVisitor +import org.objectweb.asm.Opcodes +import org.objectweb.asm.Type +import org.objectweb.asm.tree.AnnotationNode +import org.objectweb.asm.tree.ClassNode +import org.objectweb.asm.tree.FieldNode +import org.objectweb.asm.tree.MethodNode + + +/** Name of the class initializer method. */ +const val CLASS_INITIALIZER_NAME = "" + +/** Descriptor of the class initializer method. */ +const val CLASS_INITIALIZER_DESC = "()V" + +/** Name of constructors. */ +const val CTOR_NAME = "" + +/** + * Find any of [set] from the list of visible / invisible annotations. + */ +fun findAnyAnnotation( + set: Set, + visibleAnnotations: List?, + invisibleAnnotations: List?, +): AnnotationNode? { + return visibleAnnotations?.find { it.desc in set } + ?: invisibleAnnotations?.find { it.desc in set } +} + +fun ClassNode.findAnyAnnotation(set: Set): AnnotationNode? { + return findAnyAnnotation(set, this.visibleAnnotations, this.invisibleAnnotations) +} + +fun MethodNode.findAnyAnnotation(set: Set): AnnotationNode? { + return findAnyAnnotation(set, this.visibleAnnotations, this.invisibleAnnotations) +} + +fun FieldNode.findAnyAnnotation(set: Set): AnnotationNode? { + return findAnyAnnotation(set, this.visibleAnnotations, this.invisibleAnnotations) +} + +fun findAllAnnotations( + set: Set, + visibleAnnotations: List?, + invisibleAnnotations: List? +): List { + return (visibleAnnotations ?: emptyList()).filter { it.desc in set } + + (invisibleAnnotations ?: emptyList()).filter { it.desc in set } +} + +fun ClassNode.findAllAnnotations(set: Set): List { + return findAllAnnotations(set, this.visibleAnnotations, this.invisibleAnnotations) +} + +fun MethodNode.findAllAnnotations(set: Set): List { + return findAllAnnotations(set, this.visibleAnnotations, this.invisibleAnnotations) +} + +fun FieldNode.findAllAnnotations(set: Set): List { + return findAllAnnotations(set, this.visibleAnnotations, this.invisibleAnnotations) +} + +fun findAnnotationValueAsObject( + an: AnnotationNode, + propertyName: String, + expectedTypeHumanReadableName: String, + converter: (Any?) -> T?, +): T? { + for (i in 0..(an.values?.size ?: 0) - 2 step 2) { + val name = an.values[i] + + if (name != propertyName) { + continue + } + val value = an.values[i + 1] + if (value == null) { + return null + } + + try { + return converter(value) + } catch (e: ClassCastException) { + throw ClassParseException( + "The type of '$propertyName' in annotation @${an.desc} must be " + + "$expectedTypeHumanReadableName, but is ${value?.javaClass?.canonicalName}") + } + } + return null +} + +fun findAnnotationValueAsString(an: AnnotationNode, propertyName: String): String? { + return findAnnotationValueAsObject(an, propertyName, "String", {it as String}) +} + +fun findAnnotationValueAsType(an: AnnotationNode, propertyName: String): Type? { + return findAnnotationValueAsObject(an, propertyName, "Class", {it as Type}) +} + + +val periodOrSlash = charArrayOf('.', '/') + +fun getPackageNameFromFullClassName(fullClassName: String): String { + val pos = fullClassName.lastIndexOfAny(periodOrSlash) + if (pos == -1) { + return "" + } else { + return fullClassName.substring(0, pos) + } +} + +fun getClassNameFromFullClassName(fullClassName: String): String { + val pos = fullClassName.lastIndexOfAny(periodOrSlash) + if (pos == -1) { + return fullClassName + } else { + return fullClassName.substring(pos + 1) + } +} + +fun getOuterClassNameFromFullClassName(fullClassName: String): String { + val start = fullClassName.lastIndexOfAny(periodOrSlash) + val end = fullClassName.indexOf('$') + if (end == -1) { + return fullClassName.substring(start + 1) + } else { + return fullClassName.substring(start + 1, end) + } +} + +/** + * If [className] is a fully qualified name, just return it. + * Otherwise, prepend [defaultPackageName]. + */ +fun resolveClassNameWithDefaultPackage(className: String, defaultPackageName: String): String { + if (className.contains('.') || className.contains('/')) { + return className + } + return "$defaultPackageName.$className" +} + +fun splitWithLastPeriod(name: String): Pair? { + val pos = name.lastIndexOf('.') + if (pos < 0) { + return null + } + return Pair(name.substring(0, pos), name.substring(pos + 1)) +} + +fun String.startsWithAny(vararg prefixes: String): Boolean { + prefixes.forEach { + if (this.startsWith(it)) { + return true + } + } + return false +} + +fun String.endsWithAny(vararg suffixes: String): Boolean { + suffixes.forEach { + if (this.endsWith(it)) { + return true + } + } + return false +} + +fun String.toJvmClassName(): String { + return this.replace('.', '/') +} + +fun String.toHumanReadableClassName(): String { + return this.replace('/', '.') +} + +fun String.toHumanReadableMethodName(): String { + return this.replace('/', '.') +} + +fun zipEntryNameToClassName(entryFilename: String): String? { + val suffix = ".class" + if (!entryFilename.endsWith(suffix)) { + return null + } + return entryFilename.substring(0, entryFilename.length - suffix.length) +} + +private val numericalInnerClassName = """.*\$\d+$""".toRegex() + +fun isAnonymousInnerClass(cn: ClassNode): Boolean { + // TODO: Is there a better way? + return cn.name.matches(numericalInnerClassName) +} + +/** + * Write bytecode to push all the method arguments to the stack. + * The number of arguments and their type are taken from [methodDescriptor]. + */ +fun writeByteCodeToPushArguments( + methodDescriptor: String, + writer: MethodVisitor, + argOffset: Int = 0, + ) { + var i = argOffset - 1 + Type.getArgumentTypes(methodDescriptor).forEach { type -> + i++ + + // See https://en.wikipedia.org/wiki/List_of_Java_bytecode_instructions + + // Note, long and double will consume two local variable spaces, so the extra `i++`. + when (type) { + Type.VOID_TYPE -> throw HostStubGenInternalException("VOID_TYPE not expected") + Type.BOOLEAN_TYPE, Type.CHAR_TYPE, Type.BYTE_TYPE, Type.SHORT_TYPE, Type.INT_TYPE + -> writer.visitVarInsn(Opcodes.ILOAD, i) + Type.FLOAT_TYPE -> writer.visitVarInsn(Opcodes.FLOAD, i) + Type.LONG_TYPE -> writer.visitVarInsn(Opcodes.LLOAD, i++) + Type.DOUBLE_TYPE -> writer.visitVarInsn(Opcodes.DLOAD, i++) + else -> writer.visitVarInsn(Opcodes.ALOAD, i) + } + } +} + +/** + * Write bytecode to "RETURN" that matches the method's return type, according to + * [methodDescriptor]. + */ +fun writeByteCodeToReturn(methodDescriptor: String, writer: MethodVisitor) { + Type.getReturnType(methodDescriptor).let { type -> + // See https://en.wikipedia.org/wiki/List_of_Java_bytecode_instructions + when (type) { + Type.VOID_TYPE -> writer.visitInsn(Opcodes.RETURN) + Type.BOOLEAN_TYPE, Type.CHAR_TYPE, Type.BYTE_TYPE, Type.SHORT_TYPE, Type.INT_TYPE + -> writer.visitInsn(Opcodes.IRETURN) + Type.FLOAT_TYPE -> writer.visitInsn(Opcodes.FRETURN) + Type.LONG_TYPE -> writer.visitInsn(Opcodes.LRETURN) + Type.DOUBLE_TYPE -> writer.visitInsn(Opcodes.DRETURN) + else -> writer.visitInsn(Opcodes.ARETURN) + } + } +} + +/** + * Given a method descriptor, insert an [argType] as the first argument to it. + */ +fun prependArgTypeToMethodDescriptor(methodDescriptor: String, classInternalName: String): String { + val returnType = Type.getReturnType(methodDescriptor) + val argTypes = Type.getArgumentTypes(methodDescriptor).toMutableList() + + argTypes.add(0, Type.getType("L" + classInternalName + ";")) + + return Type.getMethodDescriptor(returnType, *argTypes.toTypedArray()) +} + +/** + * Return the "visibility" modifier from an `access` integer. + * + * (see https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.1-200-E.1) + */ +fun getVisibilityModifier(access: Int): Int { + return access and (Opcodes.ACC_PUBLIC or Opcodes.ACC_PRIVATE or Opcodes.ACC_PROTECTED) +} + +/** + * Return true if an `access` integer is "private" or "package private". + */ +fun isVisibilityPrivateOrPackagePrivate(access: Int): Boolean { + return when (getVisibilityModifier(access)) { + 0 -> true // Package private. + Opcodes.ACC_PRIVATE -> true + else -> false + } +} + +enum class Visibility { + PRIVATE, + PACKAGE_PRIVATE, + PROTECTED, + PUBLIC; + + companion object { + fun fromAccess(access: Int): Visibility { + if ((access and Opcodes.ACC_PUBLIC) != 0) { + return PUBLIC + } + if ((access and Opcodes.ACC_PROTECTED) != 0) { + return PROTECTED + } + if ((access and Opcodes.ACC_PRIVATE) != 0) { + return PRIVATE + } + + return PACKAGE_PRIVATE + } + } +} + +fun ClassNode.isEnum(): Boolean { + return (this.access and Opcodes.ACC_ENUM) != 0 +} + +fun ClassNode.isAnnotation(): Boolean { + return (this.access and Opcodes.ACC_ANNOTATION) != 0 +} + +fun ClassNode.isSynthetic(): Boolean { + return (this.access and Opcodes.ACC_SYNTHETIC) != 0 +} + +fun MethodNode.isSynthetic(): Boolean { + return (this.access and Opcodes.ACC_SYNTHETIC) != 0 +} + +fun MethodNode.isStatic(): Boolean { + return (this.access and Opcodes.ACC_STATIC) != 0 +} + +fun MethodNode.isPublic(): Boolean { + return (this.access and Opcodes.ACC_PUBLIC) != 0 +} + +fun MethodNode.isNative(): Boolean { + return (this.access and Opcodes.ACC_NATIVE) != 0 +} + +fun MethodNode.isSpecial(): Boolean { + return CTOR_NAME == this.name || CLASS_INITIALIZER_NAME == this.name +} + +fun FieldNode.isEnum(): Boolean { + return (this.access and Opcodes.ACC_ENUM) != 0 +} + +fun FieldNode.isSynthetic(): Boolean { + return (this.access and Opcodes.ACC_SYNTHETIC) != 0 +} + +fun ClassNode.getVisibility(): Visibility { + return Visibility.fromAccess(this.access) +} + +fun MethodNode.getVisibility(): Visibility { + return Visibility.fromAccess(this.access) +} + +fun FieldNode.getVisibility(): Visibility { + return Visibility.fromAccess(this.access) +} + +/** Return the [access] flags without the visibility */ +fun clearVisibility(access: Int): Int { + return access and (Opcodes.ACC_PUBLIC or Opcodes.ACC_PROTECTED or Opcodes.ACC_PRIVATE).inv() +} + +/** Return the visibility part of the [access] flags */ +fun getVisibility(access: Int): Int { + return access and (Opcodes.ACC_PUBLIC or Opcodes.ACC_PROTECTED or Opcodes.ACC_PRIVATE) +} + + +/* + +Dump of the members of TinyFrameworkEnumSimple: + +class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple keep + field Cat keep (ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM) + field Dog keep + field $VALUES keep (ACC_PRIVATE, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC) + + method values ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; keep + ^- NOT synthetic (ACC_PUBLIC, ACC_STATIC) + method valueOf (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; keep + ^- NOT synthetic (ACC_PUBLIC, ACC_STATIC) + method (Ljava/lang/String;I)V keep + ^- NOT synthetic (ACC_PRIVATE) + + method $values ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; keep + (ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC) + method ()V keep + +Dump of the members of TinyFrameworkEnumSimple: + +class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex keep + field RED keep + field BLUE keep + field GREEN keep + field mLongName keep + field mShortName keep + field $VALUES keep + method values ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; keep + method valueOf (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; keep + method (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V keep + method getLongName ()Ljava/lang/String; keep + method getShortName ()Ljava/lang/String; keep + method $values ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; keep + method ()V keep + + */ + +fun isAutoGeneratedEnumMember(mn: MethodNode): Boolean { + if (mn.isSynthetic()) { + return true + } + if (mn.name == "" && mn.desc == "(Ljava/lang/String;I)V") { + return true + } + if (mn.name == "" && mn.desc == "()V") { + return true + } + if (mn.name == "values" && mn.desc.startsWith("()")) { + return true + } + if (mn.name == "valueOf" && mn.desc.startsWith("(Ljava/lang/String;)")) { + return true + } + + return false +} + +fun isAutoGeneratedEnumMember(fn: FieldNode): Boolean { + if (fn.isSynthetic() || fn.isEnum()) { + return true + } + return false +} + +/** + * Class to help handle [ClassVisitor], [MethodVisitor] and [FieldVisitor] in a unified way. + */ +abstract class UnifiedVisitor { + abstract fun visitAnnotation(descriptor: String, visible: Boolean) + + companion object { + fun on(target: ClassVisitor): UnifiedVisitor { + return object : UnifiedVisitor() { + override fun visitAnnotation(descriptor: String, visible: Boolean) { + target.visitAnnotation(descriptor, visible) + } + } + } + + fun on(target: MethodVisitor): UnifiedVisitor { + return object : UnifiedVisitor() { + override fun visitAnnotation(descriptor: String, visible: Boolean) { + target.visitAnnotation(descriptor, visible) + } + } + } + + fun on(target: FieldVisitor): UnifiedVisitor { + return object : UnifiedVisitor() { + override fun visitAnnotation(descriptor: String, visible: Boolean) { + target.visitAnnotation(descriptor, visible) + } + } + } + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/asm/ClassNodes.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/asm/ClassNodes.kt new file mode 100644 index 000000000000..e2647eb13ed3 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/asm/ClassNodes.kt @@ -0,0 +1,273 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.asm + +import com.android.hoststubgen.ClassParseException +import com.android.hoststubgen.InvalidJarFileException +import com.android.hoststubgen.log +import org.objectweb.asm.ClassReader +import org.objectweb.asm.tree.AnnotationNode +import org.objectweb.asm.tree.ClassNode +import org.objectweb.asm.tree.FieldNode +import org.objectweb.asm.tree.MethodNode +import org.objectweb.asm.tree.TypeAnnotationNode +import java.io.BufferedInputStream +import java.io.PrintWriter +import java.util.Arrays +import java.util.concurrent.Executors +import java.util.concurrent.TimeUnit +import java.util.concurrent.atomic.AtomicReference +import java.util.function.Consumer +import java.util.zip.ZipEntry +import java.util.zip.ZipFile + +/** + * Stores all classes loaded from a jar file, in a form of [ClassNode] + */ +class ClassNodes { + val mAllClasses: MutableMap = HashMap() + + /** + * Total number of classes registered. + */ + val size: Int + get() = mAllClasses.size + + /** Add a [ClassNode] */ + fun addClass(cn: ClassNode): Boolean { + if (mAllClasses.containsKey(cn.name)) { + return false + } + mAllClasses[cn.name.toJvmClassName()] = cn + return true + } + + /** Get a class's [ClassNodes] (which may not exist) */ + fun findClass(name: String): ClassNode? { + return mAllClasses[name.toJvmClassName()] + } + + /** Get a class's [ClassNodes] (which must exists) */ + fun getClass(name: String): ClassNode { + return findClass(name) ?: throw ClassParseException("Class $name not found") + } + + /** @return whether a class exists or not */ + fun hasClass(name: String): Boolean { + return mAllClasses.containsKey(name.toJvmClassName()) + } + + /** Find a field, which may not exist. */ + fun findField( + className: String, + fieldName: String, + ): FieldNode? { + return findClass(className)?.fields?.firstOrNull { it.name == fieldName }?.let { fn -> + return fn + } + } + + /** Find a method, which may not exist. */ + fun findMethod( + className: String, + methodName: String, + descriptor: String, + ): MethodNode? { + return findClass(className)?.methods + ?.firstOrNull { it.name == methodName && it.desc == descriptor }?.let { mn -> + return mn + } + } + + /** @return true if a class has a class initializer. */ + fun hasClassInitializer(className: String): Boolean { + return findMethod(className, CLASS_INITIALIZER_NAME, CLASS_INITIALIZER_DESC) != null + } + + /** Run the lambda on each class in alphabetical order. */ + fun forEach(consumer: (classNode: ClassNode) -> Unit) { + val keys = mAllClasses.keys.toTypedArray() + Arrays.sort(keys) + + for (name in keys) { + consumer(mAllClasses[name]!!) + } + } + + /** + * Dump all classes. + */ + fun dump(pw: PrintWriter) { + forEach { classNode -> dumpClass(pw, classNode) } + } + + private fun dumpClass(pw: PrintWriter, cn: ClassNode) { + pw.printf("Class: %s [access: %x]\n", cn.name, cn.access) + dumpAnnotations( + pw, " ", + cn.visibleTypeAnnotations, cn.invisibleTypeAnnotations, + cn.visibleAnnotations, cn.invisibleAnnotations, + ) + + for (f in cn.fields ?: emptyList()) { + pw.printf( + " Field: %s [sig: %s] [desc: %s] [access: %x]\n", + f.name, f.signature, f.desc, f.access + ) + dumpAnnotations( + pw, " ", + f.visibleTypeAnnotations, f.invisibleTypeAnnotations, + f.visibleAnnotations, f.invisibleAnnotations, + ) + } + for (m in cn.methods ?: emptyList()) { + pw.printf( + " Method: %s [sig: %s] [desc: %s] [access: %x]\n", + m.name, m.signature, m.desc, m.access + ) + dumpAnnotations( + pw, " ", + m.visibleTypeAnnotations, m.invisibleTypeAnnotations, + m.visibleAnnotations, m.invisibleAnnotations, + ) + } + } + + private fun dumpAnnotations( + pw: PrintWriter, + prefix: String, + visibleTypeAnnotations: List?, + invisibleTypeAnnotations: List?, + visibleAnnotations: List?, + invisibleAnnotations: List?, + ) { + for (an in visibleTypeAnnotations ?: emptyList()) { + pw.printf("%sTypeAnnotation(vis): %s\n", prefix, an.desc) + } + for (an in invisibleTypeAnnotations ?: emptyList()) { + pw.printf("%sTypeAnnotation(inv): %s\n", prefix, an.desc) + } + for (an in visibleAnnotations ?: emptyList()) { + pw.printf("%sAnnotation(vis): %s\n", prefix, an.desc) + if (an.values == null) { + continue + } + var i = 0 + while (i < an.values.size - 1) { + pw.printf("%s - %s -> %s \n", prefix, an.values[i], an.values[i + 1]) + i += 2 + } + } + for (an in invisibleAnnotations ?: emptyList()) { + pw.printf("%sAnnotation(inv): %s\n", prefix, an.desc) + if (an.values == null) { + continue + } + var i = 0 + while (i < an.values.size - 1) { + pw.printf("%s - %s -> %s \n", prefix, an.values[i], an.values[i + 1]) + i += 2 + } + } + } + + companion object { + /** + * Load all the classes, without code. + */ + fun loadClassStructures( + inJar: String, + timeCollector: Consumer? = null, + ): ClassNodes { + val allClasses = ClassNodes() + + // Load classes in parallel. + val executor = Executors.newFixedThreadPool(4) + + // First exception defected. + val exception = AtomicReference() + + // Called on a BG thread. Read a single jar entry and add it to [allClasses]. + fun parseClass(inZip: ZipFile, entry: ZipEntry) { + try { + inZip.getInputStream(entry).use { ins -> + val cr = ClassReader(BufferedInputStream(ins)) + val cn = ClassNode() + cr.accept( + cn, ClassReader.SKIP_CODE + or ClassReader.SKIP_DEBUG + or ClassReader.SKIP_FRAMES + ) + synchronized(allClasses) { + if (!allClasses.addClass(cn)) { + log.w("Duplicate class found: ${cn.name}") + } + } + } + } catch (e: Throwable) { + log.e("Failed to load class: $e") + exception.compareAndSet(null, e) + } + } + + // Actually open the jar and read it on worker threads. + val time = log.iTime("Reading class structure from $inJar") { + log.withIndent { + ZipFile(inJar).use { inZip -> + val inEntries = inZip.entries() + + while (inEntries.hasMoreElements()) { + val entry = inEntries.nextElement() + + if (entry.name.endsWith(".class")) { + executor.submit { + parseClass(inZip, entry) + } + } else if (entry.name.endsWith(".dex")) { + // Seems like it's an ART jar file. We can't process it. + // It's a fatal error. + throw InvalidJarFileException( + "$inJar is not a desktop jar file." + + " It contains a *.dex file." + ) + } else { + // Unknown file type. Skip. + } + } + // Wait for all the work to complete. (must do it before closing the zip) + log.i("Waiting for all loaders to finish...") + executor.shutdown() + executor.awaitTermination(5, TimeUnit.MINUTES) + log.i("All loaders to finished.") + } + } + + // If any exception is detected, throw it. + exception.get()?.let { + throw it + } + + if (allClasses.size == 0) { + log.w("$inJar contains no *.class files.") + } else { + log.i("Loaded ${allClasses.size} classes from $inJar.") + } + } + timeCollector?.accept(time) + return allClasses + } + } +} \ No newline at end of file diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/dumper/ApiDumper.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/dumper/ApiDumper.kt new file mode 100644 index 000000000000..5e4e70f0cbaa --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/dumper/ApiDumper.kt @@ -0,0 +1,202 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.dumper + +import com.android.hoststubgen.asm.CLASS_INITIALIZER_NAME +import com.android.hoststubgen.asm.CTOR_NAME +import com.android.hoststubgen.asm.ClassNodes +import com.android.hoststubgen.asm.getClassNameFromFullClassName +import com.android.hoststubgen.asm.getPackageNameFromFullClassName +import com.android.hoststubgen.asm.toHumanReadableClassName +import com.android.hoststubgen.csvEscape +import com.android.hoststubgen.filters.FilterPolicy +import com.android.hoststubgen.filters.FilterPolicyWithReason +import com.android.hoststubgen.filters.OutputFilter +import com.android.hoststubgen.log +import org.objectweb.asm.Type +import org.objectweb.asm.tree.ClassNode +import java.io.PrintWriter + +/** + * Dump all the API methods in [classes], with inherited methods, with their policies. + */ +class ApiDumper( + val pw: PrintWriter, + val classes: ClassNodes, + val frameworkClasses: ClassNodes?, + val filter: OutputFilter, +) { + private data class MethodKey( + val name: String, + val descriptor: String, + ) + + private val javaStandardApiPolicy = FilterPolicy.Keep.withReason("Java standard API") + + private val shownMethods = mutableSetOf() + + /** + * Do the dump. + */ + fun dump() { + pw.printf("PackageName,ClassName,FromSubclass,DeclareClass,MethodName,MethodDesc" + + ",Supported,Policy,Reason\n") + + classes.forEach { classNode -> + shownMethods.clear() + dump(classNode, classNode) + } + } + + private fun dumpMethod( + classPackage: String, + className: String, + isSuperClass: Boolean, + methodClassName: String, + methodName: String, + methodDesc: String, + policy: FilterPolicyWithReason, + ) { + pw.printf( + "%s,%s,%d,%s,%s,%s,%d,%s,%s\n", + csvEscape(classPackage), + csvEscape(className), + if (isSuperClass) { 1 } else { 0 }, + csvEscape(methodClassName), + csvEscape(methodName), + csvEscape(methodDesc), + if (policy.policy.isSupported) { 1 } else { 0 }, + policy.policy, + csvEscape(policy.reason), + ) + } + + private fun isDuplicate(methodName: String, methodDesc: String): Boolean { + val methodKey = MethodKey(methodName, methodDesc) + + if (shownMethods.contains(methodKey)) { + return true + } + shownMethods.add(methodKey) + return false + } + + private fun dump( + dumpClass: ClassNode, + methodClass: ClassNode, + ) { + val pkg = getPackageNameFromFullClassName(dumpClass.name).toHumanReadableClassName() + val cls = getClassNameFromFullClassName(dumpClass.name).toHumanReadableClassName() + + val isSuperClass = dumpClass != methodClass + + methodClass.methods?.sortedWith(compareBy({ it.name }, { it.desc }))?.forEach { method -> + + // Don't print ctor's from super classes. + if (isSuperClass) { + if (CTOR_NAME == method.name || CLASS_INITIALIZER_NAME == method.name) { + return@forEach + } + } + // If we already printed the method from a subclass, don't print it. + if (isDuplicate(method.name, method.desc)) { + return@forEach + } + + val policy = filter.getPolicyForMethod(methodClass.name, method.name, method.desc) + + // Let's skip "Remove" APIs. Ideally we want to print it, just to make the CSV + // complete, we still need to hide methods substituted (== @RavenwoodReplace) methods + // and for now we don't have an easy way to detect it. + if (policy.policy == FilterPolicy.Remove) { + return@forEach + } + + val renameTo = filter.getRenameTo(methodClass.name, method.name, method.desc) + + dumpMethod(pkg, cls, isSuperClass, methodClass.name.toHumanReadableClassName(), + renameTo ?: method.name, method.desc, policy) + } + + // Dump super class methods. + dumpSuper(dumpClass, methodClass.superName) + + // Dump interface methods (which may have default methods). + methodClass.interfaces?.sorted()?.forEach { interfaceName -> + dumpSuper(dumpClass, interfaceName) + } + } + + /** + * Dump a given super class / interface. + */ + private fun dumpSuper( + dumpClass: ClassNode, + methodClassName: String, + ) { + classes.findClass(methodClassName)?.let { methodClass -> + dump(dumpClass, methodClass) + return + } + frameworkClasses?.findClass(methodClassName)?.let { methodClass -> + dump(dumpClass, methodClass) + return + } + if (methodClassName.startsWith("java/") || + methodClassName.startsWith("javax/") + ) { + dumpStandardClass(dumpClass, methodClassName) + return + } + log.w("Super class or interface $methodClassName (used by ${dumpClass.name}) not found.") + } + + /** + * Dump methods from Java standard classes. + */ + private fun dumpStandardClass( + dumpClass: ClassNode, + methodClassName: String, + ) { + val pkg = getPackageNameFromFullClassName(dumpClass.name).toHumanReadableClassName() + val cls = getClassNameFromFullClassName(dumpClass.name).toHumanReadableClassName() + + val methodClassName = methodClassName.toHumanReadableClassName() + + try { + val clazz = Class.forName(methodClassName) + + // Method.getMethods() returns only public methods, but with inherited ones. + // Method.getDeclaredMethods() returns private methods too, but no inherited methods. + // + // Since we're only interested in public ones, just use getMethods(). + clazz.methods.forEach { method -> + val methodName = method.name + val methodDesc = Type.getMethodDescriptor(method) + + // If we already printed the method from a subclass, don't print it. + if (isDuplicate(methodName, methodDesc)) { + return@forEach + } + + dumpMethod(pkg, cls, true, methodClassName, + methodName, methodDesc, javaStandardApiPolicy) + } + } catch (e: ClassNotFoundException) { + log.w("JVM type $methodClassName (used by ${dumpClass.name}) not found.") + } + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/AndroidHeuristicsFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/AndroidHeuristicsFilter.kt new file mode 100644 index 000000000000..6b360b79c327 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/AndroidHeuristicsFilter.kt @@ -0,0 +1,87 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +import com.android.hoststubgen.asm.ClassNodes + +/** + * Filter that deals with Android specific heuristics. + */ +class AndroidHeuristicsFilter( + private val classes: ClassNodes, + val aidlPolicy: FilterPolicyWithReason?, + val featureFlagsPolicy: FilterPolicyWithReason?, + val syspropsPolicy: FilterPolicyWithReason?, + val rFilePolicy: FilterPolicyWithReason?, + fallback: OutputFilter +) : DelegatingFilter(fallback) { + override fun getPolicyForClass(className: String): FilterPolicyWithReason { + if (aidlPolicy != null && classes.isAidlClass(className)) { + return aidlPolicy + } + if (featureFlagsPolicy != null && classes.isFeatureFlagsClass(className)) { + return featureFlagsPolicy + } + if (syspropsPolicy != null && classes.isSyspropsClass(className)) { + return syspropsPolicy + } + if (rFilePolicy != null && classes.isRClass(className)) { + return rFilePolicy + } + return super.getPolicyForClass(className) + } +} + +/** + * @return if a given class "seems like" an AIDL (top-level) class. + */ +private fun ClassNodes.isAidlClass(className: String): Boolean { + return hasClass(className) && + hasClass("$className\$Stub") && + hasClass("$className\$Stub\$Proxy") +} + +/** + * Effectively apply @RavenwoodKeepWholeClass to all classes with these names + * + * @return if a given class "seems like" an feature flags class. + */ +private fun ClassNodes.isFeatureFlagsClass(className: String): Boolean { + // Matches template classes defined here: + // https://cs.android.com/android/platform/superproject/+/master:build/make/tools/aconfig/templates/ + return className.endsWith("/Flags") + || className.endsWith("/FeatureFlags") + || className.endsWith("/FeatureFlagsImpl") + || className.endsWith("/CustomFeatureFlags") + || className.endsWith("/FakeFeatureFlagsImpl"); +} + +/** + * @return if a given class "seems like" a sysprops class. + */ +private fun ClassNodes.isSyspropsClass(className: String): Boolean { + // Matches template classes defined here: + // https://cs.android.com/android/platform/superproject/main/+/main:system/tools/sysprop/ + return className.startsWith("android/sysprop/") + && className.endsWith("Properties") +} + +/** + * @return if a given class "seems like" an R class or its nested classes. + */ +private fun ClassNodes.isRClass(className: String): Boolean { + return className.endsWith("/R") || className.contains("/R$") +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/AnnotationBasedFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/AnnotationBasedFilter.kt new file mode 100644 index 000000000000..36adf0626415 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/AnnotationBasedFilter.kt @@ -0,0 +1,366 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +import com.android.hoststubgen.ClassParseException +import com.android.hoststubgen.HostStubGenErrors +import com.android.hoststubgen.InvalidAnnotationException +import com.android.hoststubgen.addLists +import com.android.hoststubgen.asm.CLASS_INITIALIZER_DESC +import com.android.hoststubgen.asm.CLASS_INITIALIZER_NAME +import com.android.hoststubgen.asm.ClassNodes +import com.android.hoststubgen.asm.findAllAnnotations +import com.android.hoststubgen.asm.findAnnotationValueAsString +import com.android.hoststubgen.asm.findAnyAnnotation +import com.android.hoststubgen.asm.getPackageNameFromFullClassName +import com.android.hoststubgen.asm.resolveClassNameWithDefaultPackage +import com.android.hoststubgen.asm.toHumanReadableClassName +import com.android.hoststubgen.asm.toHumanReadableMethodName +import com.android.hoststubgen.asm.toJvmClassName +import com.android.hoststubgen.log +import com.android.hoststubgen.utils.ClassFilter +import org.objectweb.asm.tree.AnnotationNode +import org.objectweb.asm.tree.ClassNode + +// TODO: Detect invalid cases, such as... +// - Class's visibility is lower than the members'. + +/** + * [OutputFilter] using Java annotations. + */ +class AnnotationBasedFilter( + private val errors: HostStubGenErrors, + private val classes: ClassNodes, + keepAnnotations_: Set, + keepClassAnnotations_: Set, + throwAnnotations_: Set, + removeAnnotations_: Set, + ignoreAnnotations_: Set, + substituteAnnotations_: Set, + redirectAnnotations_: Set, + redirectionClassAnnotations_: Set, + classLoadHookAnnotations_: Set, + keepStaticInitializerAnnotations_: Set, + private val annotationAllowedClassesFilter: ClassFilter, + fallback: OutputFilter, +) : DelegatingFilter(fallback) { + private val keepAnnotations = convertToInternalNames(keepAnnotations_) + private val keepClassAnnotations = convertToInternalNames(keepClassAnnotations_) + private val throwAnnotations = convertToInternalNames(throwAnnotations_) + private val removeAnnotations = convertToInternalNames(removeAnnotations_) + private val ignoreAnnotations = convertToInternalNames(ignoreAnnotations_) + private val redirectAnnotations = convertToInternalNames(redirectAnnotations_) + private val substituteAnnotations = convertToInternalNames(substituteAnnotations_) + private val redirectionClassAnnotations = + convertToInternalNames(redirectionClassAnnotations_) + private val classLoadHookAnnotations = convertToInternalNames(classLoadHookAnnotations_) + private val keepStaticInitializerAnnotations = + convertToInternalNames(keepStaticInitializerAnnotations_) + + /** Annotations that control API visibility. */ + private val visibilityAnnotations = keepAnnotations + + keepClassAnnotations + + throwAnnotations + + removeAnnotations + + ignoreAnnotations + + redirectAnnotations + + substituteAnnotations + + /** All the annotations we use. */ + private val allAnnotations = visibilityAnnotations + + redirectionClassAnnotations + + classLoadHookAnnotations + + keepStaticInitializerAnnotations + + /** + * All the annotations we use. Note, this one is in a [convertToJvmNames] format unlike + * other ones, because of how it's used. + */ + private val allAnnotationClasses: Set = convertToJvmNames( + keepAnnotations_ + + keepClassAnnotations_ + + throwAnnotations_ + + removeAnnotations_ + + redirectAnnotations_ + + substituteAnnotations_ + + redirectionClassAnnotations_ + + classLoadHookAnnotations_ + + keepStaticInitializerAnnotations_ + ) + + private val policyCache = mutableMapOf() + + private val AnnotationNode.policy: FilterPolicyWithReason? get() { + return when (desc) { + in keepAnnotations -> FilterPolicy.Keep.withReason(REASON_ANNOTATION) + in keepClassAnnotations -> FilterPolicy.KeepClass.withReason(REASON_CLASS_ANNOTATION) + in substituteAnnotations -> FilterPolicy.Substitute.withReason(REASON_ANNOTATION) + in throwAnnotations -> FilterPolicy.Throw.withReason(REASON_ANNOTATION) + in removeAnnotations -> FilterPolicy.Remove.withReason(REASON_ANNOTATION) + in ignoreAnnotations -> FilterPolicy.Ignore.withReason(REASON_ANNOTATION) + in redirectAnnotations -> FilterPolicy.Redirect.withReason(REASON_ANNOTATION) + else -> null + } + } + + private fun getAnnotationPolicy(cn: ClassNode): ClassAnnotations { + return policyCache.getOrPut(cn.name) { ClassAnnotations(cn) } + } + + override fun getPolicyForClass(className: String): FilterPolicyWithReason { + // If it's any of the annotations, then always keep it. + if (allAnnotationClasses.contains(className)) { + return FilterPolicy.KeepClass.withReason("HostStubGen Annotation") + } + + val cn = classes.getClass(className) + return getAnnotationPolicy(cn).classPolicy ?: super.getPolicyForClass(className) + } + + override fun getPolicyForField(className: String, fieldName: String): FilterPolicyWithReason { + val cn = classes.getClass(className) + return getAnnotationPolicy(cn).fieldPolicies[fieldName] + ?: super.getPolicyForField(className, fieldName) + } + + override fun getPolicyForMethod( + className: String, + methodName: String, + descriptor: String + ): FilterPolicyWithReason { + val cn = classes.getClass(className) + return getAnnotationPolicy(cn).methodPolicies[MethodKey(methodName, descriptor)] + ?: super.getPolicyForMethod(className, methodName, descriptor) + } + + override fun getRenameTo( + className: String, + methodName: String, + descriptor: String + ): String? { + val cn = classes.getClass(className) + return getAnnotationPolicy(cn).renamedMethods[MethodKey(methodName, descriptor)] + ?: super.getRenameTo(className, methodName, descriptor) + } + + override fun getRedirectionClass(className: String): String? { + val cn = classes.getClass(className) + return getAnnotationPolicy(cn).redirectionClass + } + + override fun getClassLoadHooks(className: String): List { + val cn = classes.getClass(className) + return addLists(super.getClassLoadHooks(className), getAnnotationPolicy(cn).classLoadHooks) + } + + private data class MethodKey(val name: String, val desc: String) + + /** + * Every time we see a class, we scan all its methods for substitution attributes, + * and compute (implicit) policies caused by them. + * + * For example, for the following methods: + * + * @Substitute(suffix = "_host") + * private void foo() { + * // This isn't supported on the host side. + * } + * private void foo_host() { + * // Host side implementation + * } + * + * We internally handle them as: + * + * foo() -> Substitute + * foo_host() -> Stub, and then rename it to foo(). + */ + private inner class ClassAnnotations(cn: ClassNode) { + + val classPolicy: FilterPolicyWithReason? + val fieldPolicies = mutableMapOf() + val methodPolicies = mutableMapOf() + val renamedMethods = mutableMapOf() + val redirectionClass: String? + val classLoadHooks: List + + init { + val allowAnnotation = annotationAllowedClassesFilter.matches(cn.name) + detectInvalidAnnotations( + cn.name, allowAnnotation, + cn.visibleAnnotations, cn.invisibleAnnotations, + "class", cn.name + ) + classPolicy = cn.findAnyAnnotation(visibilityAnnotations)?.policy + redirectionClass = cn.findAnyAnnotation(redirectionClassAnnotations)?.let { an -> + getAnnotationField(an, "value")?.let { resolveRelativeClass(cn, it) } + } + classLoadHooks = cn.findAllAnnotations(classLoadHookAnnotations).mapNotNull { an -> + getAnnotationField(an, "value")?.toHumanReadableMethodName() + } + if (cn.findAnyAnnotation(keepStaticInitializerAnnotations) != null) { + methodPolicies[MethodKey(CLASS_INITIALIZER_NAME, CLASS_INITIALIZER_DESC)] = + FilterPolicy.Keep.withReason(REASON_ANNOTATION) + } + + for (fn in cn.fields ?: emptyList()) { + detectInvalidAnnotations( + cn.name, allowAnnotation, + fn.visibleAnnotations, fn.invisibleAnnotations, + "field", cn.name, fn.name + ) + fn.findAnyAnnotation(visibilityAnnotations)?.policy?.let { + fieldPolicies[fn.name] = it + } + } + + for (mn in cn.methods ?: emptyList()) { + detectInvalidAnnotations( + cn.name, allowAnnotation, + mn.visibleAnnotations, mn.invisibleAnnotations, + "method", cn.name, mn.name, mn.desc + ) + + val an = mn.findAnyAnnotation(visibilityAnnotations) ?: continue + val policy = an.policy ?: continue + methodPolicies[MethodKey(mn.name, mn.desc)] = policy + + if (policy.policy != FilterPolicy.Substitute) continue + + // Handle substitution + val suffix = getAnnotationField(an, "suffix", false) ?: "\$ravenwood" + val replacement = mn.name + suffix + + if (replacement == mn.name) { + errors.onErrorFound("@SubstituteWith require a different name") + } else { + // The replacement method has to be renamed + methodPolicies[MethodKey(replacement, mn.desc)] = + FilterPolicy.Keep.withReason(REASON_ANNOTATION) + renamedMethods[MethodKey(replacement, mn.desc)] = mn.name + + log.v("Substitution found: %s%s -> %s", replacement, mn.desc, mn.name) + } + } + } + + /** + * Throw if an item has more than one visibility annotations, or the class is not allowed + * + * name1 - 4 are only used in exception messages. We take them as separate strings + * to avoid unnecessary string concatenations. + */ + private fun detectInvalidAnnotations( + className: String, + allowAnnotation: Boolean, + visibles: List?, + invisibles: List?, + type: String, + name1: String, + name2: String = "", + name3: String = "", + ) { + var count = 0 + var visibleCount = 0 + for (an in visibles ?: emptyList()) { + if (visibilityAnnotations.contains(an.desc)) { + visibleCount++ + } + if (allAnnotations.contains(an.desc)) { + count++ + } + } + for (an in invisibles ?: emptyList()) { + if (visibilityAnnotations.contains(an.desc)) { + visibleCount++ + } + if (allAnnotations.contains(an.desc)) { + count++ + } + } + if (count > 0 && !allowAnnotation) { + throw InvalidAnnotationException( + "Class ${className.toHumanReadableClassName()} is not allowed to have " + + "Ravenwood annotations. Contact g/ravenwood for more details." + ) + } + if (visibleCount > 1) { + val description = if (name2 == "" && name3 == "") { + "$type $name1" + } else { + "$type $name1.$name2$name3" + } + throw InvalidAnnotationException( + "Found more than one visibility annotations on $description" + ) + } + } + + /** + * Return the (String) value of 'value' parameter from an annotation. + */ + private fun getAnnotationField( + an: AnnotationNode, + name: String, + required: Boolean = true + ): String? { + try { + val suffix = findAnnotationValueAsString(an, name) + if (suffix == null && required) { + errors.onErrorFound("Annotation \"${an.desc}\" must have field $name") + } + return suffix + } catch (e: ClassParseException) { + errors.onErrorFound(e.message!!) + return null + } + } + + /** + * Resolve the full class name if the class is relative + */ + private fun resolveRelativeClass( + cn: ClassNode, + name: String + ): String { + val packageName = getPackageNameFromFullClassName(cn.name) + return resolveClassNameWithDefaultPackage(name, packageName).toJvmClassName() + } + } + + companion object { + private const val REASON_ANNOTATION = "annotation" + private const val REASON_CLASS_ANNOTATION = "class-annotation" + + /** + * Convert from human-readable type names (e.g. "com.android.TypeName") to the internal type + * names (e.g. "Lcom/android/TypeName). + */ + private fun convertToInternalNames(input: Set): Set { + val ret = mutableSetOf() + input.forEach { ret.add("L" + it.toJvmClassName() + ";") } + return ret + } + + /** + * Convert from human-readable type names to JVM type names. + */ + private fun convertToJvmNames(input: Set): Set { + val ret = mutableSetOf() + input.forEach { ret.add(it.toJvmClassName()) } + return ret + } + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/ClassWidePolicyPropagatingFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/ClassWidePolicyPropagatingFilter.kt new file mode 100644 index 000000000000..f8bb526d0a86 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/ClassWidePolicyPropagatingFilter.kt @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +import com.android.hoststubgen.asm.ClassNodes + +/** + * This is used as the second last fallback filter. This filter propagates the class-wide policy + * (obtained from [outermostFilter]) to the fields and methods. + */ +class ClassWidePolicyPropagatingFilter( + private val classes: ClassNodes, + fallback: OutputFilter +) : DelegatingFilter(fallback) { + + /** + * We don't use ClassNode.outerClass, because it gives as the top-level + * outer class (A$B$C -> A), not the direct outer class (A$B$C -> A$B). + * + * Sometimes a class name includes `$`, but is not as a nested class name separator + * (e.g. a class name like `MyClass$$`). In this case, `MyClass$` is not actually a class. + * + * So before getting the class policy on a nonexistent class, which may cause an + * incorrect result, we make sure the class actually exists. + */ + private fun getDirectOuterClass(className: String): String? { + var currentClass = className + while (true) { + val pos = currentClass.lastIndexOf('$') + if (pos < 0) { + return null + } + currentClass = currentClass.substring(0, pos) + if (classes.hasClass(currentClass)) { + return currentClass + } + } + } + + private fun getClassWidePolicy(className: String, resolve: Boolean): FilterPolicyWithReason? { + outermostFilter.getPolicyForClass(className).let { policy -> + if (policy.policy == FilterPolicy.KeepClass) { + val p = if (resolve) { + policy.policy.resolveClassWidePolicy() + } else { + policy.policy + } + + return p.withReason(policy.reason) + .wrapReason("class-wide in $className") + } + // If the class's policy is remove, then remove it. + if (policy.policy == FilterPolicy.Remove) { + return FilterPolicy.Remove.withReason("class-wide in $className") + } + } + return null + } + + override fun getPolicyForClass(className: String): FilterPolicyWithReason { + // If the class name is `a.b.c.A$B$C`, then we try to get the class wide policy + // from a.b.c.A$B$C, then a.b.c.A$B, and then a.b.c.A, recursively + return getDirectOuterClass(className)?.let { getClassWidePolicy(it, resolve = false) } + ?: super.getPolicyForClass(className) + } + + override fun getPolicyForField(className: String, fieldName: String): FilterPolicyWithReason { + return getClassWidePolicy(className, resolve = true) + ?: super.getPolicyForField(className, fieldName) + } + + override fun getPolicyForMethod( + className: String, + methodName: String, + descriptor: String + ): FilterPolicyWithReason { + return getClassWidePolicy(className, resolve = true) + ?: super.getPolicyForMethod(className, methodName, descriptor) + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/ConstantFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/ConstantFilter.kt new file mode 100644 index 000000000000..be3c59c80152 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/ConstantFilter.kt @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +import com.android.hoststubgen.HostStubGenInternalException + + +/** + * [OutputFilter] with a given policy. Used to represent the default policy. + * + * This is used as the last fallback filter. + * + * @param policy the policy. Cannot be a "substitute" policy. + */ +class ConstantFilter( + policy: FilterPolicy, + private val reason: String +) : OutputFilter() { + + private val classPolicy: FilterPolicy + private val fieldPolicy: FilterPolicy + private val methodPolicy: FilterPolicy + + init { + if (!policy.isUsableWithDefault) { + throw HostStubGenInternalException("ConstantFilter doesn't support $policy.") + } + methodPolicy = policy + + // If the default policy is "throw", we convert it to "keep" for classes and fields. + classPolicy = when (policy) { + FilterPolicy.Throw -> FilterPolicy.Keep + else -> policy + } + fieldPolicy = classPolicy + } + + override fun getPolicyForClass(className: String): FilterPolicyWithReason { + return classPolicy.withReason(reason) + } + + override fun getPolicyForField(className: String, fieldName: String): FilterPolicyWithReason { + return fieldPolicy.withReason(reason) + } + + override fun getPolicyForMethod( + className: String, + methodName: String, + descriptor: String, + ): FilterPolicyWithReason { + return methodPolicy.withReason(reason) + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/DefaultHookInjectingFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/DefaultHookInjectingFilter.kt new file mode 100644 index 000000000000..d771003a955d --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/DefaultHookInjectingFilter.kt @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +import com.android.hoststubgen.addLists + +class DefaultHookInjectingFilter( + defaultClassLoadHook: String?, + defaultMethodCallHook: String?, + fallback: OutputFilter +) : DelegatingFilter(fallback) { + /** + * Create a List containing a single element [e], if e != null. Otherwise, returns + * an empty list. + */ + private fun toSingleList(e: String?): List { + if (e == null) { + return emptyList() + } + return listOf(e) + } + + private val defaultClassLoadHookAsList: List = toSingleList(defaultClassLoadHook) + private val defaultMethodCallHookAsList: List = toSingleList(defaultMethodCallHook) + + override fun getClassLoadHooks(className: String): List { + return addLists(super.getClassLoadHooks(className), defaultClassLoadHookAsList) + } + + override fun getMethodCallHooks( + className: String, + methodName: String, + descriptor: String + ): List { + return addLists( + super.getMethodCallHooks(className, methodName, descriptor), + defaultMethodCallHookAsList, + ) + } +} \ No newline at end of file diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/DelegatingFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/DelegatingFilter.kt new file mode 100644 index 000000000000..b8b0d8a31268 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/DelegatingFilter.kt @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +/** + * Base class for an [OutputFilter] that uses another filter as a fallback. + */ +abstract class DelegatingFilter( + // fallback shouldn't be used by subclasses directly, so make it private. + // They should instead be calling into `super` or `outermostFilter`. + private val fallback: OutputFilter +) : OutputFilter() { + init { + fallback.outermostFilter = this + } + + /** + * Returns the outermost filter in a filter chain. + * + * When methods in a subclass needs to refer to a policy on an item (class, fields, methods) + * that are not the "subject" item -- e.g. + * in [ClassWidePolicyPropagatingFilter.getPolicyForField], when it checks the + * class policy -- [outermostFilter] must be used, rather than the super's method. + * The former will always return the correct policy, but the later won't consult outer + * filters than the current filter. + */ + override var outermostFilter: OutputFilter = this + get() = field + set(value) { + field = value + // Propagate to the inner filters. + fallback.outermostFilter = value + } + + override fun getPolicyForClass(className: String): FilterPolicyWithReason { + return fallback.getPolicyForClass(className) + } + + override fun getPolicyForField( + className: String, + fieldName: String + ): FilterPolicyWithReason { + return fallback.getPolicyForField(className, fieldName) + } + + override fun getPolicyForMethod( + className: String, + methodName: String, + descriptor: String + ): FilterPolicyWithReason { + return fallback.getPolicyForMethod(className, methodName, descriptor) + } + + override fun getRenameTo( + className: String, + methodName: String, + descriptor: String + ): String? { + return fallback.getRenameTo(className, methodName, descriptor) + } + + override fun getRedirectionClass(className: String): String? { + return fallback.getRedirectionClass(className) + } + + override fun getClassLoadHooks(className: String): List { + return fallback.getClassLoadHooks(className) + } + + override fun getMethodCallHooks( + className: String, + methodName: String, + descriptor: String + ): List { + return fallback.getMethodCallHooks(className, methodName, descriptor) + } + + override fun remapType(className: String): String? { + return fallback.remapType(className) + } + + override fun hasAnyMethodCallReplace(): Boolean { + return fallback.hasAnyMethodCallReplace() + } + + override fun getMethodCallReplaceTo( + callerClassName: String, + callerMethodName: String, + className: String, + methodName: String, + descriptor: String, + ): MethodReplaceTarget? { + return fallback.getMethodCallReplaceTo( + callerClassName, callerMethodName, className, methodName, descriptor) + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicy.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicy.kt new file mode 100644 index 000000000000..2f2f81b05ad1 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicy.kt @@ -0,0 +1,134 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +enum class FilterPolicy { + /** + * Keep the item in the jar file. + */ + Keep, + + /** + * Only usable with classes. Keep the class in the jar, and also all its members. + * Each member can have another policy to override it. + */ + KeepClass, + + /** + * Only usable with methods. Replace a method with a "substitution" method. + */ + Substitute, + + /** + * Only usable with methods. Redirect a method to a method in the substitution class. + */ + Redirect, + + /** + * Only usable with methods. The item will be kept in the impl jar file, but when called, + * it'll throw. + */ + Throw, + + /** + * Only usable with methods. The item will be kept in the impl jar file, but when called, + * it'll no-op. + */ + Ignore, + + /** + * Remove the item completely. + */ + Remove; + + val needsInOutput: Boolean + get() { + return when (this) { + Remove -> false + else -> true + } + } + + /** Returns whether a policy can be used with classes */ + val isUsableWithClasses: Boolean + get() { + return when (this) { + Keep, KeepClass, Remove -> true + else -> false + } + } + + /** Returns whether a policy can be used with fields. */ + val isUsableWithFields: Boolean + get() { + return when (this) { + Keep, Remove -> true + else -> false + } + } + + /** Returns whether a policy can be used with methods */ + val isUsableWithMethods: Boolean + get() { + return when (this) { + KeepClass -> false + else -> true + } + } + + /** Returns whether a policy can be used as default policy. */ + val isUsableWithDefault: Boolean + get() { + return when (this) { + Keep, Throw, Remove -> true + else -> false + } + } + + /** Returns whether a policy is considered supported. */ + val isSupported: Boolean + get() { + return when (this) { + Keep, KeepClass, Substitute, Redirect -> true + else -> false + } + } + + val isMethodRewriteBody: Boolean + get() { + return when (this) { + Redirect, Throw, Ignore -> true + else -> false + } + } + + /** + * Convert KeepClass to Keep, or return itself. + */ + fun resolveClassWidePolicy(): FilterPolicy { + return when (this) { + KeepClass -> Keep + else -> this + } + } + + /** + * Create a [FilterPolicyWithReason] with a given reason. + */ + fun withReason(reason: String): FilterPolicyWithReason { + return FilterPolicyWithReason(this, reason) + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicyWithReason.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicyWithReason.kt new file mode 100644 index 000000000000..b10165b835f2 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicyWithReason.kt @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +/** + * Captures a [FilterPolicy] with a human-readable reason. + */ +data class FilterPolicyWithReason ( + val policy: FilterPolicy, + val reason: String = "", +) { + /** + * Return a new [FilterPolicy] with an updated reason, while keeping the original reason + * as an "inner-reason". + */ + fun wrapReason(reason: String): FilterPolicyWithReason { + return FilterPolicyWithReason(policy, "$reason [inner-reason: ${this.reason}]") + } + + override fun toString(): String { + return "[$policy - reason: $reason]" + } + + /** Returns whether this policy should be ignored for stats. */ + val isIgnoredForStats: Boolean + get() { + return reason.contains("anonymous-inner-class") + || reason.contains("is-annotation") + || reason.contains("is-enum") + || reason.contains("is-synthetic-method") + || reason.contains("special-class") + || reason.contains("substitute-to") + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/FilterRemapper.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/FilterRemapper.kt new file mode 100644 index 000000000000..c5a2f9ff5e96 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/FilterRemapper.kt @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +import org.objectweb.asm.commons.Remapper + +/** + * A [Remapper] that uses [OutputFilter.remapType] + */ +class FilterRemapper(val filter: OutputFilter) : Remapper() { + private val cache = mutableMapOf() + + override fun mapType(typeInternalName: String?): String? { + if (typeInternalName == null) { + return null + } + + cache[typeInternalName]?.let { + return it + } + + var mapped = filter.remapType(typeInternalName) ?: typeInternalName + cache[typeInternalName] = mapped + return mapped + } + + // TODO Do we need to implement mapPackage(), etc too? +} \ No newline at end of file diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/ImplicitOutputFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/ImplicitOutputFilter.kt new file mode 100644 index 000000000000..474da6dfa1b9 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/ImplicitOutputFilter.kt @@ -0,0 +1,164 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +import com.android.hoststubgen.HostStubGenErrors +import com.android.hoststubgen.HostStubGenInternalException +import com.android.hoststubgen.asm.CLASS_INITIALIZER_DESC +import com.android.hoststubgen.asm.CLASS_INITIALIZER_NAME +import com.android.hoststubgen.asm.ClassNodes +import com.android.hoststubgen.asm.isAnnotation +import com.android.hoststubgen.asm.isAnonymousInnerClass +import com.android.hoststubgen.asm.isAutoGeneratedEnumMember +import com.android.hoststubgen.asm.isEnum +import com.android.hoststubgen.asm.isSynthetic +import com.android.hoststubgen.log +import org.objectweb.asm.tree.ClassNode + +/** + * Filter implementing "implicit" rules, such as: + * - "keep all anonymous inner classes if the outer class is keep". + * (But anonymous inner classes should never be in "stub") + * - For classes in stub, make sure private parameterless constructors are also in stub, if any. + * + * TODO: Do we need a way to make anonymous class methods and lambdas "throw"? + */ +class ImplicitOutputFilter( + private val errors: HostStubGenErrors, + private val classes: ClassNodes, + fallback: OutputFilter +) : DelegatingFilter(fallback) { + private fun getClassImplicitPolicy(className: String, cn: ClassNode): FilterPolicyWithReason? { + if (isAnonymousInnerClass(cn)) { + log.forDebug { +// log.d(" anon-inner class: ${className} outer: ${cn.outerClass} ") + } + if (cn.outerClass == null) { + throw HostStubGenInternalException( + "outerClass is null for anonymous inner class") + } + // If the outer class needs to be in impl, it should be in impl too. + val outerPolicy = outermostFilter.getPolicyForClass(cn.outerClass) + if (outerPolicy.policy.needsInOutput) { + return FilterPolicy.KeepClass.withReason("anonymous-inner-class") + } + } + return null + } + + override fun getPolicyForClass(className: String): FilterPolicyWithReason { + val fallback = super.getPolicyForClass(className) + + val cn = classes.getClass(className) + + // Use the implicit policy, if any. + getClassImplicitPolicy(className, cn)?.let { return it } + + return fallback + } + + override fun getPolicyForMethod( + className: String, + methodName: String, + descriptor: String + ): FilterPolicyWithReason { + val fallback = super.getPolicyForMethod(className, methodName, descriptor) + val classPolicy = outermostFilter.getPolicyForClass(className) + + val cn = classes.getClass(className) + + // If we throw from the static initializer, the class would be useless, so we convert it + // "keep" instead. + // Unless it's an enum -- in that case, the below code would handle it. + if (!cn.isEnum() && + fallback.policy == FilterPolicy.Throw && + methodName == CLASS_INITIALIZER_NAME && descriptor == CLASS_INITIALIZER_DESC) { + // TODO Maybe show a warning?? But that'd be too noisy with --default-throw. + return FilterPolicy.Ignore.withReason( + "'throw' on static initializer is handled as 'ignore'" + + " [original throw reason: ${fallback.reason}]") + } + + log.d("Class ${cn.name} Class policy: $classPolicy") + if (classPolicy.policy.needsInOutput) { + // Do it only when the class needs to be kept... + + // Member policy should be "keep" or "stub". + val memberPolicy = classPolicy.policy.resolveClassWidePolicy() + + val mn = classes.findMethod(className, methodName, descriptor) + + // Keep (or stub) the generated enum members. + if (cn.isEnum()) { + mn?.let { mn -> + if (isAutoGeneratedEnumMember(mn)) { + return memberPolicy.withReason(classPolicy.reason).wrapReason("is-enum") + } + } + } + + // Keep (or stub) all members of annotations. + if (cn.isAnnotation()) { + return memberPolicy.withReason(classPolicy.reason).wrapReason("is-annotation") + } + + mn?.let { + if (mn.isSynthetic()) { + // For synthetic methods (such as lambdas), let's just inherit the class's + // policy. + return memberPolicy.withReason(classPolicy.reason).wrapReason( + "is-synthetic-method") + } + } + } + + return fallback + } + + override fun getPolicyForField( + className: String, + fieldName: String + ): FilterPolicyWithReason { + val fallback = super.getPolicyForField(className, fieldName) + + val cn = classes.getClass(className) + val classPolicy = outermostFilter.getPolicyForClass(className) + + log.d("Class ${cn.name} Class policy: $classPolicy") + if (classPolicy.policy.needsInOutput) { + // Do it only when the class needs to be kept... + + // Member policy should be "keep" or "stub". + val memberPolicy = classPolicy.policy.resolveClassWidePolicy() + + // Keep (or stub) the generated enum members. + if (cn.isEnum()) { + classes.findField(className, fieldName)?.let { fn -> + if (isAutoGeneratedEnumMember(fn)) { + return memberPolicy.withReason(classPolicy.reason).wrapReason("enum") + } + } + } + + // Keep (or stub) all members of annotations. + if (cn.isAnnotation()) { + return memberPolicy.withReason(classPolicy.reason).wrapReason("annotation") + } + } + + return fallback + } +} \ No newline at end of file diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/InMemoryOutputFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/InMemoryOutputFilter.kt new file mode 100644 index 000000000000..59fa464a7212 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/InMemoryOutputFilter.kt @@ -0,0 +1,140 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +import com.android.hoststubgen.addNonNullElement +import com.android.hoststubgen.asm.ClassNodes +import com.android.hoststubgen.asm.toHumanReadableClassName +import com.android.hoststubgen.asm.toHumanReadableMethodName +import com.android.hoststubgen.asm.toJvmClassName +import com.android.hoststubgen.log + +// TODO: Validate all input names. + +class InMemoryOutputFilter( + private val classes: ClassNodes, + fallback: OutputFilter, +) : DelegatingFilter(fallback) { + private val mPolicies: MutableMap = mutableMapOf() + private val mRenames: MutableMap = mutableMapOf() + private val mRedirectionClasses: MutableMap = mutableMapOf() + private val mClassLoadHooks: MutableMap = mutableMapOf() + + private fun getClassKey(className: String): String { + return className.toHumanReadableClassName() + } + + private fun getFieldKey(className: String, fieldName: String): String { + return getClassKey(className) + "." + fieldName + } + + private fun getMethodKey(className: String, methodName: String, signature: String): String { + return getClassKey(className) + "." + methodName + ";" + signature + } + + override fun getPolicyForClass(className: String): FilterPolicyWithReason { + return mPolicies[getClassKey(className)] ?: super.getPolicyForClass(className) + } + + private fun checkClass(className: String) { + if (classes.findClass(className) == null) { + log.w("Unknown class $className") + } + } + + private fun checkField(className: String, fieldName: String) { + if (classes.findField(className, fieldName) == null) { + log.w("Unknown field $className.$fieldName") + } + } + + private fun checkMethod( + className: String, + methodName: String, + descriptor: String + ) { + if (classes.findMethod(className, methodName, descriptor) == null) { + log.w("Unknown method $className.$methodName$descriptor") + } + } + + fun setPolicyForClass(className: String, policy: FilterPolicyWithReason) { + checkClass(className) + mPolicies[getClassKey(className)] = policy + } + + override fun getPolicyForField(className: String, fieldName: String): FilterPolicyWithReason { + return mPolicies[getFieldKey(className, fieldName)] + ?: super.getPolicyForField(className, fieldName) + } + + fun setPolicyForField(className: String, fieldName: String, policy: FilterPolicyWithReason) { + checkField(className, fieldName) + mPolicies[getFieldKey(className, fieldName)] = policy + } + + override fun getPolicyForMethod( + className: String, + methodName: String, + descriptor: String, + ): FilterPolicyWithReason { + return mPolicies[getMethodKey(className, methodName, descriptor)] + ?: super.getPolicyForMethod(className, methodName, descriptor) + } + + fun setPolicyForMethod( + className: String, + methodName: String, + descriptor: String, + policy: FilterPolicyWithReason, + ) { + checkMethod(className, methodName, descriptor) + mPolicies[getMethodKey(className, methodName, descriptor)] = policy + } + + override fun getRenameTo(className: String, methodName: String, descriptor: String): String? { + return mRenames[getMethodKey(className, methodName, descriptor)] + ?: super.getRenameTo(className, methodName, descriptor) + } + + fun setRenameTo(className: String, methodName: String, descriptor: String, toName: String) { + checkMethod(className, methodName, descriptor) + checkMethod(className, toName, descriptor) + mRenames[getMethodKey(className, methodName, descriptor)] = toName + } + + override fun getRedirectionClass(className: String): String? { + return mRedirectionClasses[getClassKey(className)] + ?: super.getRedirectionClass(className) + } + + fun setRedirectionClass(from: String, to: String) { + checkClass(from) + + // Redirection classes may be provided from other jars, so we can't do this check. + // ensureClassExists(to) + mRedirectionClasses[getClassKey(from)] = to.toJvmClassName() + } + + override fun getClassLoadHooks(className: String): List { + return addNonNullElement(super.getClassLoadHooks(className), + mClassLoadHooks[getClassKey(className)]) + } + + fun setClassLoadHook(className: String, methodName: String) { + mClassLoadHooks[getClassKey(className)] = methodName.toHumanReadableMethodName() + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/KeepNativeFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/KeepNativeFilter.kt new file mode 100644 index 000000000000..00e7d77fa6e7 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/KeepNativeFilter.kt @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +import com.android.hoststubgen.asm.ClassNodes +import com.android.hoststubgen.asm.isNative + +/** + * For native methods that weren't handled by outer filters, we keep it so that + * native method registration will not crash at runtime. Ideally we shouldn't need + * this, but in practice unsupported native method registrations do occur. + */ +class KeepNativeFilter( + private val classes: ClassNodes, + fallback: OutputFilter +) : DelegatingFilter(fallback) { + override fun getPolicyForMethod( + className: String, + methodName: String, + descriptor: String, + ): FilterPolicyWithReason { + return classes.findMethod(className, methodName, descriptor)?.let { mn -> + if (mn.isNative()) { + FilterPolicy.Keep.withReason("native-preserve") + } else { + null + } + } ?: super.getPolicyForMethod(className, methodName, descriptor) + } +} \ No newline at end of file diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/OutputFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/OutputFilter.kt new file mode 100644 index 000000000000..f99ce906240a --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/OutputFilter.kt @@ -0,0 +1,119 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +/** + * Base class for "filters", which decides what APIs should go to the stub / impl jars. + */ +abstract class OutputFilter { + /** + * Filters are stacked over one another. This fields contains the "outermost" filter in a + * filter stack chain. + * + * Subclasses must use this filter to get a policy, when they need to infer a policy + * from the policy of another API. + * + * For example, [ClassWidePolicyPropagatingFilter] needs to check the policy of the enclosing + * class to propagate "class-wide" policies, but when it does so, it can't just use + * `this.getPolicyForClass()` because that wouldn't return policies decided by "outer" + * filters. Instead, it uses [outermostFilter.getPolicyForClass()]. + * + * Note, [outermostFilter] can be itself, so make sure not to cause infinity recursions when + * using it. + */ + open var outermostFilter: OutputFilter = this + + abstract fun getPolicyForClass(className: String): FilterPolicyWithReason + + abstract fun getPolicyForField(className: String, fieldName: String): FilterPolicyWithReason + + abstract fun getPolicyForMethod( + className: String, + methodName: String, + descriptor: String, + ): FilterPolicyWithReason + + /** + * If a given method is a substitute-from method, return the substitute-to method name. + * + * The substitute-to and from methods must have the same signature, in the same class. + */ + open fun getRenameTo(className: String, methodName: String, descriptor: String): String? { + return null + } + + /** + * Return a "redirection class" name for a given class. + * + * The result will be in a JVM internal form. (e.g. uses '/'s instead of '.'s) + * + * (which corresponds to @HostSideTestRedirectClass of the standard annotations.) + */ + open fun getRedirectionClass(className: String): String? { + return null + } + + /** + * Return a "class load hook" class name for a given class. + * + * (which corresponds to @HostSideTestClassLoadHook of the standard annotations.) + */ + open fun getClassLoadHooks(className: String): List { + return emptyList() + } + + /** + * Return the "method call hook" class name. + * + * The class has to have a function with the following signature: + * `public static void onMethodCalled(Class clazz, String name, String descriptor)`. + */ + open fun getMethodCallHooks(className: String, methodName: String, descriptor: String): + List { + return emptyList() + } + + /** + * Take a class (internal) name. If the class needs to be renamed, return the new name. + * This is used by [FilterRemapper]. + */ + open fun remapType(className: String): String? { + return null + } + + data class MethodReplaceTarget(val className: String, val methodName: String) + + /** + * Return if this filter may return non-null from [getMethodCallReplaceTo]. + * (Used for a small optimization) + */ + open fun hasAnyMethodCallReplace(): Boolean { + return false + } + + /** + * If a method call should be forwarded to another method, return the target's class / method. + */ + open fun getMethodCallReplaceTo( + callerClassName: String, + callerMethodName: String, + className: String, + methodName: String, + descriptor: String, + ): MethodReplaceTarget? { + return null + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/PackageFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/PackageFilter.kt new file mode 100644 index 000000000000..c67e6714d4c2 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/PackageFilter.kt @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +import com.android.hoststubgen.asm.toHumanReadableClassName +import com.android.hoststubgen.utils.Trie + +/** + * Filter to apply a policy to classes inside a package, either directly or indirectly. + */ +class PackageFilter( + fallback: OutputFilter +) : DelegatingFilter(fallback) { + + private val mPackagePolicies = PackagePolicyTrie() + + // We want to pick the most specific filter for a package name. + // Since any package with a matching prefix is a valid match, we can use a prefix tree + // to help us find the nearest matching filter. + private class PackagePolicyTrie : Trie() { + // Split package name into individual component + override fun splitToComponents(key: String): Iterator { + return key.split('.').iterator() + } + } + + private fun getPackageKey(packageName: String): String { + return packageName.toHumanReadableClassName() + } + + private fun getPackageKeyFromClass(className: String): String { + val clazz = className.toHumanReadableClassName() + val idx = clazz.lastIndexOf('.') + return if (idx >= 0) clazz.substring(0, idx) else "" + } + + /** + * Add a policy to all classes inside a package, either directly or indirectly. + */ + fun addPolicy(packageName: String, policy: FilterPolicyWithReason) { + mPackagePolicies[getPackageKey(packageName)] = policy + } + + override fun getPolicyForClass(className: String): FilterPolicyWithReason { + return mPackagePolicies[getPackageKeyFromClass(className)] + ?: super.getPolicyForClass(className) + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/SanitizationFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/SanitizationFilter.kt new file mode 100644 index 000000000000..18a1e16bcf3a --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/SanitizationFilter.kt @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +import com.android.hoststubgen.HostStubGenErrors +import com.android.hoststubgen.asm.ClassNodes +import com.android.hoststubgen.asm.toHumanReadableClassName +import com.android.hoststubgen.log + +/** + * Check whether the policies in the inner layers make sense, and sanitize the results. + */ +class SanitizationFilter( + private val errors: HostStubGenErrors, + private val classes: ClassNodes, + fallback: OutputFilter +) : DelegatingFilter(fallback) { + override fun getPolicyForMethod( + className: String, + methodName: String, + descriptor: String + ): FilterPolicyWithReason { + val policy = super.getPolicyForMethod(className, methodName, descriptor) + if (policy.policy == FilterPolicy.Redirect) { + // Check whether the hosting class has a redirection class + if (getRedirectionClass(className) == null) { + errors.onErrorFound("Method $methodName$descriptor requires a redirection " + + "class set on ${className.toHumanReadableClassName()}") + } + } + return policy + } + + override fun getRedirectionClass(className: String): String? { + return super.getRedirectionClass(className)?.also { clazz -> + if (classes.findClass(clazz) == null) { + log.w("Redirection class $clazz not found. Class must be available at runtime.") + } else if (outermostFilter.getPolicyForClass(clazz).policy != FilterPolicy.KeepClass) { + // If the class exists, it must have a KeepClass policy. + errors.onErrorFound("Redirection class $clazz must have @KeepWholeClass.") + } + } + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/SubclassFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/SubclassFilter.kt new file mode 100644 index 000000000000..fd7474b55fa6 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/SubclassFilter.kt @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +import com.android.hoststubgen.asm.ClassNodes +import com.android.hoststubgen.asm.toJvmClassName + +/** + * Filter to apply a policy to classes extending or implementing a class, + * either directly or indirectly. + * + * The policy won't apply to the super class itself. + */ +class SubclassFilter( + private val classes: ClassNodes, + fallback: OutputFilter +) : DelegatingFilter(fallback) { + private val mPolicies: MutableMap = mutableMapOf() + + /** + * Add a policy to all classes extending or implementing a class, either directly or indirectly. + */ + fun addPolicy(superClassName: String, policy: FilterPolicyWithReason) { + mPolicies[superClassName.toJvmClassName()] = policy + } + + override fun getPolicyForClass(className: String): FilterPolicyWithReason { + return findPolicyForClass(className) ?: super.getPolicyForClass(className) + } + + /** + * Find a policy for a class. + */ + private fun findPolicyForClass(className: String): FilterPolicyWithReason? { + val cn = classes.findClass(className) ?: return null + + if (cn.superName == null) { + return null + } + // First, check the direct super class / interfaces. + mPolicies[cn.superName]?.let { policy -> + return policy + } + cn.interfaces?.forEach { iface -> + mPolicies[iface]?.let { policy -> + return policy + } + } + + // Then recurse. + cn.superName?.let { superName -> + findPolicyForClass(superName)?.let { policy -> + return policy + } + } + cn.interfaces?.forEach { iface -> + findPolicyForClass(iface)?.let { policy -> + return policy + } + } + return null + } +} \ No newline at end of file diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/TextFileFilterPolicyParser.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/TextFileFilterPolicyParser.kt new file mode 100644 index 000000000000..caf80ebec0c9 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/TextFileFilterPolicyParser.kt @@ -0,0 +1,376 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +import com.android.hoststubgen.ParseException +import com.android.hoststubgen.asm.ClassNodes +import com.android.hoststubgen.asm.splitWithLastPeriod +import com.android.hoststubgen.asm.toHumanReadableClassName +import com.android.hoststubgen.asm.toJvmClassName +import com.android.hoststubgen.log +import com.android.hoststubgen.normalizeTextLine +import com.android.hoststubgen.whitespaceRegex +import java.io.File +import java.io.PrintWriter +import java.util.regex.Pattern +import org.objectweb.asm.tree.ClassNode + +/** + * Print a class node as a "keep" policy. + */ +fun printAsTextPolicy(pw: PrintWriter, cn: ClassNode) { + pw.printf("class %s %s\n", cn.name.toHumanReadableClassName(), "keep") + + cn.fields?.let { + for (f in it.sortedWith(compareBy({ it.name }))) { + pw.printf(" field %s %s\n", f.name, "keep") + } + } + cn.methods?.let { + for (m in it.sortedWith(compareBy({ it.name }, { it.desc }))) { + pw.printf(" method %s %s %s\n", m.name, m.desc, "keep") + } + } +} + +private const val FILTER_REASON = "file-override" + +private enum class SpecialClass { + NotSpecial, + Aidl, + FeatureFlags, + Sysprops, + RFile, +} + +class TextFileFilterPolicyParser( + private val classes: ClassNodes, + fallback: OutputFilter +) { + private val subclassFilter = SubclassFilter(classes, fallback) + private val packageFilter = PackageFilter(subclassFilter) + private val imf = InMemoryOutputFilter(classes, packageFilter) + private var aidlPolicy: FilterPolicyWithReason? = null + private var featureFlagsPolicy: FilterPolicyWithReason? = null + private var syspropsPolicy: FilterPolicyWithReason? = null + private var rFilePolicy: FilterPolicyWithReason? = null + private val typeRenameSpec = mutableListOf() + private val methodReplaceSpec = + mutableListOf() + + private lateinit var currentClassName: String + + /** + * Read a given "policy" file and return as an [OutputFilter] + */ + fun parse(file: String) { + log.i("Loading offloaded annotations from $file ...") + log.withIndent { + var lineNo = 0 + try { + File(file).forEachLine { + lineNo++ + val line = normalizeTextLine(it) + if (line.isEmpty()) { + return@forEachLine // skip empty lines. + } + parseLine(line) + } + } catch (e: ParseException) { + throw e.withSourceInfo(file, lineNo) + } + } + } + + fun createOutputFilter(): OutputFilter { + var ret: OutputFilter = imf + if (typeRenameSpec.isNotEmpty()) { + ret = TextFilePolicyRemapperFilter(typeRenameSpec, ret) + } + if (methodReplaceSpec.isNotEmpty()) { + ret = TextFilePolicyMethodReplaceFilter(methodReplaceSpec, classes, ret) + } + + // Wrap the in-memory-filter with AHF. + ret = AndroidHeuristicsFilter( + classes, aidlPolicy, featureFlagsPolicy, syspropsPolicy, rFilePolicy, ret + ) + + return ret + } + + private fun parseLine(line: String) { + val fields = line.split(whitespaceRegex).toTypedArray() + when (fields[0].lowercase()) { + "p", "package" -> parsePackage(fields) + "c", "class" -> parseClass(fields) + "f", "field" -> parseField(fields) + "m", "method" -> parseMethod(fields) + "r", "rename" -> parseRename(fields) + else -> throw ParseException("Unknown directive \"${fields[0]}\"") + } + } + + private fun resolveSpecialClass(className: String): SpecialClass { + if (!className.startsWith(":")) { + return SpecialClass.NotSpecial + } + when (className.lowercase()) { + ":aidl" -> return SpecialClass.Aidl + ":feature_flags" -> return SpecialClass.FeatureFlags + ":sysprops" -> return SpecialClass.Sysprops + ":r" -> return SpecialClass.RFile + } + throw ParseException("Invalid special class name \"$className\"") + } + + private fun resolveExtendingClass(className: String): String? { + if (!className.startsWith("*")) { + return null + } + return className.substring(1) + } + + private fun parsePolicy(s: String): FilterPolicy { + return when (s.lowercase()) { + "k", "keep" -> FilterPolicy.Keep + "t", "throw" -> FilterPolicy.Throw + "r", "remove" -> FilterPolicy.Remove + "kc", "keepclass" -> FilterPolicy.KeepClass + "i", "ignore" -> FilterPolicy.Ignore + "rdr", "redirect" -> FilterPolicy.Redirect + else -> { + if (s.startsWith("@")) { + FilterPolicy.Substitute + } else { + throw ParseException("Invalid policy \"$s\"") + } + } + } + } + + private fun parsePackage(fields: Array) { + if (fields.size < 3) { + throw ParseException("Package ('p') expects 2 fields.") + } + val name = fields[1] + val rawPolicy = fields[2] + if (resolveExtendingClass(name) != null) { + throw ParseException("Package can't be a super class type") + } + if (resolveSpecialClass(name) != SpecialClass.NotSpecial) { + throw ParseException("Package can't be a special class type") + } + if (rawPolicy.startsWith("!")) { + throw ParseException("Package can't have a substitution") + } + if (rawPolicy.startsWith("~")) { + throw ParseException("Package can't have a class load hook") + } + val policy = parsePolicy(rawPolicy) + if (!policy.isUsableWithClasses) { + throw ParseException("Package can't have policy '$policy'") + } + packageFilter.addPolicy(name, policy.withReason(FILTER_REASON)) + } + + private fun parseClass(fields: Array) { + if (fields.size < 3) { + throw ParseException("Class ('c') expects 2 fields.") + } + currentClassName = fields[1] + + // superClass is set when the class name starts with a "*". + val superClass = resolveExtendingClass(currentClassName) + + // :aidl, etc? + val classType = resolveSpecialClass(currentClassName) + + if (fields[2].startsWith("!")) { + if (classType != SpecialClass.NotSpecial) { + // We could support it, but not needed at least for now. + throw ParseException( + "Special class can't have a substitution" + ) + } + // It's a redirection class. + val toClass = fields[2].substring(1) + imf.setRedirectionClass(currentClassName, toClass) + } else if (fields[2].startsWith("~")) { + if (classType != SpecialClass.NotSpecial) { + // We could support it, but not needed at least for now. + throw ParseException( + "Special class can't have a class load hook" + ) + } + // It's a class-load hook + val callback = fields[2].substring(1) + imf.setClassLoadHook(currentClassName, callback) + } else { + val policy = parsePolicy(fields[2]) + if (!policy.isUsableWithClasses) { + throw ParseException("Class can't have policy '$policy'") + } + + when (classType) { + SpecialClass.NotSpecial -> { + // TODO: Duplicate check, etc + if (superClass == null) { + imf.setPolicyForClass( + currentClassName, policy.withReason(FILTER_REASON) + ) + } else { + subclassFilter.addPolicy( + superClass, + policy.withReason("extends $superClass") + ) + } + } + + SpecialClass.Aidl -> { + if (aidlPolicy != null) { + throw ParseException( + "Policy for AIDL classes already defined" + ) + } + aidlPolicy = policy.withReason( + "$FILTER_REASON (special-class AIDL)" + ) + } + + SpecialClass.FeatureFlags -> { + if (featureFlagsPolicy != null) { + throw ParseException( + "Policy for feature flags already defined" + ) + } + featureFlagsPolicy = policy.withReason( + "$FILTER_REASON (special-class feature flags)" + ) + } + + SpecialClass.Sysprops -> { + if (syspropsPolicy != null) { + throw ParseException( + "Policy for sysprops already defined" + ) + } + syspropsPolicy = policy.withReason( + "$FILTER_REASON (special-class sysprops)" + ) + } + + SpecialClass.RFile -> { + if (rFilePolicy != null) { + throw ParseException( + "Policy for R file already defined" + ) + } + rFilePolicy = policy.withReason( + "$FILTER_REASON (special-class R file)" + ) + } + } + } + } + + private fun parseField(fields: Array) { + if (fields.size < 3) { + throw ParseException("Field ('f') expects 2 fields.") + } + val name = fields[1] + val policy = parsePolicy(fields[2]) + if (!policy.isUsableWithFields) { + throw ParseException("Field can't have policy '$policy'") + } + require(this::currentClassName.isInitialized) + + // TODO: Duplicate check, etc + imf.setPolicyForField(currentClassName, name, policy.withReason(FILTER_REASON)) + } + + private fun parseMethod(fields: Array) { + if (fields.size < 4) { + throw ParseException("Method ('m') expects 3 fields.") + } + val name = fields[1] + val signature = fields[2] + val policy = parsePolicy(fields[3]) + + if (!policy.isUsableWithMethods) { + throw ParseException("Method can't have policy '$policy'") + } + + require(this::currentClassName.isInitialized) + + imf.setPolicyForMethod( + currentClassName, name, signature, + policy.withReason(FILTER_REASON) + ) + if (policy == FilterPolicy.Substitute) { + val fromName = fields[3].substring(1) + + if (fromName == name) { + throw ParseException( + "Substitution must have a different name" + ) + } + + // Set the policy for the "from" method. + imf.setPolicyForMethod( + currentClassName, fromName, signature, + FilterPolicy.Keep.withReason(FILTER_REASON) + ) + + val classAndMethod = splitWithLastPeriod(fromName) + if (classAndMethod != null) { + // If the substitution target contains a ".", then + // it's a method call redirect. + methodReplaceSpec.add( + TextFilePolicyMethodReplaceFilter.MethodCallReplaceSpec( + currentClassName.toJvmClassName(), + name, + signature, + classAndMethod.first.toJvmClassName(), + classAndMethod.second, + ) + ) + } else { + // It's an in-class replace. + // ("@RavenwoodReplace" equivalent) + imf.setRenameTo(currentClassName, fromName, signature, name) + } + } + } + + private fun parseRename(fields: Array) { + if (fields.size < 3) { + throw ParseException("Rename ('r') expects 2 fields.") + } + // Add ".*" to make it a prefix match. + val pattern = Pattern.compile(fields[1] + ".*") + + // Removing the leading /'s from the prefix. This allows + // using a single '/' as an empty suffix, which is useful to have a + // "negative" rename rule to avoid subsequent raname's from getting + // applied. (Which is needed for services.jar) + val prefix = fields[2].trimStart('/') + + typeRenameSpec += TextFilePolicyRemapperFilter.TypeRenameSpec( + pattern, prefix + ) + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/TextFilePolicyMethodReplaceFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/TextFilePolicyMethodReplaceFilter.kt new file mode 100644 index 000000000000..d45f41407a52 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/TextFilePolicyMethodReplaceFilter.kt @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +import com.android.hoststubgen.asm.ClassNodes + +/** + * Filter used by TextFileFilterPolicyParser for "method call relacement". + */ +class TextFilePolicyMethodReplaceFilter( + val spec: List, + val classes: ClassNodes, + val fallback: OutputFilter, +) : DelegatingFilter(fallback) { + + data class MethodCallReplaceSpec( + val fromClass: String, + val fromMethod: String, + val fromDescriptor: String, + val toClass: String, + val toMethod: String, + ) + + override fun hasAnyMethodCallReplace(): Boolean { + return true + } + + override fun getMethodCallReplaceTo( + callerClassName: String, + callerMethodName: String, + className: String, + methodName: String, + descriptor: String, + ): MethodReplaceTarget? { + // Maybe use 'Tri' if we end up having too many replacements. + spec.forEach { + if (className == it.fromClass && + methodName == it.fromMethod && + descriptor == it.fromDescriptor + ) { + return MethodReplaceTarget(it.toClass, it.toMethod) + } + } + return null + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/TextFilePolicyRemapperFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/TextFilePolicyRemapperFilter.kt new file mode 100644 index 000000000000..a78c6552b8d0 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/filters/TextFilePolicyRemapperFilter.kt @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.filters + +import com.android.hoststubgen.log +import java.util.regex.Pattern + +/** + * A filter that provides a simple "jarjar" functionality via [mapType] + */ +class TextFilePolicyRemapperFilter( + val typeRenameSpecs: List, + fallback: OutputFilter, +) : DelegatingFilter(fallback) { + /** + * When a package name matches [typeInternalNamePattern], we prepend [typeInternalNamePrefix] + * to it. + */ + data class TypeRenameSpec( + val typeInternalNamePattern: Pattern, + val typeInternalNamePrefix: String, + ) + + private val cache = mutableMapOf() + + override fun remapType(className: String): String? { + var mapped: String = className + typeRenameSpecs.forEach { + if (it.typeInternalNamePattern.matcher(className).matches()) { + mapped = it.typeInternalNamePrefix + className + log.d("Renaming type $className to $mapped") + } + } + cache[className] = mapped + return mapped + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/utils/ClassFilter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/utils/ClassFilter.kt new file mode 100644 index 000000000000..d6aa7617fd59 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/utils/ClassFilter.kt @@ -0,0 +1,165 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.utils + +import com.android.hoststubgen.ParseException +import com.android.hoststubgen.asm.toHumanReadableClassName +import com.android.hoststubgen.asm.toJvmClassName +import com.android.hoststubgen.normalizeTextLine +import java.io.File + +/** + * General purpose filter for class names. + */ +class ClassFilter private constructor( + private val defaultResult: Boolean, +) { + private enum class MatchType { + Full, + Prefix, + Suffix, + } + + private class FilterElement( + val allowed: Boolean, + val internalName: String, + val matchType: MatchType, + ) { + fun matches(classInternalName: String): Boolean { + return when (matchType) { + MatchType.Full -> classInternalName == internalName + MatchType.Prefix -> classInternalName.startsWith(internalName) + MatchType.Suffix -> classInternalName.endsWith(internalName) + } + } + } + + private val elements: MutableList = mutableListOf() + + private val cache: MutableMap = mutableMapOf() + + /** + * Takes an internal class name (e.g. "com/android/hoststubgen/ClassName") and returns if + * matches the filter or not. + */ + fun matches(classInternalName: String): Boolean { + cache[classInternalName]?.let { + return it + } + + val testClasses = sequence { + // Yield itself and its outer class(es) one by one + var idx = classInternalName.length + while (idx > 0) { + yield(classInternalName.substring(0, idx)) + idx = classInternalName.lastIndexOf('$', idx - 1) + } + } + + val result = elements.find { testClasses.any(it::matches) }?.allowed ?: defaultResult + cache[classInternalName] = result + + return result + } + + fun getCacheSizeForTest(): Int { + return cache.size + } + + companion object { + /** + * Return a filter that alawys returns true or false. + */ + fun newNullFilter(defaultResult: Boolean): ClassFilter { + return ClassFilter(defaultResult) + } + + /** Build a filter from a file. */ + fun loadFromFile(filename: String, defaultResult: Boolean): ClassFilter { + return buildFromString(File(filename).readText(), defaultResult, filename) + } + + /** Build a filter from a string (for unit tests). */ + fun buildFromString( + filterString: String, + defaultResult: Boolean, + filenameForErrorMessage: String + ): ClassFilter { + val ret = ClassFilter(defaultResult) + + var lineNo = 0 + filterString.split('\n').forEach { s -> + lineNo++ + + var line = normalizeTextLine(s) + + if (line.isEmpty()) { + return@forEach // skip empty lines. + } + + line = line.toHumanReadableClassName() // Convert all the slashes to periods. + + var allow = true + if (line.startsWith("!")) { + allow = false + line = line.substring(1).trimStart() + } + + // Special case -- matches any class names. + if (line == "*") { + ret.elements.add(FilterElement(allow, "", MatchType.Prefix)) + return@forEach + } + + // Handle prefix match -- e.g. "package.name.*" + if (line.endsWith(".*")) { + ret.elements.add( + FilterElement( + allow, + line.substring(0, line.length - 2).toJvmClassName() + "/", + MatchType.Prefix + ) + ) + return@forEach + } + + // Handle suffix match -- e.g. "*.Flags" + if (line.startsWith("*.")) { + ret.elements.add( + FilterElement( + allow, + "/" + line.substring(2, line.length).toJvmClassName(), + MatchType.Suffix + ) + ) + return@forEach + } + + // Any other uses of "*" would be an error. + if (line.contains('*')) { + throw ParseException( + "Wildcard (*) can only show up as the last element", + filenameForErrorMessage, + lineNo + ) + } + ret.elements.add(FilterElement(allow, line.toJvmClassName(), MatchType.Suffix)) + } + + return ret + } + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/utils/Trie.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/utils/Trie.kt new file mode 100644 index 000000000000..1b3d79cddb8e --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/utils/Trie.kt @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.utils + +abstract class Trie { + + private val root = TrieNode() + + abstract fun splitToComponents(key: Key): Iterator + + operator fun set(key: Key, value: Value) { + val node = root.getExactNode(splitToComponents(key)) + node.value = value + } + + operator fun get(key: Key): Value? { + return root.getNearestValue(null, splitToComponents(key)) + } + + private class TrieNode { + private val children = mutableMapOf>() + var value: Value? = null + + fun getExactNode(components: Iterator): TrieNode { + val n = components.next() + val child = children.getOrPut(n) { TrieNode() } + return if (components.hasNext()) { + child.getExactNode(components) + } else { + child + } + } + + fun getNearestValue(current: Value?, components: Iterator): Value? { + val n = components.next() + val child = children[n] ?: return current + val newValue = child.value ?: current + return if (components.hasNext()) { + child.getNearestValue(newValue, components) + } else { + newValue + } + } + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/BaseAdapter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/BaseAdapter.kt new file mode 100644 index 000000000000..261ef59c45c7 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/BaseAdapter.kt @@ -0,0 +1,275 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.visitors + +import com.android.hoststubgen.HostStubGenErrors +import com.android.hoststubgen.HostStubGenStats +import com.android.hoststubgen.LogLevel +import com.android.hoststubgen.asm.ClassNodes +import com.android.hoststubgen.asm.UnifiedVisitor +import com.android.hoststubgen.asm.getPackageNameFromFullClassName +import com.android.hoststubgen.filters.FilterPolicy +import com.android.hoststubgen.filters.FilterPolicyWithReason +import com.android.hoststubgen.filters.OutputFilter +import com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +import com.android.hoststubgen.log +import java.io.PrintWriter +import org.objectweb.asm.ClassVisitor +import org.objectweb.asm.FieldVisitor +import org.objectweb.asm.MethodVisitor +import org.objectweb.asm.Opcodes +import org.objectweb.asm.commons.ClassRemapper +import org.objectweb.asm.util.TraceClassVisitor + +const val OPCODE_VERSION = Opcodes.ASM9 + +abstract class BaseAdapter( + protected val classes: ClassNodes, + nextVisitor: ClassVisitor, + protected val filter: OutputFilter, + protected val options: Options, +) : ClassVisitor(OPCODE_VERSION, nextVisitor) { + + /** + * Options to control the behavior. + */ + data class Options( + val errors: HostStubGenErrors, + val stats: HostStubGenStats?, + val enablePreTrace: Boolean, + val enablePostTrace: Boolean + ) + + protected lateinit var currentPackageName: String + protected lateinit var currentClassName: String + protected var redirectionClass: String? = null + protected lateinit var classPolicy: FilterPolicyWithReason + + override fun visit( + version: Int, + access: Int, + name: String, + signature: String?, + superName: String?, + interfaces: Array, + ) { + super.visit(version, access, name, signature, superName, interfaces) + currentClassName = name + currentPackageName = getPackageNameFromFullClassName(name) + classPolicy = filter.getPolicyForClass(currentClassName) + redirectionClass = filter.getRedirectionClass(currentClassName) + + log.d("[%s] visit: %s (package: %s)", this.javaClass.simpleName, name, currentPackageName) + log.indent() + log.v("Emitting class: %s", name) + log.indent() + + // Inject annotations to generated classes. + UnifiedVisitor.on(this).visitAnnotation(HostStubGenProcessedAsKeep.CLASS_DESCRIPTOR, true) + } + + override fun visitEnd() { + log.unindent() + log.unindent() + super.visitEnd() + } + + var skipMemberModificationNestCount = 0 + + /** + * This method allows writing class members without any modifications. + */ + protected inline fun writeRawMembers(callback: () -> Unit) { + skipMemberModificationNestCount++ + try { + callback() + } finally { + skipMemberModificationNestCount-- + } + } + + override fun visitField( + access: Int, + name: String, + descriptor: String, + signature: String?, + value: Any?, + ): FieldVisitor? { + if (skipMemberModificationNestCount > 0) { + return super.visitField(access, name, descriptor, signature, value) + } + val policy = filter.getPolicyForField(currentClassName, name) + log.d("visitField: %s %s [%x] Policy: %s", name, descriptor, access, policy) + + log.withIndent { + if (policy.policy == FilterPolicy.Remove) { + log.d("Removing %s %s", name, policy) + return null + } + + log.v("Emitting field: %s %s %s", name, descriptor, policy) + val ret = super.visitField(access, name, descriptor, signature, value) + + UnifiedVisitor.on(ret) + .visitAnnotation(HostStubGenProcessedAsKeep.CLASS_DESCRIPTOR, true) + + return ret + } + } + + override fun visitMethod( + access: Int, + name: String, + descriptor: String, + signature: String?, + exceptions: Array?, + ): MethodVisitor? { + if (skipMemberModificationNestCount > 0) { + return super.visitMethod(access, name, descriptor, signature, exceptions) + } + val p = filter.getPolicyForMethod(currentClassName, name, descriptor) + log.d("visitMethod: %s%s [%x] [%s] Policy: %s", name, descriptor, access, signature, p) + options.stats?.onVisitPolicyForMethod(currentClassName, name, descriptor, p, access) + + log.withIndent { + // If it's a substitute-from method, then skip (== remove). + // Instead of this method, we rename the substitute-to method with the original + // name, in the "Maybe rename the method" part below. + val policy = filter.getPolicyForMethod(currentClassName, name, descriptor) + if (policy.policy == FilterPolicy.Substitute) { + log.d("Skipping %s%s %s", name, descriptor, policy) + return null + } + if (p.policy == FilterPolicy.Remove) { + log.d("Removing %s%s %s", name, descriptor, policy) + return null + } + + var newAccess = access + + // Maybe rename the method. + val newName: String + val renameTo = filter.getRenameTo(currentClassName, name, descriptor) + if (renameTo != null) { + newName = renameTo + + // It's confusing, but here, `newName` is the original method name + // (the one with the @substitute/replace annotation). + // `name` is the name of the method we're currently visiting, so it's usually a + // "...$ravewnwood" name. + newAccess = checkSubstitutionMethodCompatibility( + classes, currentClassName, newName, name, descriptor, options.errors + ) + if (newAccess == NOT_COMPATIBLE) { + return null + } + + log.v( + "Emitting %s.%s%s as %s %s", currentClassName, name, descriptor, + newName, policy + ) + } else { + log.v("Emitting method: %s%s %s", name, descriptor, policy) + newName = name + } + + // Let subclass update the flag. + // But note, we only use it when calling the super's method, + // but not for visitMethodInner(), because when subclass wants to change access, + // it can do so inside visitMethodInner(). + newAccess = updateAccessFlags(newAccess, name, descriptor, policy.policy) + + val ret = visitMethodInner( + access, newName, descriptor, signature, exceptions, policy, + renameTo != null, + super.visitMethod(newAccess, newName, descriptor, signature, exceptions) + ) + + ret?.let { + UnifiedVisitor.on(ret) + .visitAnnotation(HostStubGenProcessedAsKeep.CLASS_DESCRIPTOR, true) + } + + return ret + } + } + + open fun updateAccessFlags( + access: Int, + name: String, + descriptor: String, + policy: FilterPolicy, + ): Int { + return access + } + + abstract fun visitMethodInner( + access: Int, + name: String, + descriptor: String, + signature: String?, + exceptions: Array?, + policy: FilterPolicyWithReason, + substituted: Boolean, + superVisitor: MethodVisitor?, + ): MethodVisitor? + + companion object { + fun getVisitor( + classInternalName: String, + classes: ClassNodes, + nextVisitor: ClassVisitor, + filter: OutputFilter, + packageRedirector: PackageRedirectRemapper, + options: Options, + ): ClassVisitor { + var next = nextVisitor + + val verbosePrinter = PrintWriter(log.getWriter(LogLevel.Verbose)) + + // Inject TraceClassVisitor for debugging. + if (options.enablePostTrace) { + next = TraceClassVisitor(next, verbosePrinter) + } + + // Handle --package-redirect + if (!packageRedirector.isEmpty) { + // Don't apply the remapper on redirect-from classes. + // Otherwise, if the target jar actually contains the "from" classes (which + // may or may not be the case) they'd be renamed. + // But we update all references in other places, so, a method call to a "from" class + // would be replaced with the "to" class. All type references (e.g. variable types) + // will be updated too. + if (!packageRedirector.isTarget(classInternalName)) { + next = ClassRemapper(next, packageRedirector) + } else { + log.v( + "Class $classInternalName is a redirect-from class, not applying" + + " --package-redirect" + ) + } + } + + next = ImplGeneratingAdapter(classes, next, filter, options) + + // Inject TraceClassVisitor for debugging. + if (options.enablePreTrace) { + next = TraceClassVisitor(next, verbosePrinter) + } + return next + } + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/BodyReplacingMethodVisitor.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/BodyReplacingMethodVisitor.kt new file mode 100644 index 000000000000..55d0c0e555f1 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/BodyReplacingMethodVisitor.kt @@ -0,0 +1,324 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.visitors + +import org.objectweb.asm.AnnotationVisitor +import org.objectweb.asm.Attribute +import org.objectweb.asm.Handle +import org.objectweb.asm.Label +import org.objectweb.asm.MethodVisitor +import org.objectweb.asm.TypePath + +/** + * A method visitor that creates or replaces a method body. + * + * Override [emitNewCode] to build the method body. + */ +abstract class BodyReplacingMethodVisitor( + private val createBody: Boolean, + next: MethodVisitor? +) : MethodVisitor(OPCODE_VERSION, next) { + + // Following methods are for things that we need to keep. + // Since they're all calling the super method, we can just remove them, but we keep them + // just to clarify what we're keeping. + + final override fun visitParameter(name: String?, access: Int) { + super.visitParameter(name, access) + } + + final override fun visitAnnotationDefault(): AnnotationVisitor? { + return super.visitAnnotationDefault() + } + + final override fun visitAnnotation(descriptor: String?, visible: Boolean): AnnotationVisitor? { + return super.visitAnnotation(descriptor, visible) + } + + final override fun visitTypeAnnotation( + typeRef: Int, + typePath: TypePath?, + descriptor: String?, + visible: Boolean + ): AnnotationVisitor? { + return super.visitTypeAnnotation(typeRef, typePath, descriptor, visible) + } + + final override fun visitAnnotableParameterCount(parameterCount: Int, visible: Boolean) { + super.visitAnnotableParameterCount(parameterCount, visible) + } + + final override fun visitParameterAnnotation( + parameter: Int, + descriptor: String?, + visible: Boolean + ): AnnotationVisitor? { + return super.visitParameterAnnotation(parameter, descriptor, visible) + } + + final override fun visitAttribute(attribute: Attribute?) { + super.visitAttribute(attribute) + } + + /** + * Control when to emit the code. We use this to ignore all visitXxx method calls caused by + * the original method, so we'll remove all the original code. + * + * Only when visitXxx methods are called from [emitNewCode], we pass-through to the base class, + * so the body will be generated. + * + * (See also https://asm.ow2.io/asm4-guide.pdf section 3.2.1 about the MethovVisitor + * call order.) + */ + private var emitCode = false + + /** + * This value will be set as true when [visitCode] is called. In [visitEnd], if this value + * is still false, this means that the original method does not have a body. + * + * We want to forcefully inject a method body in [visitEnd] if [createBody] is true. + */ + private var visitedCode = false + + final override fun visitCode() { + visitedCode = true + super.visitCode() + + try { + emitCode = true + + emitNewCode() + } finally { + emitCode = false + } + } + + final override fun visitEnd() { + if (!visitedCode && createBody) { + visitCode() + } + super.visitEnd() + } + + /** + * Subclass must implement it and emit code, and call [visitMaxs] at the end. + */ + abstract fun emitNewCode() + + final override fun visitMaxs(maxStack: Int, maxLocals: Int) { + if (emitCode) { + super.visitMaxs(maxStack, maxLocals) + } + } + + // Following methods are called inside a method body, and we don't want to + // emit any of them, so they are all no-op. + + final override fun visitFrame( + type: Int, + numLocal: Int, + local: Array?, + numStack: Int, + stack: Array? + ) { + if (emitCode) { + super.visitFrame(type, numLocal, local, numStack, stack) + } + } + + final override fun visitInsn(opcode: Int) { + if (emitCode) { + super.visitInsn(opcode) + } + } + + final override fun visitIntInsn(opcode: Int, operand: Int) { + if (emitCode) { + super.visitIntInsn(opcode, operand) + } + } + + final override fun visitVarInsn(opcode: Int, varIndex: Int) { + if (emitCode) { + super.visitVarInsn(opcode, varIndex) + } + } + + final override fun visitTypeInsn(opcode: Int, type: String?) { + if (emitCode) { + super.visitTypeInsn(opcode, type) + } + } + + final override fun visitFieldInsn( + opcode: Int, + owner: String?, + name: String?, + descriptor: String? + ) { + if (emitCode) { + super.visitFieldInsn(opcode, owner, name, descriptor) + } + } + + final override fun visitMethodInsn( + opcode: Int, + owner: String?, + name: String?, + descriptor: String?, + isInterface: Boolean + ) { + if (emitCode) { + super.visitMethodInsn(opcode, owner, name, descriptor, isInterface) + } + } + + final override fun visitInvokeDynamicInsn( + name: String?, + descriptor: String?, + bootstrapMethodHandle: Handle?, + vararg bootstrapMethodArguments: Any? + ) { + if (emitCode) { + super.visitInvokeDynamicInsn( + name, descriptor, bootstrapMethodHandle, + *bootstrapMethodArguments + ) + } + } + + final override fun visitJumpInsn(opcode: Int, label: Label?) { + if (emitCode) { + super.visitJumpInsn(opcode, label) + } + } + + final override fun visitLabel(label: Label?) { + if (emitCode) { + super.visitLabel(label) + } + } + + final override fun visitLdcInsn(value: Any?) { + if (emitCode) { + super.visitLdcInsn(value) + } + } + + final override fun visitIincInsn(varIndex: Int, increment: Int) { + if (emitCode) { + super.visitIincInsn(varIndex, increment) + } + } + + final override fun visitTableSwitchInsn( + min: Int, + max: Int, + dflt: Label?, + vararg labels: Label? + ) { + if (emitCode) { + super.visitTableSwitchInsn(min, max, dflt, *labels) + } + } + + final override fun visitLookupSwitchInsn( + dflt: Label?, + keys: IntArray?, + labels: Array? + ) { + if (emitCode) { + super.visitLookupSwitchInsn(dflt, keys, labels) + } + } + + final override fun visitMultiANewArrayInsn(descriptor: String?, numDimensions: Int) { + if (emitCode) { + super.visitMultiANewArrayInsn(descriptor, numDimensions) + } + } + + final override fun visitInsnAnnotation( + typeRef: Int, + typePath: TypePath?, + descriptor: String?, + visible: Boolean + ): AnnotationVisitor? { + if (emitCode) { + return super.visitInsnAnnotation(typeRef, typePath, descriptor, visible) + } + return null + } + + final override fun visitTryCatchBlock( + start: Label?, + end: Label?, + handler: Label?, + type: String? + ) { + if (emitCode) { + super.visitTryCatchBlock(start, end, handler, type) + } + } + + final override fun visitTryCatchAnnotation( + typeRef: Int, + typePath: TypePath?, + descriptor: String?, + visible: Boolean + ): AnnotationVisitor? { + if (emitCode) { + return super.visitTryCatchAnnotation(typeRef, typePath, descriptor, visible) + } + return null + } + + final override fun visitLocalVariable( + name: String?, + descriptor: String?, + signature: String?, + start: Label?, + end: Label?, + index: Int + ) { + if (emitCode) { + super.visitLocalVariable(name, descriptor, signature, start, end, index) + } + } + + final override fun visitLocalVariableAnnotation( + typeRef: Int, + typePath: TypePath?, + start: Array?, + end: Array?, + index: IntArray?, + descriptor: String?, + visible: Boolean + ): AnnotationVisitor? { + if (emitCode) { + return super.visitLocalVariableAnnotation( + typeRef, typePath, start, end, index, descriptor, visible + ) + } + return null + } + + final override fun visitLineNumber(line: Int, start: Label?) { + if (emitCode) { + super.visitLineNumber(line, start) + } + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/Helper.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/Helper.kt new file mode 100644 index 000000000000..dc4f26bdda34 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/Helper.kt @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.visitors + +import com.android.hoststubgen.HostStubGenErrors +import com.android.hoststubgen.asm.ClassNodes +import com.android.hoststubgen.asm.clearVisibility +import com.android.hoststubgen.asm.getVisibility +import com.android.hoststubgen.asm.isStatic + +const val NOT_COMPATIBLE: Int = -1 + +/** + * Make sure substitution from and to methods have matching definition. + * (static-ness, etc) + * + * If the methods are compatible, return the "merged" [access] of the new method. + * + * If they are not compatible, returns [NOT_COMPATIBLE] + */ +fun checkSubstitutionMethodCompatibility( + classes: ClassNodes, + className: String, + fromMethodName: String, // the one with the annotation + toMethodName: String, // the one with either a "_host" or "$ravenwood" prefix. (typically) + descriptor: String, + errors: HostStubGenErrors, +): Int { + val from = classes.findMethod(className, fromMethodName, descriptor) + if (from == null) { + errors.onErrorFound( + "Substitution-from method not found: $className.$fromMethodName$descriptor" + ) + return NOT_COMPATIBLE + } + val to = classes.findMethod(className, toMethodName, descriptor) + if (to == null) { + // This shouldn't happen, because the visitor visited this method... + errors.onErrorFound( + "Substitution-to method not found: $className.$toMethodName$descriptor" + ) + return NOT_COMPATIBLE + } + + if (from.isStatic() != to.isStatic()) { + errors.onErrorFound( + "Substitution method must have matching static-ness: " + + "$className.$fromMethodName$descriptor" + ) + return NOT_COMPATIBLE + } + + // Return the substitution's access flag but with the original method's visibility. + return clearVisibility (to.access) or getVisibility(from.access) +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/ImplGeneratingAdapter.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/ImplGeneratingAdapter.kt new file mode 100644 index 000000000000..567a69e43b58 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/ImplGeneratingAdapter.kt @@ -0,0 +1,427 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.visitors + +import com.android.hoststubgen.asm.CLASS_INITIALIZER_DESC +import com.android.hoststubgen.asm.CLASS_INITIALIZER_NAME +import com.android.hoststubgen.asm.ClassNodes +import com.android.hoststubgen.asm.prependArgTypeToMethodDescriptor +import com.android.hoststubgen.asm.writeByteCodeToPushArguments +import com.android.hoststubgen.asm.writeByteCodeToReturn +import com.android.hoststubgen.filters.FilterPolicy +import com.android.hoststubgen.filters.FilterPolicyWithReason +import com.android.hoststubgen.filters.OutputFilter +import com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore +import com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute +import com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow +import com.android.hoststubgen.hosthelper.HostTestUtils +import com.android.hoststubgen.log +import org.objectweb.asm.ClassVisitor +import org.objectweb.asm.MethodVisitor +import org.objectweb.asm.Opcodes +import org.objectweb.asm.Opcodes.INVOKEINTERFACE +import org.objectweb.asm.Opcodes.INVOKESTATIC +import org.objectweb.asm.Opcodes.INVOKEVIRTUAL +import org.objectweb.asm.Type + +/** + * An adapter that generates the "impl" class file from an input class file. + */ +class ImplGeneratingAdapter( + classes: ClassNodes, + nextVisitor: ClassVisitor, + filter: OutputFilter, + options: Options, +) : BaseAdapter(classes, nextVisitor, filter, options) { + + private var classLoadHooks: List = emptyList() + + override fun visit( + version: Int, + access: Int, + name: String, + signature: String?, + superName: String?, + interfaces: Array + ) { + super.visit(version, access, name, signature, superName, interfaces) + + classLoadHooks = filter.getClassLoadHooks(currentClassName) + + // classLoadHookMethod is non-null, then we need to inject code to call it + // in the class initializer. + // If the target class already has a class initializer, then we need to inject code to it. + // Otherwise, we need to create one. + + if (classLoadHooks.isNotEmpty()) { + log.d(" ClassLoadHooks: $classLoadHooks") + if (!classes.hasClassInitializer(currentClassName)) { + injectClassLoadHook() + } + } + } + + private fun injectClassLoadHook() { + writeRawMembers { + // Create a class initializer to call onClassLoaded(). + // Each class can only have at most one class initializer, but the base class + // StaticInitMerger will merge it with the existing one, if any. + visitMethod( + Opcodes.ACC_PRIVATE or Opcodes.ACC_STATIC, + CLASS_INITIALIZER_NAME, + "()V", + null, + null + )!!.let { mv -> + // Method prologue + mv.visitCode() + + writeClassLoadHookCalls(mv) + mv.visitInsn(Opcodes.RETURN) + + // Method epilogue + mv.visitMaxs(0, 0) + mv.visitEnd() + } + } + } + + private fun writeClassLoadHookCalls(mv: MethodVisitor) { + classLoadHooks.forEach { classLoadHook -> + // First argument: the class type. + mv.visitLdcInsn(Type.getType("L$currentClassName;")) + + // Second argument: method name + mv.visitLdcInsn(classLoadHook) + + // Call HostTestUtils.onClassLoaded(). + mv.visitMethodInsn( + INVOKESTATIC, + HostTestUtils.CLASS_INTERNAL_NAME, + "onClassLoaded", + "(Ljava/lang/Class;Ljava/lang/String;)V", + false + ) + } + } + + override fun updateAccessFlags( + access: Int, + name: String, + descriptor: String, + policy: FilterPolicy, + ): Int { + if (policy.isMethodRewriteBody) { + // If we are rewriting the entire method body, we need + // to convert native methods to non-native + return access and Opcodes.ACC_NATIVE.inv() + } + return access + } + + override fun visitMethodInner( + access: Int, + name: String, + descriptor: String, + signature: String?, + exceptions: Array?, + policy: FilterPolicyWithReason, + substituted: Boolean, + superVisitor: MethodVisitor?, + ): MethodVisitor? { + var innerVisitor = superVisitor + + // If method logging is enabled, inject call to the logging method. + val methodCallHooks = filter.getMethodCallHooks(currentClassName, name, descriptor) + if (methodCallHooks.isNotEmpty()) { + innerVisitor = MethodCallHookInjectingAdapter( + name, + descriptor, + methodCallHooks, + innerVisitor, + ) + } + + // If this class already has a class initializer and a class load hook is needed, then + // we inject code. + if (classLoadHooks.isNotEmpty() && + name == CLASS_INITIALIZER_NAME && + descriptor == CLASS_INITIALIZER_DESC + ) { + innerVisitor = ClassLoadHookInjectingMethodAdapter(innerVisitor) + } + + fun MethodVisitor.withAnnotation(descriptor: String): MethodVisitor { + this.visitAnnotation(descriptor, true) + return this + } + + log.withIndent { + // When we encounter native methods, we want to forcefully + // inject a method body. Also see [updateAccessFlags]. + val forceCreateBody = (access and Opcodes.ACC_NATIVE) != 0 + when (policy.policy) { + FilterPolicy.Throw -> { + log.v("Making method throw...") + return ThrowingMethodAdapter(forceCreateBody, innerVisitor) + .withAnnotation(HostStubGenProcessedAsThrow.CLASS_DESCRIPTOR) + } + FilterPolicy.Ignore -> { + log.v("Making method ignored...") + return IgnoreMethodAdapter(descriptor, forceCreateBody, innerVisitor) + .withAnnotation(HostStubGenProcessedAsIgnore.CLASS_DESCRIPTOR) + } + FilterPolicy.Redirect -> { + log.v("Redirecting method...") + return RedirectMethodAdapter( + access, name, descriptor, + forceCreateBody, innerVisitor + ) + .withAnnotation(HostStubGenProcessedAsSubstitute.CLASS_DESCRIPTOR) + } + else -> {} + } + } + + if (filter.hasAnyMethodCallReplace()) { + innerVisitor = MethodCallReplacingAdapter(name, innerVisitor) + } + if (substituted) { + innerVisitor?.withAnnotation(HostStubGenProcessedAsSubstitute.CLASS_DESCRIPTOR) + } + + return innerVisitor + } + + /** + * A method adapter that replaces the method body with a HostTestUtils.onThrowMethodCalled() + * call. + */ + private inner class ThrowingMethodAdapter( + createBody: Boolean, + next: MethodVisitor? + ) : BodyReplacingMethodVisitor(createBody, next) { + override fun emitNewCode() { + visitMethodInsn( + INVOKESTATIC, + HostTestUtils.CLASS_INTERNAL_NAME, + "onThrowMethodCalled", + "()V", + false + ) + + // We still need a RETURN opcode for the return type. + // For now, let's just inject a `throw`. + visitTypeInsn(Opcodes.NEW, "java/lang/RuntimeException") + visitInsn(Opcodes.DUP) + visitLdcInsn("Unreachable") + visitMethodInsn( + Opcodes.INVOKESPECIAL, "java/lang/RuntimeException", + "", "(Ljava/lang/String;)V", false + ) + visitInsn(Opcodes.ATHROW) + + // visitMaxs(3, if (isStatic) 0 else 1) + visitMaxs(0, 0) // We let ASM figure them out. + } + } + + /** + * A method adapter that replaces the method body with a no-op return. + */ + private inner class IgnoreMethodAdapter( + val descriptor: String, + createBody: Boolean, + next: MethodVisitor? + ) : BodyReplacingMethodVisitor(createBody, next) { + override fun emitNewCode() { + when (Type.getReturnType(descriptor)) { + Type.VOID_TYPE -> visitInsn(Opcodes.RETURN) + Type.BOOLEAN_TYPE, Type.BYTE_TYPE, Type.CHAR_TYPE, Type.SHORT_TYPE, + Type.INT_TYPE -> { + visitInsn(Opcodes.ICONST_0) + visitInsn(Opcodes.IRETURN) + } + Type.LONG_TYPE -> { + visitInsn(Opcodes.LCONST_0) + visitInsn(Opcodes.LRETURN) + } + Type.FLOAT_TYPE -> { + visitInsn(Opcodes.FCONST_0) + visitInsn(Opcodes.FRETURN) + } + Type.DOUBLE_TYPE -> { + visitInsn(Opcodes.DCONST_0) + visitInsn(Opcodes.DRETURN) + } + else -> { + visitInsn(Opcodes.ACONST_NULL) + visitInsn(Opcodes.ARETURN) + } + } + visitMaxs(0, 0) // We let ASM figure them out. + } + } + + /** + * A method adapter that rewrite a method body with a + * call to a method in the redirection class. + */ + private inner class RedirectMethodAdapter( + access: Int, + private val name: String, + private val descriptor: String, + createBody: Boolean, + next: MethodVisitor? + ) : BodyReplacingMethodVisitor(createBody, next) { + + private val isStatic = (access and Opcodes.ACC_STATIC) != 0 + + override fun emitNewCode() { + var targetDescriptor = descriptor + var argOffset = 0 + + // For non-static method, we need to tweak it a bit. + if (!isStatic) { + // Push `this` as the first argument. + this.visitVarInsn(Opcodes.ALOAD, 0) + + // Update the descriptor -- add this class's type as the first argument + // to the method descriptor. + targetDescriptor = prependArgTypeToMethodDescriptor( + descriptor, + currentClassName, + ) + + // Shift the original arguments by one. + argOffset = 1 + } + + writeByteCodeToPushArguments(descriptor, this, argOffset) + + visitMethodInsn( + INVOKESTATIC, + redirectionClass, + name, + targetDescriptor, + false + ) + + writeByteCodeToReturn(descriptor, this) + + visitMaxs(99, 0) // We let ASM figure them out. + } + } + + /** + * Inject calls to the method call hooks. + * + * Note, when the target method is a constructor, it may contain calls to `super(...)` or + * `this(...)`. The logging code will be injected *before* such calls. + */ + private inner class MethodCallHookInjectingAdapter( + val name: String, + val descriptor: String, + val hooks: List, + next: MethodVisitor?, + ) : MethodVisitor(OPCODE_VERSION, next) { + override fun visitCode() { + super.visitCode() + + hooks.forEach { hook -> + mv.visitLdcInsn(Type.getType("L$currentClassName;")) + visitLdcInsn(name) + visitLdcInsn(descriptor) + visitLdcInsn(hook) + + visitMethodInsn( + INVOKESTATIC, + HostTestUtils.CLASS_INTERNAL_NAME, + "callMethodCallHook", + "(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", + false + ) + } + } + } + + /** + * Inject a class load hook call. + */ + private inner class ClassLoadHookInjectingMethodAdapter( + next: MethodVisitor? + ) : MethodVisitor(OPCODE_VERSION, next) { + override fun visitCode() { + super.visitCode() + + writeClassLoadHookCalls(this) + } + } + + private inner class MethodCallReplacingAdapter( + val callerMethodName: String, + next: MethodVisitor?, + ) : MethodVisitor(OPCODE_VERSION, next) { + override fun visitMethodInsn( + opcode: Int, + owner: String?, + name: String?, + descriptor: String?, + isInterface: Boolean, + ) { + when (opcode) { + INVOKESTATIC, INVOKEVIRTUAL, INVOKEINTERFACE -> {} + else -> { + // Don't touch other opcodes. + super.visitMethodInsn(opcode, owner, name, descriptor, isInterface) + return + } + } + val to = filter.getMethodCallReplaceTo( + currentClassName, callerMethodName, owner!!, name!!, descriptor!! + ) + + if (to == null + // Don't replace if the target is the callsite. + || (to.className == currentClassName && to.methodName == callerMethodName) + ) { + super.visitMethodInsn(opcode, owner, name, descriptor, isInterface) + return + } + + // Replace the method call with a (static) call to the target method. + // If it's a non-static call, the target method's first argument will receive "this". + // (Because of that, we don't need to manipulate the stack. Just replace the + // method call.) + + val toDesc = if (opcode == INVOKESTATIC) { + // Static call to static call, no need to change the desc. + descriptor + } else { + // Need to prepend the "this" type to the descriptor. + prependArgTypeToMethodDescriptor(descriptor, owner) + } + + mv.visitMethodInsn( + INVOKESTATIC, + to.className, + to.methodName, + toDesc, + false + ) + } + } +} diff --git a/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/PackageRedirectRemapper.kt b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/PackageRedirectRemapper.kt new file mode 100644 index 000000000000..e90ecd7ef678 --- /dev/null +++ b/ravenwood/tools/hoststubgen/src/com/android/hoststubgen/visitors/PackageRedirectRemapper.kt @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.visitors + +import com.android.hoststubgen.asm.toJvmClassName +import org.objectweb.asm.commons.Remapper + +/** + * A [Remapper] for `--package-redirect` + * + * This is a feature to update all calls to specific packages to another package, which allows + * implementing a class in a different package, when the original package isn't allowed to modify. + * + * For example, using this, we can implement `dalvik.*` APIs in a separate package, and update + * all calls to the `dalvik` package to a different package. + * + * For this purpose, we don't expect the "renamed-from" classes to be in the target jar, + * so we don't apply the remapper to them. (The exclusion happens at the callsite of this class) + * + * TODO: Currently it's not used. Maybe remove, or just unify with the other remapper feature + * with TextFileFilterPolicyParser.kt. + */ +class PackageRedirectRemapper( + packageRedirects: List>, + ) : Remapper() { + + /** + * Example: `dalvik/` -> `com/android/hostsubgen/substitution/dalvik/` + */ + private val packageRedirectsWithSlash: List> = packageRedirects.map { + p -> Pair(p.first.toJvmClassName() + "/", p.second.toJvmClassName() + "/") + } + + /** + * Cache. + * If a class is a redirect-from class, then the "to" class name will be stored as the value. + * Otherwise, "" will be stored. + */ + private val cache = mutableMapOf() + + /** + * Return whether any redirect is defined. + */ + val isEmpty get() = packageRedirectsWithSlash.isEmpty() + + override fun map(internalName: String?): String? { + if (internalName == null) { + return null + } + val to = mapInner(internalName) + return to ?: internalName + } + + /** + * Internal "map" function. Unlike [map(String)], this method will return null + * if a class is not a redirect-from class. + */ + private fun mapInner(internalName: String): String? { + cache[internalName]?.let { + return if (it.isEmpty()) null else it + } + + var ret = "" + packageRedirectsWithSlash.forEach { fromTo -> + if (internalName.startsWith(fromTo.first)) { + ret = fromTo.second + internalName.substring(fromTo.first.length) + } + } + cache.set(internalName, ret) + + return if (ret.isEmpty()) null else ret + } + + /** + * Return true if a class is a redirect-from class. + */ + fun isTarget(internalName: String): Boolean { + return mapInner(internalName) != null + } +} + diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/Android.bp b/ravenwood/tools/hoststubgen/test-tiny-framework/Android.bp new file mode 100644 index 000000000000..1570549ec27d --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/Android.bp @@ -0,0 +1,166 @@ +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "frameworks_base_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["frameworks_base_license"], +} + +// A library that simulates framework-all.jar +java_library { + name: "hoststubgen-test-tiny-framework", + installable: true, + host_supported: true, + srcs: ["tiny-framework/src/**/*.java"], + static_libs: [ + "hoststubgen-annotations", + ], + visibility: ["//frameworks/base/ravenwood/tools/hoststubgen:__subpackages__"], +} + +// Create stub/impl jars from "hoststubgen-test-tiny-framework", using the following 3 rules. +java_genrule_host { + name: "hoststubgen-test-tiny-framework-host-base", + defaults: ["hoststubgen-command-defaults"], + cmd: hoststubgen_common_options + + "--in-jar $(location :hoststubgen-test-tiny-framework) " + + "--policy-override-file $(location policy-override-tiny-framework.txt) " + + "--package-redirect com.unsupported:com.supported ", + srcs: [ + ":hoststubgen-test-tiny-framework", + "policy-override-tiny-framework.txt", + ], + visibility: ["//visibility:private"], +} + +java_genrule_host { + name: "hoststubgen-test-tiny-framework-host", + cmd: "cp $(in) $(out)", + srcs: [ + ":hoststubgen-test-tiny-framework-host-base{host.jar}", + ], + out: [ + "host.jar", + ], + visibility: ["//visibility:private"], +} + +// Same as "hoststubgen-test-tiny-framework-host", but with more options, to test more hoststubgen +// features. +java_genrule_host { + name: "hoststubgen-test-tiny-framework-host-ext-base", + defaults: ["hoststubgen-command-defaults"], + cmd: hoststubgen_common_options + + "--in-jar $(location :hoststubgen-test-tiny-framework) " + + "--policy-override-file $(location policy-override-tiny-framework.txt) " + + "--package-redirect com.unsupported:com.supported " + + + // More options. + "--default-method-call-hook com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall " + + "--default-class-load-hook com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded ", + srcs: [ + ":hoststubgen-test-tiny-framework", + "policy-override-tiny-framework.txt", + ], + visibility: ["//visibility:private"], +} + +java_genrule_host { + name: "hoststubgen-test-tiny-framework-host-ext", + cmd: "cp $(in) $(out)", + srcs: [ + ":hoststubgen-test-tiny-framework-host-ext-base{host.jar}", + ], + out: [ + "host.jar", + ], + visibility: ["//visibility:private"], +} + +// Compile the test jar, using 2 rules. +// 1. Build the test against the original framework. +java_library_host { + name: "hoststubgen-test-tiny-test-lib", + srcs: ["tiny-test/src/**/*.java"], + + libs: [ + "hoststubgen-test-tiny-framework", + ], + static_libs: [ + "junit", + "truth", + + // http://cs/h/googleplex-android/platform/superproject/main/+/main:platform_testing/libraries/annotations/src/android/platform/test/annotations/ + "platform-test-annotations", + ], + visibility: ["//visibility:private"], +} + +// 2. Link "hoststubgen-test-tiny-test-lib" with necessary runtime dependencies, so it can be +// executed stand-alone. +java_test_host { + name: "hoststubgen-test-tiny-test", + test_config: "AndroidTest-host.xml", + static_libs: [ + "hoststubgen-test-tiny-test-lib", + "hoststubgen-helper-runtime", + "hoststubgen-test-tiny-framework-host", + ], + test_suites: ["general-tests"], +} + +// Dump the original, stub and impl jars as text files. +// We use them in test-and-update-golden.sh. +java_genrule_host { + name: "hoststubgen-test-tiny-framework-orig-dump", + defaults: ["hoststubgen-jar-dump-defaults"], + srcs: [ + ":hoststubgen-test-tiny-framework", + ], + out: [ + "01-hoststubgen-test-tiny-framework-orig-dump.txt", + ], + visibility: ["//visibility:private"], +} + +java_genrule_host { + name: "hoststubgen-test-tiny-framework-host-dump", + defaults: ["hoststubgen-jar-dump-defaults"], + srcs: [ + ":hoststubgen-test-tiny-framework-host", + ], + out: [ + "03-hoststubgen-test-tiny-framework-host-dump.txt", + ], + visibility: ["//visibility:private"], +} + +java_genrule_host { + name: "hoststubgen-test-tiny-framework-host-ext-dump", + defaults: ["hoststubgen-jar-dump-defaults"], + srcs: [ + ":hoststubgen-test-tiny-framework-host-ext", + ], + out: [ + "13-hoststubgen-test-tiny-framework-host-ext-dump.txt", + ], + visibility: ["//visibility:private"], +} + +// Run it with `atest`. Compare the dump of the jar files to the golden output. +python_test_host { + name: "tiny-framework-dump-test", + srcs: [ + "tiny-framework-dump-test.py", + ], + data: [ + "golden-output/*.txt", + ], + java_data: [ + "hoststubgen-test-tiny-framework-orig-dump", + "hoststubgen-test-tiny-framework-host-dump", + "hoststubgen-test-tiny-framework-host-ext-dump", + ], + test_suites: ["general-tests"], +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/AndroidTest-host.xml b/ravenwood/tools/hoststubgen/test-tiny-framework/AndroidTest-host.xml new file mode 100644 index 000000000000..84aad69c33bc --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/AndroidTest-host.xml @@ -0,0 +1,29 @@ + + + + + + diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/README.md b/ravenwood/tools/hoststubgen/test-tiny-framework/README.md new file mode 100644 index 000000000000..344b4e953b23 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/README.md @@ -0,0 +1,21 @@ +# HostStubGen: tiny-framework test + +This directory contains a small classes that "simulates" framework.jar, and tests against it. + +This test is agnostic to Android, and it doesn't use any android framework code or knowledge. + +## How to run + +- With `atest`. This is the proper way to run it, but `atest` has known problems that may + affect the result. If you see weird problems, try the next `run-ravenwood-test` command. + +``` +$ atest hoststubgen-test-tiny-test +``` + +- `run-test-manually.sh` also run the test, but it builds the stub/impl jars and the test without + using the build system. This is useful for debugging the tool. + +``` +$ ./run-test-manually.sh +``` \ No newline at end of file diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/annotation-allowed-classes-tiny-framework.txt b/ravenwood/tools/hoststubgen/test-tiny-framework/annotation-allowed-classes-tiny-framework.txt new file mode 100644 index 000000000000..de4cb0c536c1 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/annotation-allowed-classes-tiny-framework.txt @@ -0,0 +1,29 @@ +# Only classes listed here can use the hoststubgen annotations. + +# For each class, we check each item in this file, and when a match is found, we +# either allow it if the line doesn't have a !, or disallow if the line has a !. +# All the lines after the matching line will be ignored. + + +# To allow a specific class to use annotations: +# com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations + +# To disallow a specific class to use annotations: +# !com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations + +# To allow a specific package to use annotations: +# com.android.hoststubgen.test.* + +# To disallow a specific package to use annotations: +# !com.android.hoststubgen.test.* + + +com.android.hoststubgen.test.tinyframework.* +com.supported.* +com.unsupported.* + +# Use this to allow all packages +# * + +# Use this to allow all packages +# !* \ No newline at end of file diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/diff-and-update-golden.sh b/ravenwood/tools/hoststubgen/test-tiny-framework/diff-and-update-golden.sh new file mode 100755 index 000000000000..3726ca972564 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/diff-and-update-golden.sh @@ -0,0 +1,134 @@ +#!/bin/bash +# Copyright (C) 2023 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +help() { + cat <<'EOF' + + diff-and-update-golden.sh [OPTIONS] + + Compare the generated jar files from tiny-framework to the "golden" files. + + OPTIONS: + -u: Update the golden files. + + -3: Run `meld` to compare original, stub and impl jar files in 3-way diff. + This is useful to visualize the exact differences between 3 jar files. + + -2: Run `meld` to compare original <-> impl, and impl <-> stub as two different diffs. +EOF +} + +source "${0%/*}"/../../common.sh + +SCRIPT_NAME="${0##*/}" + +GOLDEN_DIR=golden-output +mkdir -p $GOLDEN_DIR + +DIFF_CMD=${DIFF:-diff -u --ignore-blank-lines --ignore-space-change} + +update=0 +three_way=0 +two_way=0 +while getopts "u32" opt; do +case "$opt" in + u) + update=1 + ;; + 3) + three_way=1 + ;; + 2) + two_way=1 + ;; + '?') + help + exit 1 + ;; +esac +done +shift $(($OPTIND - 1)) + + +# Build the dump files, which are the input of this test. +run m dump-jar tiny-framework-dump-test + + +# Get the path to the generate text files. (not the golden files.) +# We get them from $OUT/module-info.json + +files=( +$(python3 -c ' +import sys +import os +import json + +with open(sys.argv[1], "r") as f: + data = json.load(f) + + # Equivalent to: jq -r '.["tiny-framework-dump-test"]["installed"][]' + for path in data["tiny-framework-dump-test"]["installed"]: + + if "golden-output" in path: + continue + if path.endswith(".txt"): + print(os.getenv("ANDROID_BUILD_TOP") + "/" + path) +' $OUT/module-info.json) +) + +# Next, compare each file and update them in $GOLDEN_DIR + +any_file_changed=0 + +for file in ${files[*]} ; do + name=$(basename $file) + echo "# Checking $name ..." + + file_changed=0 + if run $DIFF_CMD $GOLDEN_DIR/$name $file; then + : # No diff + else + file_changed=1 + any_file_changed=1 + fi + + if (( $update && $file_changed )) ; then + echo "# Updating $name ..." + run cp $file $GOLDEN_DIR/$name + fi +done + +if (( $three_way )) ; then + echo "# Running 3-way diff with meld..." + run meld ${files[0]} ${files[1]} ${files[2]} & +fi + +if (( $two_way )) ; then + echo "# Running meld..." + run meld --diff ${files[0]} ${files[1]} --diff ${files[1]} ${files[2]} --diff ${files[0]} ${files[2]} +fi + +if (( $any_file_changed == 0 )) ; then + echo "$SCRIPT_NAME: Success: no changes detected." + exit 0 +else + if (( $update )) ; then + echo "$SCRIPT_NAME: Warning: golden files have been updated." + exit 2 + else + echo "$SCRIPT_NAME: Failure: changes detected. See above diff for the details." + exit 3 + fi +fi diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/01-hoststubgen-test-tiny-framework-orig-dump.txt b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/01-hoststubgen-test-tiny-framework-orig-dump.txt new file mode 100644 index 000000000000..103e152c7e39 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/01-hoststubgen-test-tiny-framework-orig-dump.txt @@ -0,0 +1,3718 @@ +## Class: android/hosttest/annotation/HostSideTestClassLoadHook.class + Compiled from "HostSideTestClassLoadHook.java" +public interface android.hosttest.annotation.HostSideTestClassLoadHook extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestClassLoadHook + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 2 + public abstract java.lang.String value(); + descriptor: ()Ljava/lang/String; + flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT +} +SourceFile: "HostSideTestClassLoadHook.java" +RuntimeVisibleAnnotations: + x: #x(#x=[e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestIgnore.class + Compiled from "HostSideTestIgnore.java" +public interface android.hosttest.annotation.HostSideTestIgnore extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestIgnore + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "HostSideTestIgnore.java" +RuntimeVisibleAnnotations: + x: #x(#x=[e#x.#x,e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestKeep.class + Compiled from "HostSideTestKeep.java" +public interface android.hosttest.annotation.HostSideTestKeep extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestKeep + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "HostSideTestKeep.java" +RuntimeVisibleAnnotations: + x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestRedirect.class + Compiled from "HostSideTestRedirect.java" +public interface android.hosttest.annotation.HostSideTestRedirect extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestRedirect + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "HostSideTestRedirect.java" +RuntimeVisibleAnnotations: + x: #x(#x=[e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.METHOD] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestRedirectionClass.class + Compiled from "HostSideTestRedirectionClass.java" +public interface android.hosttest.annotation.HostSideTestRedirectionClass extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestRedirectionClass + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 2 + public abstract java.lang.String value(); + descriptor: ()Ljava/lang/String; + flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT +} +SourceFile: "HostSideTestRedirectionClass.java" +RuntimeVisibleAnnotations: + x: #x(#x=[e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestRemove.class + Compiled from "HostSideTestRemove.java" +public interface android.hosttest.annotation.HostSideTestRemove extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestRemove + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "HostSideTestRemove.java" +RuntimeVisibleAnnotations: + x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestStaticInitializerKeep.class + Compiled from "HostSideTestStaticInitializerKeep.java" +public interface android.hosttest.annotation.HostSideTestStaticInitializerKeep extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestStaticInitializerKeep + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "HostSideTestStaticInitializerKeep.java" +RuntimeVisibleAnnotations: + x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestSubstitute.class + Compiled from "HostSideTestSubstitute.java" +public interface android.hosttest.annotation.HostSideTestSubstitute extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestSubstitute + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 2 + public abstract java.lang.String suffix(); + descriptor: ()Ljava/lang/String; + flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT +} +SourceFile: "HostSideTestSubstitute.java" +RuntimeVisibleAnnotations: + x: #x(#x=[e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.METHOD] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestThrow.class + Compiled from "HostSideTestThrow.java" +public interface android.hosttest.annotation.HostSideTestThrow extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestThrow + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "HostSideTestThrow.java" +RuntimeVisibleAnnotations: + x: #x(#x=[e#x.#x,e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestWholeClassKeep.class + Compiled from "HostSideTestWholeClassKeep.java" +public interface android.hosttest.annotation.HostSideTestWholeClassKeep extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestWholeClassKeep + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "HostSideTestWholeClassKeep.java" +RuntimeVisibleAnnotations: + x: #x(#x=[e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/tests/HostSideTestSuppress.class + Compiled from "HostSideTestSuppress.java" +public interface android.hosttest.annotation.tests.HostSideTestSuppress extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/tests/HostSideTestSuppress + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "HostSideTestSuppress.java" +RuntimeVisibleAnnotations: + x: #x(#x=[e#x.#x,e#x.#x,e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD] + ) +## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy.class + Compiled from "IPretendingAidl.java" +public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Proxy + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 2, attributes: 3 + public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Proxy(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy; + + public static int addTwo(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: iload_0 + x: iconst_2 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 a I +} +SourceFile: "IPretendingAidl.java" +NestHost: class com/android/hoststubgen/test/tinyframework/IPretendingAidl +InnerClasses: + public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl + public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub +## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub.class + Compiled from "IPretendingAidl.java" +public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 2, attributes: 3 + public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub; + + public static int addOne(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: iload_0 + x: iconst_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 a I +} +SourceFile: "IPretendingAidl.java" +NestHost: class com/android/hoststubgen/test/tinyframework/IPretendingAidl +InnerClasses: + public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl + public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub +## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl.class + Compiled from "IPretendingAidl.java" +public interface com.android.hoststubgen.test.tinyframework.IPretendingAidl + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 0, attributes: 3 +} +SourceFile: "IPretendingAidl.java" +NestMembers: + com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub + com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy +InnerClasses: + public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl + public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub +## Class: com/android/hoststubgen/test/tinyframework/R$Nested.class + Compiled from "R.java" +public class com.android.hoststubgen.test.tinyframework.R$Nested + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/R$Nested + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 2, attributes: 3 + public static int[] ARRAY; + descriptor: [I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + + public com.android.hoststubgen.test.tinyframework.R$Nested(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/R$Nested; + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: iconst_1 + x: newarray int + x: dup + x: iconst_0 + x: iconst_1 + x: iastore + x: putstatic #x // Field ARRAY:[I + x: return + LineNumberTable: +} +SourceFile: "R.java" +NestHost: class com/android/hoststubgen/test/tinyframework/R +InnerClasses: + public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/R$Nested of class com/android/hoststubgen/test/tinyframework/R +## Class: com/android/hoststubgen/test/tinyframework/R.class + Compiled from "R.java" +public class com.android.hoststubgen.test.tinyframework.R + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/R + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 3 + public com.android.hoststubgen.test.tinyframework.R(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/R; +} +SourceFile: "R.java" +NestMembers: + com/android/hoststubgen/test/tinyframework/R$Nested +InnerClasses: + public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/R$Nested of class com/android/hoststubgen/test/tinyframework/R +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.class + Compiled from "TinyFrameworkAnnotations.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 9, attributes: 2 + public int keep; + descriptor: I + flags: (0x0001) ACC_PUBLIC + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public int remove; + descriptor: I + flags: (0x0001) ACC_PUBLIC + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iconst_1 + x: putfield #x // Field keep:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public int addOne(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: iload_1 + x: iconst_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; + 0 4 1 value I + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public void toBeRemoved(java.lang.String); + descriptor: (Ljava/lang/String;)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: new #x // class java/lang/RuntimeException + x: dup + x: invokespecial #x // Method java/lang/RuntimeException."":()V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; + 0 8 1 foo Ljava/lang/String; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRemove + + public int addTwo(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=3, locals=2, args_size=2 + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String not supported on host side + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; + 0 10 1 value I + RuntimeInvisibleAnnotations: + x: #x(#x=s#x) + android.hosttest.annotation.HostSideTestSubstitute( + suffix="_host" + ) + + public int addTwo_host(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: iload_1 + x: iconst_2 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; + 0 4 1 value I + + public static native int nativeAddThree(int); + descriptor: (I)I + flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE + RuntimeInvisibleAnnotations: + x: #x(#x=s#x) + android.hosttest.annotation.HostSideTestSubstitute( + suffix="_host" + ) + + private static int nativeAddThree_host(int); + descriptor: (I)I + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: iload_0 + x: iconst_3 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 value I + + public java.lang.String unsupportedMethod(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: ldc #x // String This value shouldn\'t be seen on the host side. + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 3 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestThrow + + public int toBeIgnored(); + descriptor: ()I + flags: (0x0001) ACC_PUBLIC + Code: + stack=3, locals=1, args_size=1 + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String not supported on host side + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestIgnore +} +SourceFile: "TinyFrameworkAnnotations.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + x: #x(#x=s#x) + android.hosttest.annotation.HostSideTestClassLoadHook( + value="com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded" + ) +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook.class + Compiled from "TinyFrameworkClassLoadHook.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 3, attributes: 2 + public static final java.util.Set> sLoadedClasses; + descriptor: Ljava/util/Set; + flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL + Signature: #x // Ljava/util/Set;>; + + private com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook(); + descriptor: ()V + flags: (0x0002) ACC_PRIVATE + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook; + + public static void onClassLoaded(java.lang.Class); + descriptor: (Ljava/lang/Class;)V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: getstatic #x // Field sLoadedClasses:Ljava/util/Set; + x: aload_0 + x: invokeinterface #x, 2 // InterfaceMethod java/util/Set.add:(Ljava/lang/Object;)Z + x: pop + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 11 0 clazz Ljava/lang/Class; + LocalVariableTypeTable: + Start Length Slot Name Signature + 0 11 0 clazz Ljava/lang/Class<*>; + Signature: #x // (Ljava/lang/Class<*>;)V + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: new #x // class java/util/HashSet + x: dup + x: invokespecial #x // Method java/util/HashSet."":()V + x: putstatic #x // Field sLoadedClasses:Ljava/util/Set; + x: return + LineNumberTable: +} +SourceFile: "TinyFrameworkClassLoadHook.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations.class + Compiled from "TinyFrameworkClassWideAnnotations.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWideAnnotations + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 6, attributes: 2 + public int keep; + descriptor: I + flags: (0x0001) ACC_PUBLIC + + public int remove; + descriptor: I + flags: (0x0001) ACC_PUBLIC + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRemove + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWideAnnotations(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iconst_1 + x: putfield #x // Field keep:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; + + public int addOne(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: iload_1 + x: iconst_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; + 0 4 1 value I + + public int addTwo(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=3, locals=2, args_size=2 + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String not supported on host side + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; + 0 10 1 value I + RuntimeInvisibleAnnotations: + x: #x(#x=s#x) + android.hosttest.annotation.HostSideTestSubstitute( + suffix="_host" + ) + + public int addTwo_host(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: iload_1 + x: iconst_2 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; + 0 4 1 value I + + public void toBeRemoved(java.lang.String); + descriptor: (Ljava/lang/String;)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: new #x // class java/lang/RuntimeException + x: dup + x: invokespecial #x // Method java/lang/RuntimeException."":()V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; + 0 8 1 foo Ljava/lang/String; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRemove + + public java.lang.String unsupportedMethod(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: ldc #x // String This value shouldn\'t be seen on the host side. + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 3 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestThrow +} +SourceFile: "TinyFrameworkClassWideAnnotations.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault.class + Compiled from "TinyFrameworkClassWithInitializerDefault.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithInitializerDefault + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 2, attributes: 2 + public static boolean sInitialized; + descriptor: Z + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static java.lang.Object sObject; + descriptor: Ljava/lang/Object; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithInitializerDefault(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault; + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: iconst_1 + x: putstatic #x // Field sInitialized:Z + x: new #x // class java/lang/Object + x: dup + x: invokespecial #x // Method java/lang/Object."":()V + x: putstatic #x // Field sObject:Ljava/lang/Object; + x: return + LineNumberTable: +} +SourceFile: "TinyFrameworkClassWithInitializerDefault.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub.class + Compiled from "TinyFrameworkClassWithInitializerStub.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithInitializerStub + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 2, attributes: 2 + public static boolean sInitialized; + descriptor: Z + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static java.lang.Object sObject; + descriptor: Ljava/lang/Object; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithInitializerStub(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub; + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: iconst_1 + x: putstatic #x // Field sInitialized:Z + x: new #x // class java/lang/Object + x: dup + x: invokespecial #x // Method java/lang/Object."":()V + x: putstatic #x // Field sObject:Ljava/lang/Object; + x: return + LineNumberTable: +} +SourceFile: "TinyFrameworkClassWithInitializerStub.java" +RuntimeInvisibleAnnotations: + x: #x(#x=s#x) + android.hosttest.annotation.HostSideTestClassLoadHook( + value="com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded" + ) + x: #x() + android.hosttest.annotation.HostSideTestKeep + x: #x() + android.hosttest.annotation.HostSideTestStaticInitializerKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex.class + Compiled from "TinyFrameworkEnumComplex.java" +public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex extends java.lang.Enum + minor version: 0 + major version: 61 + flags: (0x4031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_ENUM + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + super_class: #x // java/lang/Enum + interfaces: 0, fields: 6, methods: 7, attributes: 3 + public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex RED; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex GREEN; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex BLUE; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private final java.lang.String mLongName; + descriptor: Ljava/lang/String; + flags: (0x0012) ACC_PRIVATE, ACC_FINAL + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private final java.lang.String mShortName; + descriptor: Ljava/lang/String; + flags: (0x0012) ACC_PRIVATE, ACC_FINAL + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] $VALUES; + descriptor: [Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x101a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC + + public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] values(); + descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=1, locals=0, args_size=0 + x: getstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: invokevirtual #x // Method "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;".clone:()Ljava/lang/Object; + x: checkcast #x // class "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;" + x: areturn + LineNumberTable: + + public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex valueOf(java.lang.String); + descriptor: (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: aload_0 + x: invokestatic #x // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; + x: checkcast #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 name Ljava/lang/String; + MethodParameters: + Name Flags + mandated + + private com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex(java.lang.String, java.lang.String); + descriptor: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V + flags: (0x0002) ACC_PRIVATE + Code: + stack=3, locals=5, args_size=5 + x: aload_0 + x: aload_1 + x: iload_2 + x: invokespecial #x // Method java/lang/Enum."":(Ljava/lang/String;I)V + x: aload_0 + x: aload_3 + x: putfield #x // Field mLongName:Ljava/lang/String; + x: aload_0 + x: aload 4 + x: putfield #x // Field mShortName:Ljava/lang/String; + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 18 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + 0 18 3 longName Ljava/lang/String; + 0 18 4 shortName Ljava/lang/String; + MethodParameters: + Name Flags + synthetic + synthetic + + + Signature: #x // (Ljava/lang/String;Ljava/lang/String;)V + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public java.lang.String getLongName(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: getfield #x // Field mLongName:Ljava/lang/String; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public java.lang.String getShortName(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: getfield #x // Field mShortName:Ljava/lang/String; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] $values(); + descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=4, locals=0, args_size=0 + x: iconst_3 + x: anewarray #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: dup + x: iconst_0 + x: getstatic #x // Field RED:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: aastore + x: dup + x: iconst_1 + x: getstatic #x // Field GREEN:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: aastore + x: dup + x: iconst_2 + x: getstatic #x // Field BLUE:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: aastore + x: areturn + LineNumberTable: + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=6, locals=0, args_size=0 + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: dup + x: ldc #x // String RED + x: iconst_0 + x: ldc #x // String Red + x: ldc #x // String R + x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V + x: putstatic #x // Field RED:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: dup + x: ldc #x // String GREEN + x: iconst_1 + x: ldc #x // String Green + x: ldc #x // String G + x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V + x: putstatic #x // Field GREEN:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: dup + x: ldc #x // String BLUE + x: iconst_2 + x: ldc #x // String Blue + x: ldc #x // String B + x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V + x: putstatic #x // Field BLUE:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: invokestatic #x // Method $values:()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: putstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: return + LineNumberTable: +} +Signature: #x // Ljava/lang/Enum; +SourceFile: "TinyFrameworkEnumComplex.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple.class + Compiled from "TinyFrameworkEnumSimple.java" +public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple extends java.lang.Enum + minor version: 0 + major version: 61 + flags: (0x4031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_ENUM + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + super_class: #x // java/lang/Enum + interfaces: 0, fields: 3, methods: 5, attributes: 3 + public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple CAT; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple DOG; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] $VALUES; + descriptor: [Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x101a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC + + public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] values(); + descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=1, locals=0, args_size=0 + x: getstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: invokevirtual #x // Method "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;".clone:()Ljava/lang/Object; + x: checkcast #x // class "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;" + x: areturn + LineNumberTable: + + public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple valueOf(java.lang.String); + descriptor: (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: aload_0 + x: invokestatic #x // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; + x: checkcast #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 name Ljava/lang/String; + MethodParameters: + Name Flags + mandated + + private com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple(); + descriptor: (Ljava/lang/String;I)V + flags: (0x0002) ACC_PRIVATE + Code: + stack=3, locals=3, args_size=3 + x: aload_0 + x: aload_1 + x: iload_2 + x: invokespecial #x // Method java/lang/Enum."":(Ljava/lang/String;I)V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 7 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + MethodParameters: + Name Flags + synthetic + synthetic + Signature: #x // ()V + + private static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] $values(); + descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=4, locals=0, args_size=0 + x: iconst_2 + x: anewarray #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: dup + x: iconst_0 + x: getstatic #x // Field CAT:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: aastore + x: dup + x: iconst_1 + x: getstatic #x // Field DOG:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: aastore + x: areturn + LineNumberTable: + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: dup + x: ldc #x // String CAT + x: iconst_0 + x: invokespecial #x // Method "":(Ljava/lang/String;I)V + x: putstatic #x // Field CAT:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: dup + x: ldc #x // String DOG + x: iconst_1 + x: invokespecial #x // Method "":(Ljava/lang/String;I)V + x: putstatic #x // Field DOG:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: invokestatic #x // Method $values:()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: putstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: return + LineNumberTable: +} +Signature: #x // Ljava/lang/Enum; +SourceFile: "TinyFrameworkEnumSimple.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester.class + Compiled from "TinyFrameworkExceptionTester.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTester + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 2, attributes: 2 + public com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTester(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester; + + public static int testException(); + descriptor: ()I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=1, args_size=0 + x: new #x // class java/lang/IllegalStateException + x: dup + x: ldc #x // String Inner exception + x: invokespecial #x // Method java/lang/IllegalStateException."":(Ljava/lang/String;)V + x: athrow + x: astore_0 + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String Outer exception + x: aload_0 + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;Ljava/lang/Throwable;)V + x: athrow + Exception table: + from to target type + 0 10 10 Class java/lang/Exception + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 11 0 e Ljava/lang/Exception; + StackMapTable: number_of_entries = 1 + frame_type = 74 /* same_locals_1_stack_item */ + stack = [ class java/lang/Exception ] +} +SourceFile: "TinyFrameworkExceptionTester.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy.class + Compiled from "TinyFrameworkForTextPolicy.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPolicy + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 17, attributes: 1 + public int stub; + descriptor: I + flags: (0x0001) ACC_PUBLIC + + public int remove; + descriptor: I + flags: (0x0001) ACC_PUBLIC + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPolicy(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iconst_1 + x: putfield #x // Field stub:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + + public int addOne(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: iload_1 + x: iconst_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + 0 4 1 value I + + public void toBeRemoved(java.lang.String); + descriptor: (Ljava/lang/String;)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: new #x // class java/lang/RuntimeException + x: dup + x: invokespecial #x // Method java/lang/RuntimeException."":()V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + 0 8 1 foo Ljava/lang/String; + + public java.lang.String toBeIgnoredObj(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: new #x // class java/lang/RuntimeException + x: dup + x: invokespecial #x // Method java/lang/RuntimeException."":()V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + + public void toBeIgnoredV(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: new #x // class java/lang/RuntimeException + x: dup + x: invokespecial #x // Method java/lang/RuntimeException."":()V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + + public boolean toBeIgnoredZ(); + descriptor: ()Z + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: new #x // class java/lang/RuntimeException + x: dup + x: invokespecial #x // Method java/lang/RuntimeException."":()V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + + public byte toBeIgnoredB(); + descriptor: ()B + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: new #x // class java/lang/RuntimeException + x: dup + x: invokespecial #x // Method java/lang/RuntimeException."":()V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + + public char toBeIgnoredC(); + descriptor: ()C + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: new #x // class java/lang/RuntimeException + x: dup + x: invokespecial #x // Method java/lang/RuntimeException."":()V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + + public short toBeIgnoredS(); + descriptor: ()S + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: new #x // class java/lang/RuntimeException + x: dup + x: invokespecial #x // Method java/lang/RuntimeException."":()V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + + public int toBeIgnoredI(); + descriptor: ()I + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: new #x // class java/lang/RuntimeException + x: dup + x: invokespecial #x // Method java/lang/RuntimeException."":()V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + + public float toBeIgnoredF(); + descriptor: ()F + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: new #x // class java/lang/RuntimeException + x: dup + x: invokespecial #x // Method java/lang/RuntimeException."":()V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + + public double toBeIgnoredD(); + descriptor: ()D + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: new #x // class java/lang/RuntimeException + x: dup + x: invokespecial #x // Method java/lang/RuntimeException."":()V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + + public int addTwo(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=3, locals=2, args_size=2 + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String not supported on host side + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + 0 10 1 value I + + public int addTwo_host(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: iload_1 + x: iconst_2 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + 0 4 1 value I + + public static native int nativeAddThree(int); + descriptor: (I)I + flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE + + public static int addThree_host(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: iload_0 + x: iconst_3 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 value I + + public java.lang.String unsupportedMethod(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: ldc #x // String This value shouldn\'t be seen on the host side. + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 3 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; +} +SourceFile: "TinyFrameworkForTextPolicy.java" +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.class + Compiled from "TinyFrameworkLambdas.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas$Nested + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 8, attributes: 5 + public final java.util.function.Supplier mSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0011) ACC_PUBLIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static final java.util.function.Supplier sSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas$Nested(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 14 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public java.util.function.Supplier getSupplier(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested; + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static java.util.function.Supplier getSupplier_static(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=1, locals=0, args_size=0 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: areturn + LineNumberTable: + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private static java.lang.Integer lambda$getSupplier_static$3(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=1, locals=0, args_size=0 + x: bipush 8 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + + private static java.lang.Integer lambda$getSupplier$2(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=1, locals=0, args_size=0 + x: bipush 7 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + + private static java.lang.Integer lambda$static$1(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=1, locals=0, args_size=0 + x: bipush 6 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + + private static java.lang.Integer lambda$new$0(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=1, locals=0, args_size=0 + x: iconst_5 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=1, locals=0, args_size=0 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: +} +SourceFile: "TinyFrameworkLambdas.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + x: #x() + android.hosttest.annotation.HostSideTestStaticInitializerKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas +BootstrapMethods: + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$new$0:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$getSupplier$2:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$getSupplier_static$3:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$static$1:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; +InnerClasses: + public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested of class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.class + Compiled from "TinyFrameworkLambdas.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 8, attributes: 5 + public final java.util.function.Supplier mSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0011) ACC_PUBLIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static final java.util.function.Supplier sSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 14 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public java.util.function.Supplier getSupplier(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas; + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static java.util.function.Supplier getSupplier_static(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=1, locals=0, args_size=0 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: areturn + LineNumberTable: + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private static java.lang.Integer lambda$getSupplier_static$3(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=1, locals=0, args_size=0 + x: iconst_4 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + + private static java.lang.Integer lambda$getSupplier$2(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=1, locals=0, args_size=0 + x: iconst_3 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + + private static java.lang.Integer lambda$static$1(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=1, locals=0, args_size=0 + x: iconst_2 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + + private static java.lang.Integer lambda$new$0(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=1, locals=0, args_size=0 + x: iconst_1 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=1, locals=0, args_size=0 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: +} +SourceFile: "TinyFrameworkLambdas.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + x: #x() + android.hosttest.annotation.HostSideTestStaticInitializerKeep +NestMembers: + com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested +BootstrapMethods: + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$new$0:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$getSupplier$2:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$getSupplier_static$3:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$static$1:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; +InnerClasses: + public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested of class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo.class + Compiled from "TinyFrameworkMethodCallReplace.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 3, attributes: 3 + public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo; + + public static void startThread(java.lang.Thread); + descriptor: (Ljava/lang/Thread;)V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: iconst_1 + x: invokevirtual #x // Method java/lang/Thread.setDaemon:(Z)V + x: aload_0 + x: invokevirtual #x // Method java/lang/Thread.start:()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 thread Ljava/lang/Thread; + + public static int add(int, int); + descriptor: (II)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=2, args_size=2 + x: iload_0 + x: iload_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 a I + 0 4 1 b I +} +SourceFile: "TinyFrameworkMethodCallReplace.java" +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace +InnerClasses: + public static #x= #x of #x; // ReplaceTo=class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo of class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.class + Compiled from "TinyFrameworkMethodCallReplace.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 5, attributes: 5 + public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace; + + public static boolean nonStaticMethodCallReplaceTester() throws java.lang.Exception; + descriptor: ()Z + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=3, locals=2, args_size=0 + x: new #x // class java/util/concurrent/atomic/AtomicBoolean + x: dup + x: iconst_0 + x: invokespecial #x // Method java/util/concurrent/atomic/AtomicBoolean."":(Z)V + x: astore_0 + x: new #x // class java/lang/Thread + x: dup + x: aload_0 + x: invokedynamic #x, 0 // InvokeDynamic #x:run:(Ljava/util/concurrent/atomic/AtomicBoolean;)Ljava/lang/Runnable; + x: invokespecial #x // Method java/lang/Thread."":(Ljava/lang/Runnable;)V + x: astore_1 + x: aload_1 + x: invokevirtual #x // Method java/lang/Thread.start:()V + x: aload_1 + x: invokevirtual #x // Method java/lang/Thread.join:()V + x: aload_0 + x: invokevirtual #x // Method java/util/concurrent/atomic/AtomicBoolean.get:()Z + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 9 27 0 ab Ljava/util/concurrent/atomic/AtomicBoolean; + 23 13 1 th Ljava/lang/Thread; + Exceptions: + throws java.lang.Exception + + public static int staticMethodCallReplaceTester(); + descriptor: ()I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: iconst_1 + x: iconst_2 + x: invokestatic #x // Method originalAdd:(II)I + x: ireturn + LineNumberTable: + + private static int originalAdd(int, int); + descriptor: (II)I + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=2, args_size=2 + x: iload_0 + x: iload_1 + x: iadd + x: iconst_1 + x: isub + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 6 0 a I + 0 6 1 b I + + private static void lambda$nonStaticMethodCallReplaceTester$0(java.util.concurrent.atomic.AtomicBoolean); + descriptor: (Ljava/util/concurrent/atomic/AtomicBoolean;)V + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: invokestatic #x // Method java/lang/Thread.currentThread:()Ljava/lang/Thread; + x: invokevirtual #x // Method java/lang/Thread.isDaemon:()Z + x: invokevirtual #x // Method java/util/concurrent/atomic/AtomicBoolean.set:(Z)V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 11 0 ab Ljava/util/concurrent/atomic/AtomicBoolean; +} +SourceFile: "TinyFrameworkMethodCallReplace.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +NestMembers: + com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo +BootstrapMethods: + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()V + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.lambda$nonStaticMethodCallReplaceTester$0:(Ljava/util/concurrent/atomic/AtomicBoolean;)V + #x ()V +InnerClasses: + public static #x= #x of #x; // ReplaceTo=class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo of class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace + public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.class + Compiled from "TinyFrameworkNative.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 14, attributes: 2 + int value; + descriptor: I + flags: (0x0000) + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNative(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; + + public static native int nativeAddTwo(int); + descriptor: (I)I + flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect + + public static int nativeAddTwo_should_be_like_this(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=1, locals=1, args_size=1 + x: iload_0 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeAddTwo:(I)I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 arg I + + public static native long nativeLongPlus(long, long); + descriptor: (JJ)J + flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect + + public static long nativeLongPlus_should_be_like_this(long, long); + descriptor: (JJ)J + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=4, args_size=2 + x: lload_0 + x: lload_2 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeLongPlus:(JJ)J + x: lreturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 6 0 arg1 J + 0 6 2 arg2 J + + public void setValue(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: iload_1 + x: putfield #x // Field value:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; + 0 6 1 v I + + public native int nativeNonStaticAddToValue(int); + descriptor: (I)I + flags: (0x0101) ACC_PUBLIC, ACC_NATIVE + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect + + public int nativeNonStaticAddToValue_should_be_like_this(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: iload_1 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeNonStaticAddToValue:(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; + 0 6 1 arg I + + public static native void nativeStillNotSupported(); + descriptor: ()V + flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestThrow + + public static native void nativeStillKeep(); + descriptor: ()V + flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE + + public static void nativeStillNotSupported_should_be_like_this(); + descriptor: ()V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: new #x // class java/lang/RuntimeException + x: dup + x: invokespecial #x // Method java/lang/RuntimeException."":()V + x: athrow + LineNumberTable: + + public static native byte nativeBytePlus(byte, byte); + descriptor: (BB)B + flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect + + public void notNativeRedirected(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: new #x // class java/lang/RuntimeException + x: dup + x: invokespecial #x // Method java/lang/RuntimeException."":()V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect + + public static void notNativeStaticRedirected(); + descriptor: ()V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: new #x // class java/lang/RuntimeException + x: dup + x: invokespecial #x // Method java/lang/RuntimeException."":()V + x: athrow + LineNumberTable: + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect +} +SourceFile: "TinyFrameworkNative.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep + x: #x(#x=s#x) + android.hosttest.annotation.HostSideTestRedirectionClass( + value="TinyFrameworkNative_host" + ) +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.class + Compiled from "TinyFrameworkNative_host.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 7, attributes: 2 + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host; + + public static int nativeAddTwo(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: iload_0 + x: iconst_2 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 arg I + + public static long nativeLongPlus(long, long); + descriptor: (JJ)J + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=4, args_size=2 + x: lload_0 + x: lload_2 + x: ladd + x: lreturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 arg1 J + 0 4 2 arg2 J + + public static int nativeNonStaticAddToValue(com.android.hoststubgen.test.tinyframework.TinyFrameworkNative, int); + descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: getfield #x // Field com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.value:I + x: iload_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 7 0 source Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; + 0 7 1 arg I + + public static byte nativeBytePlus(byte, byte); + descriptor: (BB)B + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=2, args_size=2 + x: iload_0 + x: iload_1 + x: iadd + x: i2b + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 arg1 B + 0 5 1 arg2 B + + public static void notNativeRedirected(com.android.hoststubgen.test.tinyframework.TinyFrameworkNative); + descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;)V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=0, locals=1, args_size=1 + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 1 0 source Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; + + public static void notNativeStaticRedirected(); + descriptor: ()V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=0, locals=0, args_size=0 + x: return + LineNumberTable: +} +SourceFile: "TinyFrameworkNative_host.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1.class + Compiled from "TinyFrameworkNestedClasses.java" +class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$1 extends java.lang.Object implements java.util.function.Supplier + minor version: 0 + major version: 61 + flags: (0x0020) ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 + super_class: #x // java/lang/Object + interfaces: 1, fields: 1, methods: 3, attributes: 5 + final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC + + com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$1(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); + descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + flags: (0x0000) + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: aload_1 + x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; + 0 10 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + MethodParameters: + Name Flags + final mandated + + public java.lang.Integer get(); + descriptor: ()Ljava/lang/Integer; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: iconst_1 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; + + public java.lang.Object get(); + descriptor: ()Ljava/lang/Object; + flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokevirtual #x // Method get:()Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; +} +Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; +SourceFile: "TinyFrameworkNestedClasses.java" +EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +InnerClasses: + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2.class + Compiled from "TinyFrameworkNestedClasses.java" +class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2 extends java.lang.Object implements java.util.function.Supplier + minor version: 0 + major version: 61 + flags: (0x0020) ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 3, attributes: 5 + com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2(); + descriptor: ()V + flags: (0x0000) + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; + + public java.lang.Integer get(); + descriptor: ()Ljava/lang/Integer; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: iconst_2 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; + + public java.lang.Object get(); + descriptor: ()Ljava/lang/Object; + flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokevirtual #x // Method get:()Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; +} +Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; +SourceFile: "TinyFrameworkNestedClasses.java" +EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +InnerClasses: + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3.class + Compiled from "TinyFrameworkNestedClasses.java" +class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$3 extends java.lang.Object implements java.util.function.Supplier + minor version: 0 + major version: 61 + flags: (0x0020) ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 + super_class: #x // java/lang/Object + interfaces: 1, fields: 1, methods: 3, attributes: 5 + final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC + + com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$3(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); + descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + flags: (0x0000) + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: aload_1 + x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; + 0 10 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + MethodParameters: + Name Flags + final mandated + + public java.lang.Integer get(); + descriptor: ()Ljava/lang/Integer; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: iconst_3 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; + + public java.lang.Object get(); + descriptor: ()Ljava/lang/Object; + flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokevirtual #x // Method get:()Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; +} +Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; +SourceFile: "TinyFrameworkNestedClasses.java" +EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses.getSupplier +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +InnerClasses: + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4.class + Compiled from "TinyFrameworkNestedClasses.java" +class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4 extends java.lang.Object implements java.util.function.Supplier + minor version: 0 + major version: 61 + flags: (0x0020) ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 3, attributes: 5 + com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4(); + descriptor: ()V + flags: (0x0000) + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; + + public java.lang.Integer get(); + descriptor: ()Ljava/lang/Integer; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: iconst_4 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; + + public java.lang.Object get(); + descriptor: ()Ljava/lang/Object; + flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokevirtual #x // Method get:()Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; +} +Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; +SourceFile: "TinyFrameworkNestedClasses.java" +EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses.getSupplier_static +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +InnerClasses: + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 1, attributes: 3 + public int value; + descriptor: I + flags: (0x0001) ACC_PUBLIC + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iload_1 + x: putfield #x // Field value:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass; + 0 10 1 x I +} +SourceFile: "TinyFrameworkNestedClasses.java" +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +InnerClasses: + public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$InnerClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 1, attributes: 3 + public int value; + descriptor: I + flags: (0x0001) ACC_PUBLIC + + final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$InnerClass(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); + descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: aload_1 + x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iconst_5 + x: putfield #x // Field value:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 15 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass; + 0 15 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + MethodParameters: + Name Flags + final mandated +} +SourceFile: "TinyFrameworkNestedClasses.java" +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +InnerClasses: + public #x= #x of #x; // InnerClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1.class + Compiled from "TinyFrameworkNestedClasses.java" +class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$1 extends java.lang.Object implements java.util.function.Supplier + minor version: 0 + major version: 61 + flags: (0x0020) ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 3, attributes: 5 + com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$1(); + descriptor: ()V + flags: (0x0000) + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; + + public java.lang.Integer get(); + descriptor: ()Ljava/lang/Integer; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: bipush 7 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; + + public java.lang.Object get(); + descriptor: ()Ljava/lang/Object; + flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokevirtual #x // Method get:()Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; +} +Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; +SourceFile: "TinyFrameworkNestedClasses.java" +EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass.getSupplier_static +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +InnerClasses: + public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 1, attributes: 3 + public int value; + descriptor: I + flags: (0x0001) ACC_PUBLIC + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: bipush 8 + x: putfield #x // Field value:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 11 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass; +} +SourceFile: "TinyFrameworkNestedClasses.java" +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +InnerClasses: + public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 2, attributes: 3 + public int value; + descriptor: I + flags: (0x0001) ACC_PUBLIC + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: bipush 6 + x: putfield #x // Field value:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 11 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass; + + public static java.util.function.Supplier getSupplier_static(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 + x: dup + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1."":()V + x: areturn + LineNumberTable: + Signature: #x // ()Ljava/util/function/Supplier; +} +SourceFile: "TinyFrameworkNestedClasses.java" +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +InnerClasses: + public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 + public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$SubClass extends com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass + super_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass + interfaces: 0, fields: 0, methods: 1, attributes: 3 + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$SubClass(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: iload_1 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass."":(I)V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass; + 0 6 1 x I +} +SourceFile: "TinyFrameworkNestedClasses.java" +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +InnerClasses: + public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public static #x= #x of #x; // SubClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 4, attributes: 4 + public final java.util.function.Supplier mSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0011) ACC_PUBLIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + + public static final java.util.function.Supplier sSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 + x: dup + x: aload_0 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1."":(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 17 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + + public java.util.function.Supplier getSupplier(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0001) ACC_PUBLIC + Code: + stack=3, locals=1, args_size=1 + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 + x: dup + x: aload_0 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3."":(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 9 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + Signature: #x // ()Ljava/util/function/Supplier; + + public static java.util.function.Supplier getSupplier_static(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 + x: dup + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4."":()V + x: areturn + LineNumberTable: + Signature: #x // ()Ljava/util/function/Supplier; + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 + x: dup + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2."":()V + x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: +} +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +NestMembers: + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 +InnerClasses: + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 + public static #x= #x of #x; // SubClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public #x= #x of #x; // InnerClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect.class + Compiled from "TinyFrameworkPackageRedirect.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedirect + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 2, attributes: 2 + public com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedirect(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect; + + public static int foo(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=3, locals=1, args_size=1 + x: new #x // class com/unsupported/UnsupportedClass + x: dup + x: iload_0 + x: invokespecial #x // Method com/unsupported/UnsupportedClass."":(I)V + x: invokevirtual #x // Method com/unsupported/UnsupportedClass.getValue:()I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 12 0 value I +} +SourceFile: "TinyFrameworkPackageRedirect.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.class + Compiled from "TinyFrameworkRenamedClassCaller.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 2, attributes: 2 + public com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller; + + public static int foo(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=3, locals=1, args_size=1 + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed + x: dup + x: iload_0 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed."":(I)V + x: invokevirtual #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.getValue:()I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 12 0 value I +} +SourceFile: "TinyFrameworkRenamedClassCaller.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.class + Compiled from "TinyFrameworkToBeRenamed.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkToBeRenamed + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 2, attributes: 2 + private final int mValue; + descriptor: I + flags: (0x0012) ACC_PRIVATE, ACC_FINAL + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkToBeRenamed(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iload_1 + x: putfield #x // Field mValue:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed; + 0 10 1 value I + + public int getValue(); + descriptor: ()I + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: getfield #x // Field mValue:I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed; +} +SourceFile: "TinyFrameworkToBeRenamed.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/packagetest/A.class + Compiled from "A.java" +public class com.android.hoststubgen.test.tinyframework.packagetest.A + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/A + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.packagetest.A(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/packagetest/A; +} +SourceFile: "A.java" +## Class: com/android/hoststubgen/test/tinyframework/packagetest/B.class + Compiled from "B.java" +public class com.android.hoststubgen.test.tinyframework.packagetest.B + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/B + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.packagetest.B(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/packagetest/B; +} +SourceFile: "B.java" +## Class: com/android/hoststubgen/test/tinyframework/packagetest/sub/A.class + Compiled from "A.java" +public class com.android.hoststubgen.test.tinyframework.packagetest.sub.A + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/sub/A + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.packagetest.sub.A(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/packagetest/sub/A; +} +SourceFile: "A.java" +## Class: com/android/hoststubgen/test/tinyframework/packagetest/sub/B.class + Compiled from "B.java" +public class com.android.hoststubgen.test.tinyframework.packagetest.sub.B + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/sub/B + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.packagetest.sub.B(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/packagetest/sub/B; +} +SourceFile: "B.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C1.class + Compiled from "C1.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.C1 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.C1(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/C1; +} +SourceFile: "C1.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C2.class + Compiled from "C2.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.C2 extends com.android.hoststubgen.test.tinyframework.subclasstest.C1 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 + interfaces: 0, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.C2(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/subclasstest/C1."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/C2; +} +SourceFile: "C2.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C3.class + Compiled from "C3.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.C3 extends com.android.hoststubgen.test.tinyframework.subclasstest.C2 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3 + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 + interfaces: 0, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.C3(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/subclasstest/C2."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/C3; +} +SourceFile: "C3.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/CA.class + Compiled from "CA.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.CA + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CA + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.CA(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/CA; +} +SourceFile: "CA.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/CB.class + Compiled from "CB.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.CB + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CB + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.CB(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/CB; +} +SourceFile: "CB.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1.class + Compiled from "Class_C1.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C1 extends com.android.hoststubgen.test.tinyframework.subclasstest.C1 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1 + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 + interfaces: 0, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.Class_C1(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/subclasstest/C1."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_C1; +} +SourceFile: "Class_C1.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2.class + Compiled from "Class_C2.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C2 extends com.android.hoststubgen.test.tinyframework.subclasstest.C2 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2 + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 + interfaces: 0, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.Class_C2(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/subclasstest/C2."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_C2; +} +SourceFile: "Class_C2.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3.class + Compiled from "Class_C3.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C3 extends com.android.hoststubgen.test.tinyframework.subclasstest.C3 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3 + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3 + interfaces: 0, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.Class_C3(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/subclasstest/C3."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_C3; +} +SourceFile: "Class_C3.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_CA.class + Compiled from "Class_CA.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_CA extends com.android.hoststubgen.test.tinyframework.subclasstest.CA + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_CA + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CA + interfaces: 0, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.Class_CA(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/subclasstest/CA."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_CA; +} +SourceFile: "Class_CA.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB.class + Compiled from "Class_CB.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_CB extends com.android.hoststubgen.test.tinyframework.subclasstest.CB + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CB + interfaces: 0, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.Class_CB(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/subclasstest/CB."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_CB; +} +SourceFile: "Class_CB.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB_IA.class + Compiled from "Class_CB_IA.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_CB_IA extends com.android.hoststubgen.test.tinyframework.subclasstest.CB implements com.android.hoststubgen.test.tinyframework.subclasstest.IA + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB_IA + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CB + interfaces: 1, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.Class_CB_IA(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/subclasstest/CB."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_CB_IA; +} +SourceFile: "Class_CB_IA.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1.class + Compiled from "Class_I1.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1 implements com.android.hoststubgen.test.tinyframework.subclasstest.I1 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_I1; +} +SourceFile: "Class_I1.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA.class + Compiled from "Class_I1_IA.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1_IA implements com.android.hoststubgen.test.tinyframework.subclasstest.I1,com.android.hoststubgen.test.tinyframework.subclasstest.IA + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA + super_class: #x // java/lang/Object + interfaces: 2, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1_IA(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA; +} +SourceFile: "Class_I1_IA.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2.class + Compiled from "Class_I2.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I2 implements com.android.hoststubgen.test.tinyframework.subclasstest.I2 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I2(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_I2; +} +SourceFile: "Class_I2.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3.class + Compiled from "Class_I3.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3 implements com.android.hoststubgen.test.tinyframework.subclasstest.I3 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_I3; +} +SourceFile: "Class_I3.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3_IA.class + Compiled from "Class_I3_IA.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3_IA implements com.android.hoststubgen.test.tinyframework.subclasstest.I3,com.android.hoststubgen.test.tinyframework.subclasstest.IA + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3_IA + super_class: #x // java/lang/Object + interfaces: 2, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3_IA(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_I3_IA; +} +SourceFile: "Class_I3_IA.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA.class + Compiled from "Class_IA.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA implements com.android.hoststubgen.test.tinyframework.subclasstest.IA + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_IA; +} +SourceFile: "Class_IA.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I1.class + Compiled from "Class_IA_I1.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA_I1 implements com.android.hoststubgen.test.tinyframework.subclasstest.IA,com.android.hoststubgen.test.tinyframework.subclasstest.I1 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I1 + super_class: #x // java/lang/Object + interfaces: 2, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA_I1(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I1; +} +SourceFile: "Class_IA_I1.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I3.class + Compiled from "Class_IA_I3.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA_I3 implements com.android.hoststubgen.test.tinyframework.subclasstest.IA,com.android.hoststubgen.test.tinyframework.subclasstest.I3 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I3 + super_class: #x // java/lang/Object + interfaces: 2, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA_I3(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I3; +} +SourceFile: "Class_IA_I3.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB.class + Compiled from "Class_IB.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_IB implements com.android.hoststubgen.test.tinyframework.subclasstest.IB + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IB(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_IB; +} +SourceFile: "Class_IB.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB_IA.class + Compiled from "Class_IB_IA.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_IB_IA implements com.android.hoststubgen.test.tinyframework.subclasstest.IB,com.android.hoststubgen.test.tinyframework.subclasstest.IA + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB_IA + super_class: #x // java/lang/Object + interfaces: 2, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IB_IA(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_IB_IA; +} +SourceFile: "Class_IB_IA.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_None.class + Compiled from "Class_None.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_None + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_None + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 1 + public com.android.hoststubgen.test.tinyframework.subclasstest.Class_None(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_None; +} +SourceFile: "Class_None.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I1.class + Compiled from "I1.java" +public interface com.android.hoststubgen.test.tinyframework.subclasstest.I1 + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I1 + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 0, attributes: 1 +} +SourceFile: "I1.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I2.class + Compiled from "I2.java" +public interface com.android.hoststubgen.test.tinyframework.subclasstest.I2 extends com.android.hoststubgen.test.tinyframework.subclasstest.I1 + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I2 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 1 +} +SourceFile: "I2.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I3.class + Compiled from "I3.java" +public interface com.android.hoststubgen.test.tinyframework.subclasstest.I3 extends com.android.hoststubgen.test.tinyframework.subclasstest.I2 + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I3 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 1 +} +SourceFile: "I3.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/IA.class + Compiled from "IA.java" +public interface com.android.hoststubgen.test.tinyframework.subclasstest.IA + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IA + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 0, attributes: 1 +} +SourceFile: "IA.java" +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/IB.class + Compiled from "IB.java" +public interface com.android.hoststubgen.test.tinyframework.subclasstest.IB + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IB + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 0, attributes: 1 +} +SourceFile: "IB.java" +## Class: com/supported/UnsupportedClass.class + Compiled from "UnsupportedClass.java" +public class com.supported.UnsupportedClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/supported/UnsupportedClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 2, attributes: 2 + private final int mValue; + descriptor: I + flags: (0x0012) ACC_PRIVATE, ACC_FINAL + + public com.supported.UnsupportedClass(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iload_1 + x: putfield #x // Field mValue:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/supported/UnsupportedClass; + 0 10 1 value I + + public int getValue(); + descriptor: ()I + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: getfield #x // Field mValue:I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/supported/UnsupportedClass; +} +SourceFile: "UnsupportedClass.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/unsupported/UnsupportedClass.class + Compiled from "UnsupportedClass.java" +public class com.unsupported.UnsupportedClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/unsupported/UnsupportedClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 2, attributes: 2 + public com.unsupported.UnsupportedClass(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=3, locals=2, args_size=2 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String This class is not supported + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 14 0 this Lcom/unsupported/UnsupportedClass; + 0 14 1 value I + + public int getValue(); + descriptor: ()I + flags: (0x0001) ACC_PUBLIC + Code: + stack=3, locals=1, args_size=1 + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String This class is not supported + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/unsupported/UnsupportedClass; +} +SourceFile: "UnsupportedClass.java" +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/03-hoststubgen-test-tiny-framework-host-dump.txt b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/03-hoststubgen-test-tiny-framework-host-dump.txt new file mode 100644 index 000000000000..eeec554e954c --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/03-hoststubgen-test-tiny-framework-host-dump.txt @@ -0,0 +1,3757 @@ +## Class: android/hosttest/annotation/HostSideTestClassLoadHook.class + Compiled from "HostSideTestClassLoadHook.java" +public interface android.hosttest.annotation.HostSideTestClassLoadHook extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestClassLoadHook + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 2 + public abstract java.lang.String value(); + descriptor: ()Ljava/lang/String; + flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "HostSideTestClassLoadHook.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestKeep.class + Compiled from "HostSideTestKeep.java" +public interface android.hosttest.annotation.HostSideTestKeep extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestKeep + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "HostSideTestKeep.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestRedirect.class + Compiled from "HostSideTestRedirect.java" +public interface android.hosttest.annotation.HostSideTestRedirect extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestRedirect + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "HostSideTestRedirect.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.METHOD] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestRedirectionClass.class + Compiled from "HostSideTestRedirectionClass.java" +public interface android.hosttest.annotation.HostSideTestRedirectionClass extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestRedirectionClass + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 2 + public abstract java.lang.String value(); + descriptor: ()Ljava/lang/String; + flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "HostSideTestRedirectionClass.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestRemove.class + Compiled from "HostSideTestRemove.java" +public interface android.hosttest.annotation.HostSideTestRemove extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestRemove + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "HostSideTestRemove.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestStaticInitializerKeep.class + Compiled from "HostSideTestStaticInitializerKeep.java" +public interface android.hosttest.annotation.HostSideTestStaticInitializerKeep extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestStaticInitializerKeep + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "HostSideTestStaticInitializerKeep.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestSubstitute.class + Compiled from "HostSideTestSubstitute.java" +public interface android.hosttest.annotation.HostSideTestSubstitute extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestSubstitute + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 2 + public abstract java.lang.String suffix(); + descriptor: ()Ljava/lang/String; + flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "HostSideTestSubstitute.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.METHOD] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestThrow.class + Compiled from "HostSideTestThrow.java" +public interface android.hosttest.annotation.HostSideTestThrow extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestThrow + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "HostSideTestThrow.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x,e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestWholeClassKeep.class + Compiled from "HostSideTestWholeClassKeep.java" +public interface android.hosttest.annotation.HostSideTestWholeClassKeep extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestWholeClassKeep + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "HostSideTestWholeClassKeep.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy.class + Compiled from "IPretendingAidl.java" +public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Proxy + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 2, attributes: 4 + public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Proxy(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int addTwo(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: iload_0 + x: iconst_2 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 a I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl + public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub +SourceFile: "IPretendingAidl.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/IPretendingAidl +## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub.class + Compiled from "IPretendingAidl.java" +public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 2, attributes: 4 + public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int addOne(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: iload_0 + x: iconst_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 a I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl + public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub +SourceFile: "IPretendingAidl.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/IPretendingAidl +## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl.class + Compiled from "IPretendingAidl.java" +public interface com.android.hoststubgen.test.tinyframework.IPretendingAidl + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 0, attributes: 4 +} +InnerClasses: + public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl + public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub +SourceFile: "IPretendingAidl.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestMembers: + com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub + com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy +## Class: com/android/hoststubgen/test/tinyframework/R$Nested.class + Compiled from "R.java" +public class com.android.hoststubgen.test.tinyframework.R$Nested + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/R$Nested + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 2, attributes: 4 + public static int[] ARRAY; + descriptor: [I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public com.android.hoststubgen.test.tinyframework.R$Nested(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/R$Nested; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: iconst_1 + x: newarray int + x: dup + x: iconst_0 + x: iconst_1 + x: iastore + x: putstatic #x // Field ARRAY:[I + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/R$Nested of class com/android/hoststubgen/test/tinyframework/R +SourceFile: "R.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/R +## Class: com/android/hoststubgen/test/tinyframework/R.class + Compiled from "R.java" +public class com.android.hoststubgen.test.tinyframework.R + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/R + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 4 + public com.android.hoststubgen.test.tinyframework.R(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/R; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/R$Nested of class com/android/hoststubgen/test/tinyframework/R +SourceFile: "R.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestMembers: + com/android/hoststubgen/test/tinyframework/R$Nested +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.class + Compiled from "TinyFrameworkAnnotations.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 7, attributes: 3 + public int keep; + descriptor: I + flags: (0x0001) ACC_PUBLIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations + x: ldc #x // String com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iconst_1 + x: putfield #x // Field keep:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public int addOne(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: iload_1 + x: iconst_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; + 0 4 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public int addTwo(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: iload_1 + x: iconst_2 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; + 0 4 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int nativeAddThree(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: iload_0 + x: iconst_3 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.String unsupportedMethod(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=3, locals=1, args_size=1 + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onThrowMethodCalled:()V + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String Unreachable + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestThrow + + public int toBeIgnored(); + descriptor: ()I + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: iconst_0 + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestIgnore +} +SourceFile: "TinyFrameworkAnnotations.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + x: #x(#x=s#x) + android.hosttest.annotation.HostSideTestClassLoadHook( + value="com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded" + ) +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook.class + Compiled from "TinyFrameworkClassLoadHook.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 3, attributes: 3 + public static final java.util.Set> sLoadedClasses; + descriptor: Ljava/util/Set; + flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL + Signature: #x // Ljava/util/Set;>; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook(); + descriptor: ()V + flags: (0x0002) ACC_PRIVATE + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static void onClassLoaded(java.lang.Class); + descriptor: (Ljava/lang/Class;)V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: getstatic #x // Field sLoadedClasses:Ljava/util/Set; + x: aload_0 + x: invokeinterface #x, 2 // InterfaceMethod java/util/Set.add:(Ljava/lang/Object;)Z + x: pop + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 11 0 clazz Ljava/lang/Class; + LocalVariableTypeTable: + Start Length Slot Name Signature + 0 11 0 clazz Ljava/lang/Class<*>; + Signature: #x // (Ljava/lang/Class<*>;)V + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: new #x // class java/util/HashSet + x: dup + x: invokespecial #x // Method java/util/HashSet."":()V + x: putstatic #x // Field sLoadedClasses:Ljava/util/Set; + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "TinyFrameworkClassLoadHook.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations.class + Compiled from "TinyFrameworkClassWideAnnotations.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWideAnnotations + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 4, attributes: 3 + public int keep; + descriptor: I + flags: (0x0001) ACC_PUBLIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWideAnnotations(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iconst_1 + x: putfield #x // Field keep:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int addOne(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: iload_1 + x: iconst_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; + 0 4 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int addTwo(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: iload_1 + x: iconst_2 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; + 0 4 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.String unsupportedMethod(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=3, locals=1, args_size=1 + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onThrowMethodCalled:()V + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String Unreachable + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestThrow +} +SourceFile: "TinyFrameworkClassWideAnnotations.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault.class + Compiled from "TinyFrameworkClassWithInitializerDefault.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithInitializerDefault + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 0, attributes: 3 + public static boolean sInitialized; + descriptor: Z + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static java.lang.Object sObject; + descriptor: Ljava/lang/Object; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + +} +SourceFile: "TinyFrameworkClassWithInitializerDefault.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub.class + Compiled from "TinyFrameworkClassWithInitializerStub.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithInitializerStub + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 1, attributes: 3 + public static boolean sInitialized; + descriptor: Z + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static java.lang.Object sObject; + descriptor: Ljava/lang/Object; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub + x: ldc #x // String com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: iconst_1 + x: putstatic #x // Field sInitialized:Z + x: new #x // class java/lang/Object + x: dup + x: invokespecial #x // Method java/lang/Object."":()V + x: putstatic #x // Field sObject:Ljava/lang/Object; + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "TinyFrameworkClassWithInitializerStub.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x(#x=s#x) + android.hosttest.annotation.HostSideTestClassLoadHook( + value="com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded" + ) + x: #x() + android.hosttest.annotation.HostSideTestKeep + x: #x() + android.hosttest.annotation.HostSideTestStaticInitializerKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex.class + Compiled from "TinyFrameworkEnumComplex.java" +public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex extends java.lang.Enum + minor version: 0 + major version: 61 + flags: (0x4031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_ENUM + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + super_class: #x // java/lang/Enum + interfaces: 0, fields: 6, methods: 7, attributes: 4 + public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex RED; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex GREEN; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex BLUE; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private final java.lang.String mLongName; + descriptor: Ljava/lang/String; + flags: (0x0012) ACC_PRIVATE, ACC_FINAL + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private final java.lang.String mShortName; + descriptor: Ljava/lang/String; + flags: (0x0012) ACC_PRIVATE, ACC_FINAL + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] $VALUES; + descriptor: [Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x101a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] values(); + descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=1, locals=0, args_size=0 + x: getstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: invokevirtual #x // Method "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;".clone:()Ljava/lang/Object; + x: checkcast #x // class "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;" + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex valueOf(java.lang.String); + descriptor: (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: aload_0 + x: invokestatic #x // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; + x: checkcast #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 name Ljava/lang/String; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + MethodParameters: + Name Flags + mandated + + private com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex(java.lang.String, java.lang.String); + descriptor: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V + flags: (0x0002) ACC_PRIVATE + Code: + stack=3, locals=5, args_size=5 + x: aload_0 + x: aload_1 + x: iload_2 + x: invokespecial #x // Method java/lang/Enum."":(Ljava/lang/String;I)V + x: aload_0 + x: aload_3 + x: putfield #x // Field mLongName:Ljava/lang/String; + x: aload_0 + x: aload 4 + x: putfield #x // Field mShortName:Ljava/lang/String; + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 18 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + 0 18 3 longName Ljava/lang/String; + 0 18 4 shortName Ljava/lang/String; + Signature: #x // (Ljava/lang/String;Ljava/lang/String;)V + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + MethodParameters: + Name Flags + synthetic + synthetic + + + + public java.lang.String getLongName(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: getfield #x // Field mLongName:Ljava/lang/String; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public java.lang.String getShortName(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: getfield #x // Field mShortName:Ljava/lang/String; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] $values(); + descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=4, locals=0, args_size=0 + x: iconst_3 + x: anewarray #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: dup + x: iconst_0 + x: getstatic #x // Field RED:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: aastore + x: dup + x: iconst_1 + x: getstatic #x // Field GREEN:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: aastore + x: dup + x: iconst_2 + x: getstatic #x // Field BLUE:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: aastore + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=6, locals=0, args_size=0 + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: dup + x: ldc #x // String RED + x: iconst_0 + x: ldc #x // String Red + x: ldc #x // String R + x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V + x: putstatic #x // Field RED:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: dup + x: ldc #x // String GREEN + x: iconst_1 + x: ldc #x // String Green + x: ldc #x // String G + x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V + x: putstatic #x // Field GREEN:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: dup + x: ldc #x // String BLUE + x: iconst_2 + x: ldc #x // String Blue + x: ldc #x // String B + x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V + x: putstatic #x // Field BLUE:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: invokestatic #x // Method $values:()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: putstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +Signature: #x // Ljava/lang/Enum; +SourceFile: "TinyFrameworkEnumComplex.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple.class + Compiled from "TinyFrameworkEnumSimple.java" +public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple extends java.lang.Enum + minor version: 0 + major version: 61 + flags: (0x4031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_ENUM + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + super_class: #x // java/lang/Enum + interfaces: 0, fields: 3, methods: 5, attributes: 4 + public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple CAT; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple DOG; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] $VALUES; + descriptor: [Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x101a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] values(); + descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=1, locals=0, args_size=0 + x: getstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: invokevirtual #x // Method "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;".clone:()Ljava/lang/Object; + x: checkcast #x // class "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;" + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple valueOf(java.lang.String); + descriptor: (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: aload_0 + x: invokestatic #x // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; + x: checkcast #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 name Ljava/lang/String; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + MethodParameters: + Name Flags + mandated + + private com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple(); + descriptor: (Ljava/lang/String;I)V + flags: (0x0002) ACC_PRIVATE + Code: + stack=3, locals=3, args_size=3 + x: aload_0 + x: aload_1 + x: iload_2 + x: invokespecial #x // Method java/lang/Enum."":(Ljava/lang/String;I)V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 7 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + Signature: #x // ()V + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + MethodParameters: + Name Flags + synthetic + synthetic + + private static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] $values(); + descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=4, locals=0, args_size=0 + x: iconst_2 + x: anewarray #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: dup + x: iconst_0 + x: getstatic #x // Field CAT:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: aastore + x: dup + x: iconst_1 + x: getstatic #x // Field DOG:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: aastore + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: dup + x: ldc #x // String CAT + x: iconst_0 + x: invokespecial #x // Method "":(Ljava/lang/String;I)V + x: putstatic #x // Field CAT:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: dup + x: ldc #x // String DOG + x: iconst_1 + x: invokespecial #x // Method "":(Ljava/lang/String;I)V + x: putstatic #x // Field DOG:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: invokestatic #x // Method $values:()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: putstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +Signature: #x // Ljava/lang/Enum; +SourceFile: "TinyFrameworkEnumSimple.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester.class + Compiled from "TinyFrameworkExceptionTester.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTester + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 2, attributes: 3 + public com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTester(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int testException(); + descriptor: ()I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=1, args_size=0 + x: new #x // class java/lang/IllegalStateException + x: dup + x: ldc #x // String Inner exception + x: invokespecial #x // Method java/lang/IllegalStateException."":(Ljava/lang/String;)V + x: athrow + x: astore_0 + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String Outer exception + x: aload_0 + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;Ljava/lang/Throwable;)V + x: athrow + Exception table: + from to target type + 0 10 10 Class java/lang/Exception + StackMapTable: number_of_entries = 1 + frame_type = 74 /* same_locals_1_stack_item */ + stack = [ class java/lang/Exception ] + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 11 0 e Ljava/lang/Exception; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "TinyFrameworkExceptionTester.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy.class + Compiled from "TinyFrameworkForTextPolicy.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPolicy + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 15, attributes: 2 + public int stub; + descriptor: I + flags: (0x0001) ACC_PUBLIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + x: ldc #x // String com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPolicy(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iconst_1 + x: putfield #x // Field stub:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int addOne(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: iload_1 + x: iconst_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + 0 4 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.String toBeIgnoredObj(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aconst_null + x: areturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public void toBeIgnoredV(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=0, locals=1, args_size=1 + x: return + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public boolean toBeIgnoredZ(); + descriptor: ()Z + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: iconst_0 + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public byte toBeIgnoredB(); + descriptor: ()B + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: iconst_0 + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public char toBeIgnoredC(); + descriptor: ()C + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: iconst_0 + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public short toBeIgnoredS(); + descriptor: ()S + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: iconst_0 + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int toBeIgnoredI(); + descriptor: ()I + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: iconst_0 + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public float toBeIgnoredF(); + descriptor: ()F + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: fconst_0 + x: freturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public double toBeIgnoredD(); + descriptor: ()D + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: dconst_0 + x: dreturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int addTwo(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: iload_1 + x: iconst_2 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + 0 4 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int nativeAddThree(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: iload_0 + x: iconst_3 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.String unsupportedMethod(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=3, locals=1, args_size=1 + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onThrowMethodCalled:()V + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String Unreachable + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "TinyFrameworkForTextPolicy.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.class + Compiled from "TinyFrameworkLambdas.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas$Nested + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 8, attributes: 6 + public final java.util.function.Supplier mSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0011) ACC_PUBLIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static final java.util.function.Supplier sSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas$Nested(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 14 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public java.util.function.Supplier getSupplier(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested; + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static java.util.function.Supplier getSupplier_static(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=1, locals=0, args_size=0 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: areturn + LineNumberTable: + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private static java.lang.Integer lambda$getSupplier_static$3(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=1, locals=0, args_size=0 + x: bipush 8 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static java.lang.Integer lambda$getSupplier$2(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=1, locals=0, args_size=0 + x: bipush 7 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static java.lang.Integer lambda$static$1(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=1, locals=0, args_size=0 + x: bipush 6 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static java.lang.Integer lambda$new$0(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=1, locals=0, args_size=0 + x: iconst_5 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=1, locals=0, args_size=0 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested of class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles +SourceFile: "TinyFrameworkLambdas.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + x: #x() + android.hosttest.annotation.HostSideTestStaticInitializerKeep +BootstrapMethods: + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$new$0:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$getSupplier$2:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$getSupplier_static$3:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$static$1:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.class + Compiled from "TinyFrameworkLambdas.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 8, attributes: 6 + public final java.util.function.Supplier mSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0011) ACC_PUBLIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static final java.util.function.Supplier sSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 14 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public java.util.function.Supplier getSupplier(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas; + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static java.util.function.Supplier getSupplier_static(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=1, locals=0, args_size=0 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: areturn + LineNumberTable: + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private static java.lang.Integer lambda$getSupplier_static$3(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=1, locals=0, args_size=0 + x: iconst_4 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static java.lang.Integer lambda$getSupplier$2(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=1, locals=0, args_size=0 + x: iconst_3 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static java.lang.Integer lambda$static$1(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=1, locals=0, args_size=0 + x: iconst_2 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static java.lang.Integer lambda$new$0(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=1, locals=0, args_size=0 + x: iconst_1 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=1, locals=0, args_size=0 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested of class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles +SourceFile: "TinyFrameworkLambdas.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + x: #x() + android.hosttest.annotation.HostSideTestStaticInitializerKeep +BootstrapMethods: + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$new$0:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$getSupplier$2:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$getSupplier_static$3:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$static$1:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; +NestMembers: + com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo.class + Compiled from "TinyFrameworkMethodCallReplace.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 3, attributes: 4 + public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static void startThread(java.lang.Thread); + descriptor: (Ljava/lang/Thread;)V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: iconst_1 + x: invokevirtual #x // Method java/lang/Thread.setDaemon:(Z)V + x: aload_0 + x: invokevirtual #x // Method java/lang/Thread.start:()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 thread Ljava/lang/Thread; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int add(int, int); + descriptor: (II)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=2, args_size=2 + x: iload_0 + x: iload_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 a I + 0 4 1 b I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // ReplaceTo=class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo of class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace +SourceFile: "TinyFrameworkMethodCallReplace.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.class + Compiled from "TinyFrameworkMethodCallReplace.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 4, attributes: 6 + public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static boolean nonStaticMethodCallReplaceTester() throws java.lang.Exception; + descriptor: ()Z + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=3, locals=2, args_size=0 + x: new #x // class java/util/concurrent/atomic/AtomicBoolean + x: dup + x: iconst_0 + x: invokespecial #x // Method java/util/concurrent/atomic/AtomicBoolean."":(Z)V + x: astore_0 + x: new #x // class java/lang/Thread + x: dup + x: aload_0 + x: invokedynamic #x, 0 // InvokeDynamic #x:run:(Ljava/util/concurrent/atomic/AtomicBoolean;)Ljava/lang/Runnable; + x: invokespecial #x // Method java/lang/Thread."":(Ljava/lang/Runnable;)V + x: astore_1 + x: aload_1 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo.startThread:(Ljava/lang/Thread;)V + x: aload_1 + x: invokevirtual #x // Method java/lang/Thread.join:()V + x: aload_0 + x: invokevirtual #x // Method java/util/concurrent/atomic/AtomicBoolean.get:()Z + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 9 27 0 ab Ljava/util/concurrent/atomic/AtomicBoolean; + 23 13 1 th Ljava/lang/Thread; + Exceptions: + throws java.lang.Exception + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int staticMethodCallReplaceTester(); + descriptor: ()I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: iconst_1 + x: iconst_2 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo.add:(II)I + x: ireturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static void lambda$nonStaticMethodCallReplaceTester$0(java.util.concurrent.atomic.AtomicBoolean); + descriptor: (Ljava/util/concurrent/atomic/AtomicBoolean;)V + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: invokestatic #x // Method java/lang/Thread.currentThread:()Ljava/lang/Thread; + x: invokevirtual #x // Method java/lang/Thread.isDaemon:()Z + x: invokevirtual #x // Method java/util/concurrent/atomic/AtomicBoolean.set:(Z)V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 11 0 ab Ljava/util/concurrent/atomic/AtomicBoolean; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // ReplaceTo=class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo of class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace + public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles +SourceFile: "TinyFrameworkMethodCallReplace.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +BootstrapMethods: + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()V + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.lambda$nonStaticMethodCallReplaceTester$0:(Ljava/util/concurrent/atomic/AtomicBoolean;)V + #x ()V +NestMembers: + com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.class + Compiled from "TinyFrameworkNative.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 14, attributes: 3 + int value; + descriptor: I + flags: (0x0000) + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNative(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int nativeAddTwo(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=1, locals=1, args_size=1 + x: iload_0 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeAddTwo:(I)I + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect + + public static int nativeAddTwo_should_be_like_this(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=1, locals=1, args_size=1 + x: iload_0 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeAddTwo:(I)I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 arg I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static long nativeLongPlus(long, long); + descriptor: (JJ)J + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=4, args_size=2 + x: lload_0 + x: lload_2 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeLongPlus:(JJ)J + x: lreturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect + + public static long nativeLongPlus_should_be_like_this(long, long); + descriptor: (JJ)J + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=4, args_size=2 + x: lload_0 + x: lload_2 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeLongPlus:(JJ)J + x: lreturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 6 0 arg1 J + 0 6 2 arg2 J + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public void setValue(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: iload_1 + x: putfield #x // Field value:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; + 0 6 1 v I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int nativeNonStaticAddToValue(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: iload_1 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeNonStaticAddToValue:(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect + + public int nativeNonStaticAddToValue_should_be_like_this(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: iload_1 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeNonStaticAddToValue:(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; + 0 6 1 arg I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static void nativeStillNotSupported(); + descriptor: ()V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=3, locals=0, args_size=0 + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onThrowMethodCalled:()V + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String Unreachable + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestThrow + + public static native void nativeStillKeep(); + descriptor: ()V + flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static void nativeStillNotSupported_should_be_like_this(); + descriptor: ()V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: new #x // class java/lang/RuntimeException + x: dup + x: invokespecial #x // Method java/lang/RuntimeException."":()V + x: athrow + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static byte nativeBytePlus(byte, byte); + descriptor: (BB)B + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=2, args_size=2 + x: iload_0 + x: iload_1 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeBytePlus:(BB)B + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect + + public void notNativeRedirected(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.notNativeRedirected:(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;)V + x: return + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect + + public static void notNativeStaticRedirected(); + descriptor: ()V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=0, locals=0, args_size=0 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.notNativeStaticRedirected:()V + x: return + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect +} +SourceFile: "TinyFrameworkNative.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep + x: #x(#x=s#x) + android.hosttest.annotation.HostSideTestRedirectionClass( + value="TinyFrameworkNative_host" + ) +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.class + Compiled from "TinyFrameworkNative_host.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 7, attributes: 3 + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int nativeAddTwo(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=1, args_size=1 + x: iload_0 + x: iconst_2 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 arg I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static long nativeLongPlus(long, long); + descriptor: (JJ)J + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=4, args_size=2 + x: lload_0 + x: lload_2 + x: ladd + x: lreturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 4 0 arg1 J + 0 4 2 arg2 J + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int nativeNonStaticAddToValue(com.android.hoststubgen.test.tinyframework.TinyFrameworkNative, int); + descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: getfield #x // Field com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.value:I + x: iload_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 7 0 source Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; + 0 7 1 arg I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static byte nativeBytePlus(byte, byte); + descriptor: (BB)B + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=2, args_size=2 + x: iload_0 + x: iload_1 + x: iadd + x: i2b + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 arg1 B + 0 5 1 arg2 B + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static void notNativeRedirected(com.android.hoststubgen.test.tinyframework.TinyFrameworkNative); + descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;)V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=0, locals=1, args_size=1 + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 1 0 source Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static void notNativeStaticRedirected(); + descriptor: ()V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=0, locals=0, args_size=0 + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "TinyFrameworkNative_host.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1.class + Compiled from "TinyFrameworkNestedClasses.java" +class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$1 extends java.lang.Object implements java.util.function.Supplier + minor version: 0 + major version: 61 + flags: (0x0020) ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 + super_class: #x // java/lang/Object + interfaces: 1, fields: 1, methods: 3, attributes: 6 + final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$1(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); + descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + flags: (0x0000) + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: aload_1 + x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; + 0 10 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + MethodParameters: + Name Flags + final mandated + + public java.lang.Integer get(); + descriptor: ()Ljava/lang/Integer; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: iconst_1 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.Object get(); + descriptor: ()Ljava/lang/Object; + flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokevirtual #x // Method get:()Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 +EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses +Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2.class + Compiled from "TinyFrameworkNestedClasses.java" +class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2 extends java.lang.Object implements java.util.function.Supplier + minor version: 0 + major version: 61 + flags: (0x0020) ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 3, attributes: 6 + com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2(); + descriptor: ()V + flags: (0x0000) + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.Integer get(); + descriptor: ()Ljava/lang/Integer; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: iconst_2 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.Object get(); + descriptor: ()Ljava/lang/Object; + flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokevirtual #x // Method get:()Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 +EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses +Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3.class + Compiled from "TinyFrameworkNestedClasses.java" +class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$3 extends java.lang.Object implements java.util.function.Supplier + minor version: 0 + major version: 61 + flags: (0x0020) ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 + super_class: #x // java/lang/Object + interfaces: 1, fields: 1, methods: 3, attributes: 6 + final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$3(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); + descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + flags: (0x0000) + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: aload_1 + x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; + 0 10 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + MethodParameters: + Name Flags + final mandated + + public java.lang.Integer get(); + descriptor: ()Ljava/lang/Integer; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: iconst_3 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.Object get(); + descriptor: ()Ljava/lang/Object; + flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokevirtual #x // Method get:()Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 +EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses.getSupplier +Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4.class + Compiled from "TinyFrameworkNestedClasses.java" +class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4 extends java.lang.Object implements java.util.function.Supplier + minor version: 0 + major version: 61 + flags: (0x0020) ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 3, attributes: 6 + com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4(); + descriptor: ()V + flags: (0x0000) + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.Integer get(); + descriptor: ()Ljava/lang/Integer; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: iconst_4 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.Object get(); + descriptor: ()Ljava/lang/Object; + flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokevirtual #x // Method get:()Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 +EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses.getSupplier_static +Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 1, attributes: 4 + public int value; + descriptor: I + flags: (0x0001) ACC_PUBLIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iload_1 + x: putfield #x // Field value:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass; + 0 10 1 x I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$InnerClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 1, attributes: 4 + public int value; + descriptor: I + flags: (0x0001) ACC_PUBLIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$InnerClass(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); + descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: aload_1 + x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iconst_5 + x: putfield #x // Field value:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 15 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass; + 0 15 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + MethodParameters: + Name Flags + final mandated +} +InnerClasses: + public #x= #x of #x; // InnerClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1.class + Compiled from "TinyFrameworkNestedClasses.java" +class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$1 extends java.lang.Object implements java.util.function.Supplier + minor version: 0 + major version: 61 + flags: (0x0020) ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 3, attributes: 6 + com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$1(); + descriptor: ()V + flags: (0x0000) + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.Integer get(); + descriptor: ()Ljava/lang/Integer; + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: bipush 7 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.Object get(); + descriptor: ()Ljava/lang/Object; + flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokevirtual #x // Method get:()Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 +EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass.getSupplier_static +Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 1, attributes: 4 + public int value; + descriptor: I + flags: (0x0001) ACC_PUBLIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: bipush 8 + x: putfield #x // Field value:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 11 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 2, attributes: 4 + public int value; + descriptor: I + flags: (0x0001) ACC_PUBLIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: bipush 6 + x: putfield #x // Field value:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 11 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static java.util.function.Supplier getSupplier_static(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 + x: dup + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1."":()V + x: areturn + LineNumberTable: + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 + public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$SubClass extends com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass + super_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass + interfaces: 0, fields: 0, methods: 1, attributes: 4 + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$SubClass(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: iload_1 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass."":(I)V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass; + 0 6 1 x I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public static #x= #x of #x; // SubClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 4, attributes: 5 + public final java.util.function.Supplier mSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0011) ACC_PUBLIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static final java.util.function.Supplier sSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 + x: dup + x: aload_0 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1."":(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 17 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.util.function.Supplier getSupplier(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0001) ACC_PUBLIC + Code: + stack=3, locals=1, args_size=1 + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 + x: dup + x: aload_0 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3."":(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 9 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static java.util.function.Supplier getSupplier_static(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 + x: dup + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4."":()V + x: areturn + LineNumberTable: + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 + x: dup + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2."":()V + x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 + public static #x= #x of #x; // SubClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public #x= #x of #x; // InnerClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +NestMembers: + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect.class + Compiled from "TinyFrameworkPackageRedirect.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedirect + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 2, attributes: 3 + public com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedirect(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int foo(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=3, locals=1, args_size=1 + x: new #x // class com/supported/UnsupportedClass + x: dup + x: iload_0 + x: invokespecial #x // Method com/supported/UnsupportedClass."":(I)V + x: invokevirtual #x // Method com/supported/UnsupportedClass.getValue:()I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 12 0 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "TinyFrameworkPackageRedirect.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.class + Compiled from "TinyFrameworkRenamedClassCaller.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 2, attributes: 3 + public com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int foo(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=3, locals=1, args_size=1 + x: new #x // class rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed + x: dup + x: iload_0 + x: invokespecial #x // Method rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed."":(I)V + x: invokevirtual #x // Method rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.getValue:()I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 12 0 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "TinyFrameworkRenamedClassCaller.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/packagetest/A.class + Compiled from "A.java" +public class com.android.hoststubgen.test.tinyframework.packagetest.A + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/A + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "A.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/packagetest/sub/A.class + Compiled from "A.java" +public class com.android.hoststubgen.test.tinyframework.packagetest.sub.A + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/sub/A + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "A.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C1.class + Compiled from "C1.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.C1 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "C1.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C2.class + Compiled from "C2.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.C2 extends com.android.hoststubgen.test.tinyframework.subclasstest.C1 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 + interfaces: 0, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "C2.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C3.class + Compiled from "C3.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.C3 extends com.android.hoststubgen.test.tinyframework.subclasstest.C2 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3 + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 + interfaces: 0, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "C3.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/CA.class + Compiled from "CA.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.CA + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CA + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "CA.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/CB.class + Compiled from "CB.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.CB + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CB + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "CB.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1.class + Compiled from "Class_C1.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C1 extends com.android.hoststubgen.test.tinyframework.subclasstest.C1 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1 + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 + interfaces: 0, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "Class_C1.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2.class + Compiled from "Class_C2.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C2 extends com.android.hoststubgen.test.tinyframework.subclasstest.C2 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2 + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 + interfaces: 0, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "Class_C2.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3.class + Compiled from "Class_C3.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C3 extends com.android.hoststubgen.test.tinyframework.subclasstest.C3 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3 + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3 + interfaces: 0, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "Class_C3.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1.class + Compiled from "Class_I1.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1 implements com.android.hoststubgen.test.tinyframework.subclasstest.I1 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "Class_I1.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA.class + Compiled from "Class_I1_IA.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1_IA implements com.android.hoststubgen.test.tinyframework.subclasstest.I1,com.android.hoststubgen.test.tinyframework.subclasstest.IA + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA + super_class: #x // java/lang/Object + interfaces: 2, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "Class_I1_IA.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2.class + Compiled from "Class_I2.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I2 implements com.android.hoststubgen.test.tinyframework.subclasstest.I2 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "Class_I2.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3.class + Compiled from "Class_I3.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3 implements com.android.hoststubgen.test.tinyframework.subclasstest.I3 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "Class_I3.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I1.class + Compiled from "I1.java" +public interface com.android.hoststubgen.test.tinyframework.subclasstest.I1 + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I1 + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "I1.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I2.class + Compiled from "I2.java" +public interface com.android.hoststubgen.test.tinyframework.subclasstest.I2 extends com.android.hoststubgen.test.tinyframework.subclasstest.I1 + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I2 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "I2.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I3.class + Compiled from "I3.java" +public interface com.android.hoststubgen.test.tinyframework.subclasstest.I3 extends com.android.hoststubgen.test.tinyframework.subclasstest.I2 + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I3 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "I3.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/IA.class + Compiled from "IA.java" +public interface com.android.hoststubgen.test.tinyframework.subclasstest.IA + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IA + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "IA.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/IB.class + Compiled from "IB.java" +public interface com.android.hoststubgen.test.tinyframework.subclasstest.IB + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IB + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 0, attributes: 2 +} +SourceFile: "IB.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/supported/UnsupportedClass.class + Compiled from "UnsupportedClass.java" +public class com.supported.UnsupportedClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/supported/UnsupportedClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 2, attributes: 3 + private final int mValue; + descriptor: I + flags: (0x0012) ACC_PRIVATE, ACC_FINAL + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public com.supported.UnsupportedClass(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iload_1 + x: putfield #x // Field mValue:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/supported/UnsupportedClass; + 0 10 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int getValue(); + descriptor: ()I + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: getfield #x // Field mValue:I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/supported/UnsupportedClass; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "UnsupportedClass.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/unsupported/UnsupportedClass.class + Compiled from "UnsupportedClass.java" +public class com.unsupported.UnsupportedClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/unsupported/UnsupportedClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 2, attributes: 3 + public com.unsupported.UnsupportedClass(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=3, locals=2, args_size=2 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String This class is not supported + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 14 0 this Lcom/unsupported/UnsupportedClass; + 0 14 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int getValue(); + descriptor: ()I + flags: (0x0001) ACC_PUBLIC + Code: + stack=3, locals=1, args_size=1 + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String This class is not supported + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/unsupported/UnsupportedClass; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "UnsupportedClass.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.class + Compiled from "TinyFrameworkToBeRenamed.java" +public class rename_prefix.com.android.hoststubgen.test.tinyframework.TinyFrameworkToBeRenamed + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 2, attributes: 3 + private final int mValue; + descriptor: I + flags: (0x0012) ACC_PRIVATE, ACC_FINAL + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public rename_prefix.com.android.hoststubgen.test.tinyframework.TinyFrameworkToBeRenamed(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=2, locals=2, args_size=2 + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iload_1 + x: putfield #x // Field mValue:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed; + 0 10 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int getValue(); + descriptor: ()I + flags: (0x0001) ACC_PUBLIC + Code: + stack=1, locals=1, args_size=1 + x: aload_0 + x: getfield #x // Field mValue:I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "TinyFrameworkToBeRenamed.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/13-hoststubgen-test-tiny-framework-host-ext-dump.txt b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/13-hoststubgen-test-tiny-framework-host-ext-dump.txt new file mode 100644 index 000000000000..0f8af92dc486 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/golden-output/13-hoststubgen-test-tiny-framework-host-ext-dump.txt @@ -0,0 +1,4926 @@ +## Class: android/hosttest/annotation/HostSideTestClassLoadHook.class + Compiled from "HostSideTestClassLoadHook.java" +public interface android.hosttest.annotation.HostSideTestClassLoadHook extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestClassLoadHook + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 2, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class android/hosttest/annotation/HostSideTestClassLoadHook + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public abstract java.lang.String value(); + descriptor: ()Ljava/lang/String; + flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "HostSideTestClassLoadHook.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestKeep.class + Compiled from "HostSideTestKeep.java" +public interface android.hosttest.annotation.HostSideTestKeep extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestKeep + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class android/hosttest/annotation/HostSideTestKeep + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "HostSideTestKeep.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestRedirect.class + Compiled from "HostSideTestRedirect.java" +public interface android.hosttest.annotation.HostSideTestRedirect extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestRedirect + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class android/hosttest/annotation/HostSideTestRedirect + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "HostSideTestRedirect.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.METHOD] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestRedirectionClass.class + Compiled from "HostSideTestRedirectionClass.java" +public interface android.hosttest.annotation.HostSideTestRedirectionClass extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestRedirectionClass + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 2, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class android/hosttest/annotation/HostSideTestRedirectionClass + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public abstract java.lang.String value(); + descriptor: ()Ljava/lang/String; + flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "HostSideTestRedirectionClass.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestRemove.class + Compiled from "HostSideTestRemove.java" +public interface android.hosttest.annotation.HostSideTestRemove extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestRemove + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class android/hosttest/annotation/HostSideTestRemove + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "HostSideTestRemove.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestStaticInitializerKeep.class + Compiled from "HostSideTestStaticInitializerKeep.java" +public interface android.hosttest.annotation.HostSideTestStaticInitializerKeep extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestStaticInitializerKeep + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class android/hosttest/annotation/HostSideTestStaticInitializerKeep + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "HostSideTestStaticInitializerKeep.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestSubstitute.class + Compiled from "HostSideTestSubstitute.java" +public interface android.hosttest.annotation.HostSideTestSubstitute extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestSubstitute + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 2, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class android/hosttest/annotation/HostSideTestSubstitute + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public abstract java.lang.String suffix(); + descriptor: ()Ljava/lang/String; + flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "HostSideTestSubstitute.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.METHOD] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestThrow.class + Compiled from "HostSideTestThrow.java" +public interface android.hosttest.annotation.HostSideTestThrow extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestThrow + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class android/hosttest/annotation/HostSideTestThrow + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "HostSideTestThrow.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x,e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: android/hosttest/annotation/HostSideTestWholeClassKeep.class + Compiled from "HostSideTestWholeClassKeep.java" +public interface android.hosttest.annotation.HostSideTestWholeClassKeep extends java.lang.annotation.Annotation + minor version: 0 + major version: 61 + flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION + this_class: #x // android/hosttest/annotation/HostSideTestWholeClassKeep + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class android/hosttest/annotation/HostSideTestWholeClassKeep + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "HostSideTestWholeClassKeep.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + x: #x(#x=[e#x.#x]) + java.lang.annotation.Target( + value=[Ljava/lang/annotation/ElementType;.TYPE] + ) + x: #x(#x=e#x.#x) + java.lang.annotation.Retention( + value=Ljava/lang/annotation/RetentionPolicy;.CLASS + ) +## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy.class + Compiled from "IPretendingAidl.java" +public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Proxy + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 3, attributes: 4 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Proxy(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int addTwo(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy + x: ldc #x // String addTwo + x: ldc #x // String (I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iload_0 + x: iconst_2 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 4 0 a I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl + public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub +SourceFile: "IPretendingAidl.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/IPretendingAidl +## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub.class + Compiled from "IPretendingAidl.java" +public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 3, attributes: 4 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int addOne(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub + x: ldc #x // String addOne + x: ldc #x // String (I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iload_0 + x: iconst_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 4 0 a I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl + public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub +SourceFile: "IPretendingAidl.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/IPretendingAidl +## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl.class + Compiled from "IPretendingAidl.java" +public interface com.android.hoststubgen.test.tinyframework.IPretendingAidl + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 4 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/IPretendingAidl + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +InnerClasses: + public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl + public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub +SourceFile: "IPretendingAidl.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestMembers: + com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub + com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy +## Class: com/android/hoststubgen/test/tinyframework/R$Nested.class + Compiled from "R.java" +public class com.android.hoststubgen.test.tinyframework.R$Nested + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/R$Nested + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 2, attributes: 4 + public static int[] ARRAY; + descriptor: [I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public com.android.hoststubgen.test.tinyframework.R$Nested(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/R$Nested + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/R$Nested; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/R$Nested + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: ldc #x // class com/android/hoststubgen/test/tinyframework/R$Nested + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: iconst_1 + x: newarray int + x: dup + x: iconst_0 + x: iconst_1 + x: iastore + x: putstatic #x // Field ARRAY:[I + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/R$Nested of class com/android/hoststubgen/test/tinyframework/R +SourceFile: "R.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/R +## Class: com/android/hoststubgen/test/tinyframework/R.class + Compiled from "R.java" +public class com.android.hoststubgen.test.tinyframework.R + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/R + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 2, attributes: 4 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/R + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.R(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/R + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/R; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/R$Nested of class com/android/hoststubgen/test/tinyframework/R +SourceFile: "R.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestMembers: + com/android/hoststubgen/test/tinyframework/R$Nested +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.class + Compiled from "TinyFrameworkAnnotations.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 7, attributes: 3 + public int keep; + descriptor: I + flags: (0x0001) ACC_PUBLIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations + x: ldc #x // String com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iconst_1 + x: putfield #x // Field keep:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public int addOne(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations + x: ldc #x // String addOne + x: ldc #x // String (I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iload_1 + x: iconst_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; + 11 4 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public int addTwo(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations + x: ldc #x // String addTwo + x: ldc #x // String (I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iload_1 + x: iconst_2 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; + 11 4 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int nativeAddThree(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations + x: ldc #x // String nativeAddThree + x: ldc #x // String (I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iload_0 + x: iconst_3 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 4 0 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.String unsupportedMethod(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations + x: ldc #x // String unsupportedMethod + x: ldc #x // String ()Ljava/lang/String; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onThrowMethodCalled:()V + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String Unreachable + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestThrow + + public int toBeIgnored(); + descriptor: ()I + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations + x: ldc #x // String toBeIgnored + x: ldc #x // String ()I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_0 + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestIgnore +} +SourceFile: "TinyFrameworkAnnotations.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + x: #x(#x=s#x) + android.hosttest.annotation.HostSideTestClassLoadHook( + value="com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded" + ) +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook.class + Compiled from "TinyFrameworkClassLoadHook.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 3, attributes: 3 + public static final java.util.Set> sLoadedClasses; + descriptor: Ljava/util/Set; + flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL + Signature: #x // Ljava/util/Set;>; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook(); + descriptor: ()V + flags: (0x0002) ACC_PRIVATE + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static void onClassLoaded(java.lang.Class); + descriptor: (Ljava/lang/Class;)V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook + x: ldc #x // String onClassLoaded + x: ldc #x // String (Ljava/lang/Class;)V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: getstatic #x // Field sLoadedClasses:Ljava/util/Set; + x: aload_0 + x: invokeinterface #x, 2 // InterfaceMethod java/util/Set.add:(Ljava/lang/Object;)Z + x: pop + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 11 0 clazz Ljava/lang/Class; + LocalVariableTypeTable: + Start Length Slot Name Signature + 11 11 0 clazz Ljava/lang/Class<*>; + Signature: #x // (Ljava/lang/Class<*>;)V + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: new #x // class java/util/HashSet + x: dup + x: invokespecial #x // Method java/util/HashSet."":()V + x: putstatic #x // Field sLoadedClasses:Ljava/util/Set; + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "TinyFrameworkClassLoadHook.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations.class + Compiled from "TinyFrameworkClassWideAnnotations.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWideAnnotations + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 5, attributes: 3 + public int keep; + descriptor: I + flags: (0x0001) ACC_PUBLIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWideAnnotations(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iconst_1 + x: putfield #x // Field keep:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int addOne(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations + x: ldc #x // String addOne + x: ldc #x // String (I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iload_1 + x: iconst_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; + 11 4 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int addTwo(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations + x: ldc #x // String addTwo + x: ldc #x // String (I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iload_1 + x: iconst_2 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; + 11 4 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.String unsupportedMethod(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations + x: ldc #x // String unsupportedMethod + x: ldc #x // String ()Ljava/lang/String; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onThrowMethodCalled:()V + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String Unreachable + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestThrow +} +SourceFile: "TinyFrameworkClassWideAnnotations.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault.class + Compiled from "TinyFrameworkClassWithInitializerDefault.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithInitializerDefault + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 0, attributes: 3 + public static boolean sInitialized; + descriptor: Z + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static java.lang.Object sObject; + descriptor: Ljava/lang/Object; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + +} +SourceFile: "TinyFrameworkClassWithInitializerDefault.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub.class + Compiled from "TinyFrameworkClassWithInitializerStub.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithInitializerStub + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 1, attributes: 3 + public static boolean sInitialized; + descriptor: Z + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static java.lang.Object sObject; + descriptor: Ljava/lang/Object; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub + x: ldc #x // String com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: iconst_1 + x: putstatic #x // Field sInitialized:Z + x: new #x // class java/lang/Object + x: dup + x: invokespecial #x // Method java/lang/Object."":()V + x: putstatic #x // Field sObject:Ljava/lang/Object; + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "TinyFrameworkClassWithInitializerStub.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x(#x=s#x) + android.hosttest.annotation.HostSideTestClassLoadHook( + value="com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded" + ) + x: #x() + android.hosttest.annotation.HostSideTestKeep + x: #x() + android.hosttest.annotation.HostSideTestStaticInitializerKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex.class + Compiled from "TinyFrameworkEnumComplex.java" +public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex extends java.lang.Enum + minor version: 0 + major version: 61 + flags: (0x4031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_ENUM + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + super_class: #x // java/lang/Enum + interfaces: 0, fields: 6, methods: 7, attributes: 4 + public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex RED; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex GREEN; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex BLUE; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private final java.lang.String mLongName; + descriptor: Ljava/lang/String; + flags: (0x0012) ACC_PRIVATE, ACC_FINAL + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private final java.lang.String mShortName; + descriptor: Ljava/lang/String; + flags: (0x0012) ACC_PRIVATE, ACC_FINAL + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] $VALUES; + descriptor: [Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x101a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] values(); + descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: ldc #x // String values + x: ldc #x // String ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: getstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: invokevirtual #x // Method "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;".clone:()Ljava/lang/Object; + x: checkcast #x // class "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;" + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex valueOf(java.lang.String); + descriptor: (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: ldc #x // String valueOf + x: ldc #x // String (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: aload_0 + x: invokestatic #x // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; + x: checkcast #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 10 0 name Ljava/lang/String; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + MethodParameters: + Name Flags + mandated + + private com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex(java.lang.String, java.lang.String); + descriptor: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V + flags: (0x0002) ACC_PRIVATE + Code: + stack=4, locals=5, args_size=5 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: ldc #x // String + x: ldc #x // String (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: aload_1 + x: iload_2 + x: invokespecial #x // Method java/lang/Enum."":(Ljava/lang/String;I)V + x: aload_0 + x: aload_3 + x: putfield #x // Field mLongName:Ljava/lang/String; + x: aload_0 + x: aload 4 + x: putfield #x // Field mShortName:Ljava/lang/String; + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 18 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + 11 18 3 longName Ljava/lang/String; + 11 18 4 shortName Ljava/lang/String; + Signature: #x // (Ljava/lang/String;Ljava/lang/String;)V + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + MethodParameters: + Name Flags + synthetic + synthetic + + + + public java.lang.String getLongName(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: ldc #x // String getLongName + x: ldc #x // String ()Ljava/lang/String; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: getfield #x // Field mLongName:Ljava/lang/String; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public java.lang.String getShortName(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: ldc #x // String getShortName + x: ldc #x // String ()Ljava/lang/String; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: getfield #x // Field mShortName:Ljava/lang/String; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] $values(); + descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: ldc #x // String $values + x: ldc #x // String ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_3 + x: anewarray #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: dup + x: iconst_0 + x: getstatic #x // Field RED:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: aastore + x: dup + x: iconst_1 + x: getstatic #x // Field GREEN:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: aastore + x: dup + x: iconst_2 + x: getstatic #x // Field BLUE:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: aastore + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=6, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: dup + x: ldc #x // String RED + x: iconst_0 + x: ldc #x // String Red + x: ldc #x // String R + x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V + x: putstatic #x // Field RED:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: dup + x: ldc #x // String GREEN + x: iconst_1 + x: ldc #x // String Green + x: ldc #x // String G + x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V + x: putstatic #x // Field GREEN:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex + x: dup + x: ldc #x // String BLUE + x: iconst_2 + x: ldc #x // String Blue + x: ldc #x // String B + x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V + x: putstatic #x // Field BLUE:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: invokestatic #x // Method $values:()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: putstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +Signature: #x // Ljava/lang/Enum; +SourceFile: "TinyFrameworkEnumComplex.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple.class + Compiled from "TinyFrameworkEnumSimple.java" +public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple extends java.lang.Enum + minor version: 0 + major version: 61 + flags: (0x4031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_ENUM + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + super_class: #x // java/lang/Enum + interfaces: 0, fields: 3, methods: 5, attributes: 4 + public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple CAT; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple DOG; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] $VALUES; + descriptor: [Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x101a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] values(); + descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: ldc #x // String values + x: ldc #x // String ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: getstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: invokevirtual #x // Method "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;".clone:()Ljava/lang/Object; + x: checkcast #x // class "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;" + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple valueOf(java.lang.String); + descriptor: (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: ldc #x // String valueOf + x: ldc #x // String (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: aload_0 + x: invokestatic #x // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; + x: checkcast #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 10 0 name Ljava/lang/String; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + MethodParameters: + Name Flags + mandated + + private com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple(); + descriptor: (Ljava/lang/String;I)V + flags: (0x0002) ACC_PRIVATE + Code: + stack=4, locals=3, args_size=3 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: ldc #x // String + x: ldc #x // String (Ljava/lang/String;I)V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: aload_1 + x: iload_2 + x: invokespecial #x // Method java/lang/Enum."":(Ljava/lang/String;I)V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 7 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + Signature: #x // ()V + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + MethodParameters: + Name Flags + synthetic + synthetic + + private static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] $values(); + descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: ldc #x // String $values + x: ldc #x // String ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_2 + x: anewarray #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: dup + x: iconst_0 + x: getstatic #x // Field CAT:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: aastore + x: dup + x: iconst_1 + x: getstatic #x // Field DOG:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: aastore + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: dup + x: ldc #x // String CAT + x: iconst_0 + x: invokespecial #x // Method "":(Ljava/lang/String;I)V + x: putstatic #x // Field CAT:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple + x: dup + x: ldc #x // String DOG + x: iconst_1 + x: invokespecial #x // Method "":(Ljava/lang/String;I)V + x: putstatic #x // Field DOG:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: invokestatic #x // Method $values:()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: putstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +Signature: #x // Ljava/lang/Enum; +SourceFile: "TinyFrameworkEnumSimple.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester.class + Compiled from "TinyFrameworkExceptionTester.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTester + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 3, attributes: 3 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTester(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int testException(); + descriptor: ()I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=1, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester + x: ldc #x // String testException + x: ldc #x // String ()I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: new #x // class java/lang/IllegalStateException + x: dup + x: ldc #x // String Inner exception + x: invokespecial #x // Method java/lang/IllegalStateException."":(Ljava/lang/String;)V + x: athrow + x: astore_0 + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String Outer exception + x: aload_0 + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;Ljava/lang/Throwable;)V + x: athrow + Exception table: + from to target type + 11 21 21 Class java/lang/Exception + StackMapTable: number_of_entries = 1 + frame_type = 85 /* same_locals_1_stack_item */ + stack = [ class java/lang/Exception ] + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 22 11 0 e Ljava/lang/Exception; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "TinyFrameworkExceptionTester.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy.class + Compiled from "TinyFrameworkForTextPolicy.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPolicy + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 15, attributes: 2 + public int stub; + descriptor: I + flags: (0x0001) ACC_PUBLIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + x: ldc #x // String com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPolicy(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iconst_1 + x: putfield #x // Field stub:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int addOne(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + x: ldc #x // String addOne + x: ldc #x // String (I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iload_1 + x: iconst_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + 11 4 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.String toBeIgnoredObj(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + x: ldc #x // String toBeIgnoredObj + x: ldc #x // String ()Ljava/lang/String; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aconst_null + x: areturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public void toBeIgnoredV(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + x: ldc #x // String toBeIgnoredV + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: return + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public boolean toBeIgnoredZ(); + descriptor: ()Z + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + x: ldc #x // String toBeIgnoredZ + x: ldc #x // String ()Z + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_0 + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public byte toBeIgnoredB(); + descriptor: ()B + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + x: ldc #x // String toBeIgnoredB + x: ldc #x // String ()B + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_0 + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public char toBeIgnoredC(); + descriptor: ()C + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + x: ldc #x // String toBeIgnoredC + x: ldc #x // String ()C + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_0 + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public short toBeIgnoredS(); + descriptor: ()S + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + x: ldc #x // String toBeIgnoredS + x: ldc #x // String ()S + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_0 + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int toBeIgnoredI(); + descriptor: ()I + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + x: ldc #x // String toBeIgnoredI + x: ldc #x // String ()I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_0 + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public float toBeIgnoredF(); + descriptor: ()F + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + x: ldc #x // String toBeIgnoredF + x: ldc #x // String ()F + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: fconst_0 + x: freturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public double toBeIgnoredD(); + descriptor: ()D + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + x: ldc #x // String toBeIgnoredD + x: ldc #x // String ()D + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: dconst_0 + x: dreturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int addTwo(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + x: ldc #x // String addTwo + x: ldc #x // String (I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iload_1 + x: iconst_2 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; + 11 4 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int nativeAddThree(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + x: ldc #x // String nativeAddThree + x: ldc #x // String (I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iload_0 + x: iconst_3 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 4 0 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.String unsupportedMethod(); + descriptor: ()Ljava/lang/String; + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy + x: ldc #x // String unsupportedMethod + x: ldc #x // String ()Ljava/lang/String; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onThrowMethodCalled:()V + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String Unreachable + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "TinyFrameworkForTextPolicy.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.class + Compiled from "TinyFrameworkLambdas.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas$Nested + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 8, attributes: 6 + public final java.util.function.Supplier mSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0011) ACC_PUBLIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static final java.util.function.Supplier sSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas$Nested(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 14 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public java.util.function.Supplier getSupplier(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested + x: ldc #x // String getSupplier + x: ldc #x // String ()Ljava/util/function/Supplier; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested; + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static java.util.function.Supplier getSupplier_static(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested + x: ldc #x // String getSupplier_static + x: ldc #x // String ()Ljava/util/function/Supplier; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: areturn + LineNumberTable: + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private static java.lang.Integer lambda$getSupplier_static$3(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested + x: ldc #x // String lambda$getSupplier_static$3 + x: ldc #x // String ()Ljava/lang/Integer; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: bipush 8 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static java.lang.Integer lambda$getSupplier$2(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested + x: ldc #x // String lambda$getSupplier$2 + x: ldc #x // String ()Ljava/lang/Integer; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: bipush 7 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static java.lang.Integer lambda$static$1(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested + x: ldc #x // String lambda$static$1 + x: ldc #x // String ()Ljava/lang/Integer; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: bipush 6 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static java.lang.Integer lambda$new$0(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested + x: ldc #x // String lambda$new$0 + x: ldc #x // String ()Ljava/lang/Integer; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_5 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested of class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles +SourceFile: "TinyFrameworkLambdas.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + x: #x() + android.hosttest.annotation.HostSideTestStaticInitializerKeep +BootstrapMethods: + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$new$0:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$getSupplier$2:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$getSupplier_static$3:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$static$1:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.class + Compiled from "TinyFrameworkLambdas.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 8, attributes: 6 + public final java.util.function.Supplier mSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0011) ACC_PUBLIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static final java.util.function.Supplier sSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 14 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public java.util.function.Supplier getSupplier(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + x: ldc #x // String getSupplier + x: ldc #x // String ()Ljava/util/function/Supplier; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas; + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + public static java.util.function.Supplier getSupplier_static(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + x: ldc #x // String getSupplier_static + x: ldc #x // String ()Ljava/util/function/Supplier; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: areturn + LineNumberTable: + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + + private static java.lang.Integer lambda$getSupplier_static$3(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + x: ldc #x // String lambda$getSupplier_static$3 + x: ldc #x // String ()Ljava/lang/Integer; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_4 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static java.lang.Integer lambda$getSupplier$2(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + x: ldc #x // String lambda$getSupplier$2 + x: ldc #x // String ()Ljava/lang/Integer; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_3 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static java.lang.Integer lambda$static$1(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + x: ldc #x // String lambda$static$1 + x: ldc #x // String ()Ljava/lang/Integer; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_2 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static java.lang.Integer lambda$new$0(); + descriptor: ()Ljava/lang/Integer; + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + x: ldc #x // String lambda$new$0 + x: ldc #x // String ()Ljava/lang/Integer; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_1 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; + x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested of class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas + public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles +SourceFile: "TinyFrameworkLambdas.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestKeep + x: #x() + android.hosttest.annotation.HostSideTestStaticInitializerKeep +BootstrapMethods: + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$new$0:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$getSupplier$2:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$getSupplier_static$3:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()Ljava/lang/Object; + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$static$1:()Ljava/lang/Integer; + #x ()Ljava/lang/Integer; +NestMembers: + com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo.class + Compiled from "TinyFrameworkMethodCallReplace.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 4, attributes: 4 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static void startThread(java.lang.Thread); + descriptor: (Ljava/lang/Thread;)V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo + x: ldc #x // String startThread + x: ldc #x // String (Ljava/lang/Thread;)V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: iconst_1 + x: invokevirtual #x // Method java/lang/Thread.setDaemon:(Z)V + x: aload_0 + x: invokevirtual #x // Method java/lang/Thread.start:()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 10 0 thread Ljava/lang/Thread; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int add(int, int); + descriptor: (II)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo + x: ldc #x // String add + x: ldc #x // String (II)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iload_0 + x: iload_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 4 0 a I + 11 4 1 b I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // ReplaceTo=class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo of class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace +SourceFile: "TinyFrameworkMethodCallReplace.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.class + Compiled from "TinyFrameworkMethodCallReplace.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 5, attributes: 6 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static boolean nonStaticMethodCallReplaceTester() throws java.lang.Exception; + descriptor: ()Z + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=2, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace + x: ldc #x // String nonStaticMethodCallReplaceTester + x: ldc #x // String ()Z + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: new #x // class java/util/concurrent/atomic/AtomicBoolean + x: dup + x: iconst_0 + x: invokespecial #x // Method java/util/concurrent/atomic/AtomicBoolean."":(Z)V + x: astore_0 + x: new #x // class java/lang/Thread + x: dup + x: aload_0 + x: invokedynamic #x, 0 // InvokeDynamic #x:run:(Ljava/util/concurrent/atomic/AtomicBoolean;)Ljava/lang/Runnable; + x: invokespecial #x // Method java/lang/Thread."":(Ljava/lang/Runnable;)V + x: astore_1 + x: aload_1 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo.startThread:(Ljava/lang/Thread;)V + x: aload_1 + x: invokevirtual #x // Method java/lang/Thread.join:()V + x: aload_0 + x: invokevirtual #x // Method java/util/concurrent/atomic/AtomicBoolean.get:()Z + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 20 27 0 ab Ljava/util/concurrent/atomic/AtomicBoolean; + 34 13 1 th Ljava/lang/Thread; + Exceptions: + throws java.lang.Exception + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int staticMethodCallReplaceTester(); + descriptor: ()I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace + x: ldc #x // String staticMethodCallReplaceTester + x: ldc #x // String ()I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_1 + x: iconst_2 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo.add:(II)I + x: ireturn + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static void lambda$nonStaticMethodCallReplaceTester$0(java.util.concurrent.atomic.AtomicBoolean); + descriptor: (Ljava/util/concurrent/atomic/AtomicBoolean;)V + flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace + x: ldc #x // String lambda$nonStaticMethodCallReplaceTester$0 + x: ldc #x // String (Ljava/util/concurrent/atomic/AtomicBoolean;)V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokestatic #x // Method java/lang/Thread.currentThread:()Ljava/lang/Thread; + x: invokevirtual #x // Method java/lang/Thread.isDaemon:()Z + x: invokevirtual #x // Method java/util/concurrent/atomic/AtomicBoolean.set:(Z)V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 11 0 ab Ljava/util/concurrent/atomic/AtomicBoolean; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // ReplaceTo=class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo of class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace + public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles +SourceFile: "TinyFrameworkMethodCallReplace.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +BootstrapMethods: + x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; + Method arguments: + #x ()V + #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.lambda$nonStaticMethodCallReplaceTester$0:(Ljava/util/concurrent/atomic/AtomicBoolean;)V + #x ()V +NestMembers: + com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.class + Compiled from "TinyFrameworkNative.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 15, attributes: 3 + int value; + descriptor: I + flags: (0x0000) + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNative(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int nativeAddTwo(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative + x: ldc #x // String nativeAddTwo + x: ldc #x // String (I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iload_0 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeAddTwo:(I)I + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect + + public static int nativeAddTwo_should_be_like_this(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative + x: ldc #x // String nativeAddTwo_should_be_like_this + x: ldc #x // String (I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iload_0 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeAddTwo:(I)I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 arg I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static long nativeLongPlus(long, long); + descriptor: (JJ)J + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=4, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative + x: ldc #x // String nativeLongPlus + x: ldc #x // String (JJ)J + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: lload_0 + x: lload_2 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeLongPlus:(JJ)J + x: lreturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect + + public static long nativeLongPlus_should_be_like_this(long, long); + descriptor: (JJ)J + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=4, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative + x: ldc #x // String nativeLongPlus_should_be_like_this + x: ldc #x // String (JJ)J + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: lload_0 + x: lload_2 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeLongPlus:(JJ)J + x: lreturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 6 0 arg1 J + 11 6 2 arg2 J + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public void setValue(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative + x: ldc #x // String setValue + x: ldc #x // String (I)V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: iload_1 + x: putfield #x // Field value:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; + 11 6 1 v I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int nativeNonStaticAddToValue(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative + x: ldc #x // String nativeNonStaticAddToValue + x: ldc #x // String (I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: iload_1 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeNonStaticAddToValue:(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect + + public int nativeNonStaticAddToValue_should_be_like_this(int); + descriptor: (I)I + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative + x: ldc #x // String nativeNonStaticAddToValue_should_be_like_this + x: ldc #x // String (I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: iload_1 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeNonStaticAddToValue:(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; + 11 6 1 arg I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static void nativeStillNotSupported(); + descriptor: ()V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative + x: ldc #x // String nativeStillNotSupported + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onThrowMethodCalled:()V + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String Unreachable + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestThrow + + public static native void nativeStillKeep(); + descriptor: ()V + flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static void nativeStillNotSupported_should_be_like_this(); + descriptor: ()V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative + x: ldc #x // String nativeStillNotSupported_should_be_like_this + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: new #x // class java/lang/RuntimeException + x: dup + x: invokespecial #x // Method java/lang/RuntimeException."":()V + x: athrow + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static byte nativeBytePlus(byte, byte); + descriptor: (BB)B + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative + x: ldc #x // String nativeBytePlus + x: ldc #x // String (BB)B + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iload_0 + x: iload_1 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeBytePlus:(BB)B + x: ireturn + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect + + public void notNativeRedirected(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative + x: ldc #x // String notNativeRedirected + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.notNativeRedirected:(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;)V + x: return + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect + + public static void notNativeStaticRedirected(); + descriptor: ()V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative + x: ldc #x // String notNativeStaticRedirected + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.notNativeStaticRedirected:()V + x: return + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestRedirect +} +SourceFile: "TinyFrameworkNative.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep + x: #x(#x=s#x) + android.hosttest.annotation.HostSideTestRedirectionClass( + value="TinyFrameworkNative_host" + ) +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.class + Compiled from "TinyFrameworkNative_host.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 8, attributes: 3 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int nativeAddTwo(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host + x: ldc #x // String nativeAddTwo + x: ldc #x // String (I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iload_0 + x: iconst_2 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 4 0 arg I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static long nativeLongPlus(long, long); + descriptor: (JJ)J + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=4, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host + x: ldc #x // String nativeLongPlus + x: ldc #x // String (JJ)J + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: lload_0 + x: lload_2 + x: ladd + x: lreturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 4 0 arg1 J + 11 4 2 arg2 J + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int nativeNonStaticAddToValue(com.android.hoststubgen.test.tinyframework.TinyFrameworkNative, int); + descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host + x: ldc #x // String nativeNonStaticAddToValue + x: ldc #x // String (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: getfield #x // Field com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.value:I + x: iload_1 + x: iadd + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 7 0 source Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; + 11 7 1 arg I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static byte nativeBytePlus(byte, byte); + descriptor: (BB)B + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host + x: ldc #x // String nativeBytePlus + x: ldc #x // String (BB)B + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iload_0 + x: iload_1 + x: iadd + x: i2b + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 arg1 B + 11 5 1 arg2 B + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static void notNativeRedirected(com.android.hoststubgen.test.tinyframework.TinyFrameworkNative); + descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;)V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host + x: ldc #x // String notNativeRedirected + x: ldc #x // String (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;)V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 1 0 source Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static void notNativeStaticRedirected(); + descriptor: ()V + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host + x: ldc #x // String notNativeStaticRedirected + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "TinyFrameworkNative_host.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1.class + Compiled from "TinyFrameworkNestedClasses.java" +class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$1 extends java.lang.Object implements java.util.function.Supplier + minor version: 0 + major version: 61 + flags: (0x0020) ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 + super_class: #x // java/lang/Object + interfaces: 1, fields: 1, methods: 4, attributes: 6 + final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$1(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); + descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + flags: (0x0000) + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 + x: ldc #x // String + x: ldc #x // String (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: aload_1 + x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; + 11 10 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + MethodParameters: + Name Flags + final mandated + + public java.lang.Integer get(); + descriptor: ()Ljava/lang/Integer; + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 + x: ldc #x // String get + x: ldc #x // String ()Ljava/lang/Integer; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_1 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.Object get(); + descriptor: ()Ljava/lang/Object; + flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 + x: ldc #x // String get + x: ldc #x // String ()Ljava/lang/Object; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokevirtual #x // Method get:()Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 +EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses +Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2.class + Compiled from "TinyFrameworkNestedClasses.java" +class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2 extends java.lang.Object implements java.util.function.Supplier + minor version: 0 + major version: 61 + flags: (0x0020) ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 4, attributes: 6 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2(); + descriptor: ()V + flags: (0x0000) + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.Integer get(); + descriptor: ()Ljava/lang/Integer; + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 + x: ldc #x // String get + x: ldc #x // String ()Ljava/lang/Integer; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_2 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.Object get(); + descriptor: ()Ljava/lang/Object; + flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 + x: ldc #x // String get + x: ldc #x // String ()Ljava/lang/Object; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokevirtual #x // Method get:()Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 +EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses +Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3.class + Compiled from "TinyFrameworkNestedClasses.java" +class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$3 extends java.lang.Object implements java.util.function.Supplier + minor version: 0 + major version: 61 + flags: (0x0020) ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 + super_class: #x // java/lang/Object + interfaces: 1, fields: 1, methods: 4, attributes: 6 + final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$3(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); + descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + flags: (0x0000) + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 + x: ldc #x // String + x: ldc #x // String (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: aload_1 + x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; + 11 10 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + MethodParameters: + Name Flags + final mandated + + public java.lang.Integer get(); + descriptor: ()Ljava/lang/Integer; + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 + x: ldc #x // String get + x: ldc #x // String ()Ljava/lang/Integer; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_3 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.Object get(); + descriptor: ()Ljava/lang/Object; + flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 + x: ldc #x // String get + x: ldc #x // String ()Ljava/lang/Object; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokevirtual #x // Method get:()Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 +EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses.getSupplier +Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4.class + Compiled from "TinyFrameworkNestedClasses.java" +class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4 extends java.lang.Object implements java.util.function.Supplier + minor version: 0 + major version: 61 + flags: (0x0020) ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 4, attributes: 6 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4(); + descriptor: ()V + flags: (0x0000) + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.Integer get(); + descriptor: ()Ljava/lang/Integer; + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 + x: ldc #x // String get + x: ldc #x // String ()Ljava/lang/Integer; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: iconst_4 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.Object get(); + descriptor: ()Ljava/lang/Object; + flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 + x: ldc #x // String get + x: ldc #x // String ()Ljava/lang/Object; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokevirtual #x // Method get:()Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 +EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses.getSupplier_static +Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 2, attributes: 4 + public int value; + descriptor: I + flags: (0x0001) ACC_PUBLIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass + x: ldc #x // String + x: ldc #x // String (I)V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iload_1 + x: putfield #x // Field value:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass; + 11 10 1 x I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$InnerClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 2, attributes: 4 + public int value; + descriptor: I + flags: (0x0001) ACC_PUBLIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; + descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$InnerClass(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); + descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass + x: ldc #x // String + x: ldc #x // String (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: aload_1 + x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iconst_5 + x: putfield #x // Field value:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 15 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass; + 11 15 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + MethodParameters: + Name Flags + final mandated +} +InnerClasses: + public #x= #x of #x; // InnerClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1.class + Compiled from "TinyFrameworkNestedClasses.java" +class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$1 extends java.lang.Object implements java.util.function.Supplier + minor version: 0 + major version: 61 + flags: (0x0020) ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 4, attributes: 6 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$1(); + descriptor: ()V + flags: (0x0000) + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.Integer get(); + descriptor: ()Ljava/lang/Integer; + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 + x: ldc #x // String get + x: ldc #x // String ()Ljava/lang/Integer; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: bipush 7 + x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.lang.Object get(); + descriptor: ()Ljava/lang/Object; + flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 + x: ldc #x // String get + x: ldc #x // String ()Ljava/lang/Object; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokevirtual #x // Method get:()Ljava/lang/Integer; + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 +EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass.getSupplier_static +Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 2, attributes: 4 + public int value; + descriptor: I + flags: (0x0001) ACC_PUBLIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: bipush 8 + x: putfield #x // Field value:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 11 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 3, attributes: 4 + public int value; + descriptor: I + flags: (0x0001) ACC_PUBLIC + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: bipush 6 + x: putfield #x // Field value:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 11 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static java.util.function.Supplier getSupplier_static(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass + x: ldc #x // String getSupplier_static + x: ldc #x // String ()Ljava/util/function/Supplier; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 + x: dup + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1."":()V + x: areturn + LineNumberTable: + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 + public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$SubClass extends com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass + super_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass + interfaces: 0, fields: 0, methods: 2, attributes: 4 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$SubClass(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass + x: ldc #x // String + x: ldc #x // String (I)V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: iload_1 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass."":(I)V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass; + 11 6 1 x I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public static #x= #x of #x; // SubClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses.class + Compiled from "TinyFrameworkNestedClasses.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + super_class: #x // java/lang/Object + interfaces: 0, fields: 2, methods: 4, attributes: 5 + public final java.util.function.Supplier mSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0011) ACC_PUBLIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static final java.util.function.Supplier sSupplier; + descriptor: Ljava/util/function/Supplier; + flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL + Signature: #x // Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 + x: dup + x: aload_0 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1."":(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 17 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public java.util.function.Supplier getSupplier(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + x: ldc #x // String getSupplier + x: ldc #x // String ()Ljava/util/function/Supplier; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 + x: dup + x: aload_0 + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3."":(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V + x: areturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 9 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static java.util.function.Supplier getSupplier_static(); + descriptor: ()Ljava/util/function/Supplier; + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + x: ldc #x // String getSupplier_static + x: ldc #x // String ()Ljava/util/function/Supplier; + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 + x: dup + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4."":()V + x: areturn + LineNumberTable: + Signature: #x // ()Ljava/util/function/Supplier; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + static {}; + descriptor: ()V + flags: (0x0008) ACC_STATIC + Code: + stack=4, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 + x: dup + x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2."":()V + x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; + x: return + LineNumberTable: + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +InnerClasses: + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 + public static #x= #x of #x; // SubClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public #x= #x of #x; // InnerClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses + public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass + #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 +SourceFile: "TinyFrameworkNestedClasses.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +NestMembers: + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 + com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect.class + Compiled from "TinyFrameworkPackageRedirect.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedirect + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 3, attributes: 3 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedirect(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int foo(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect + x: ldc #x // String foo + x: ldc #x // String (I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: new #x // class com/supported/UnsupportedClass + x: dup + x: iload_0 + x: invokespecial #x // Method com/supported/UnsupportedClass."":(I)V + x: invokevirtual #x // Method com/supported/UnsupportedClass.getValue:()I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 12 0 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "TinyFrameworkPackageRedirect.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.class + Compiled from "TinyFrameworkRenamedClassCaller.java" +public class com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 3, attributes: 3 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller(); + descriptor: ()V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller + x: ldc #x // String + x: ldc #x // String ()V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public static int foo(int); + descriptor: (I)I + flags: (0x0009) ACC_PUBLIC, ACC_STATIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller + x: ldc #x // String foo + x: ldc #x // String (I)I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: new #x // class rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed + x: dup + x: iload_0 + x: invokespecial #x // Method rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed."":(I)V + x: invokevirtual #x // Method rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.getValue:()I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 12 0 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "TinyFrameworkRenamedClassCaller.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/android/hoststubgen/test/tinyframework/packagetest/A.class + Compiled from "A.java" +public class com.android.hoststubgen.test.tinyframework.packagetest.A + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/A + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/packagetest/A + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "A.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/packagetest/sub/A.class + Compiled from "A.java" +public class com.android.hoststubgen.test.tinyframework.packagetest.sub.A + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/sub/A + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/packagetest/sub/A + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "A.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C1.class + Compiled from "C1.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.C1 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/C1 + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "C1.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C2.class + Compiled from "C2.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.C2 extends com.android.hoststubgen.test.tinyframework.subclasstest.C1 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 + interfaces: 0, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/C2 + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "C2.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C3.class + Compiled from "C3.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.C3 extends com.android.hoststubgen.test.tinyframework.subclasstest.C2 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3 + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 + interfaces: 0, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/C3 + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "C3.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/CA.class + Compiled from "CA.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.CA + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CA + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/CA + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "CA.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/CB.class + Compiled from "CB.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.CB + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CB + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/CB + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "CB.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1.class + Compiled from "Class_C1.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C1 extends com.android.hoststubgen.test.tinyframework.subclasstest.C1 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1 + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 + interfaces: 0, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1 + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "Class_C1.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2.class + Compiled from "Class_C2.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C2 extends com.android.hoststubgen.test.tinyframework.subclasstest.C2 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2 + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 + interfaces: 0, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2 + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "Class_C2.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3.class + Compiled from "Class_C3.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C3 extends com.android.hoststubgen.test.tinyframework.subclasstest.C3 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3 + super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3 + interfaces: 0, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3 + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "Class_C3.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1.class + Compiled from "Class_I1.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1 implements com.android.hoststubgen.test.tinyframework.subclasstest.I1 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1 + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "Class_I1.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA.class + Compiled from "Class_I1_IA.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1_IA implements com.android.hoststubgen.test.tinyframework.subclasstest.I1,com.android.hoststubgen.test.tinyframework.subclasstest.IA + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA + super_class: #x // java/lang/Object + interfaces: 2, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "Class_I1_IA.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2.class + Compiled from "Class_I2.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I2 implements com.android.hoststubgen.test.tinyframework.subclasstest.I2 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2 + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "Class_I2.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3.class + Compiled from "Class_I3.java" +public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3 implements com.android.hoststubgen.test.tinyframework.subclasstest.I3 + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3 + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "Class_I3.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I1.class + Compiled from "I1.java" +public interface com.android.hoststubgen.test.tinyframework.subclasstest.I1 + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I1 + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/I1 + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "I1.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I2.class + Compiled from "I2.java" +public interface com.android.hoststubgen.test.tinyframework.subclasstest.I2 extends com.android.hoststubgen.test.tinyframework.subclasstest.I1 + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I2 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/I2 + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "I2.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I3.class + Compiled from "I3.java" +public interface com.android.hoststubgen.test.tinyframework.subclasstest.I3 extends com.android.hoststubgen.test.tinyframework.subclasstest.I2 + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I3 + super_class: #x // java/lang/Object + interfaces: 1, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/I3 + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "I3.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/IA.class + Compiled from "IA.java" +public interface com.android.hoststubgen.test.tinyframework.subclasstest.IA + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IA + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/IA + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "IA.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/android/hoststubgen/test/tinyframework/subclasstest/IB.class + Compiled from "IB.java" +public interface com.android.hoststubgen.test.tinyframework.subclasstest.IB + minor version: 0 + major version: 61 + flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT + this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IB + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 1, attributes: 2 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/IB + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return +} +SourceFile: "IB.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +## Class: com/supported/UnsupportedClass.class + Compiled from "UnsupportedClass.java" +public class com.supported.UnsupportedClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/supported/UnsupportedClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 3, attributes: 3 + private final int mValue; + descriptor: I + flags: (0x0012) ACC_PRIVATE, ACC_FINAL + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/supported/UnsupportedClass + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.supported.UnsupportedClass(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/supported/UnsupportedClass + x: ldc #x // String + x: ldc #x // String (I)V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iload_1 + x: putfield #x // Field mValue:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 10 0 this Lcom/supported/UnsupportedClass; + 11 10 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int getValue(); + descriptor: ()I + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/supported/UnsupportedClass + x: ldc #x // String getValue + x: ldc #x // String ()I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: getfield #x // Field mValue:I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/supported/UnsupportedClass; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "UnsupportedClass.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: com/unsupported/UnsupportedClass.class + Compiled from "UnsupportedClass.java" +public class com.unsupported.UnsupportedClass + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // com/unsupported/UnsupportedClass + super_class: #x // java/lang/Object + interfaces: 0, fields: 0, methods: 3, attributes: 3 + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/unsupported/UnsupportedClass + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public com.unsupported.UnsupportedClass(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/unsupported/UnsupportedClass + x: ldc #x // String + x: ldc #x // String (I)V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String This class is not supported + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 14 0 this Lcom/unsupported/UnsupportedClass; + 11 14 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int getValue(); + descriptor: ()I + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/unsupported/UnsupportedClass + x: ldc #x // String getValue + x: ldc #x // String ()I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: new #x // class java/lang/RuntimeException + x: dup + x: ldc #x // String This class is not supported + x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V + x: athrow + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 10 0 this Lcom/unsupported/UnsupportedClass; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "UnsupportedClass.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep +## Class: rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.class + Compiled from "TinyFrameworkToBeRenamed.java" +public class rename_prefix.com.android.hoststubgen.test.tinyframework.TinyFrameworkToBeRenamed + minor version: 0 + major version: 61 + flags: (0x0021) ACC_PUBLIC, ACC_SUPER + this_class: #x // rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed + super_class: #x // java/lang/Object + interfaces: 0, fields: 1, methods: 3, attributes: 3 + private final int mValue; + descriptor: I + flags: (0x0012) ACC_PRIVATE, ACC_FINAL + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + private static {}; + descriptor: ()V + flags: (0x000a) ACC_PRIVATE, ACC_STATIC + Code: + stack=2, locals=0, args_size=0 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V + x: return + + public rename_prefix.com.android.hoststubgen.test.tinyframework.TinyFrameworkToBeRenamed(int); + descriptor: (I)V + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=2, args_size=2 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed + x: ldc #x // String + x: ldc #x // String (I)V + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: invokespecial #x // Method java/lang/Object."":()V + x: aload_0 + x: iload_1 + x: putfield #x // Field mValue:I + x: return + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed; + 11 10 1 value I + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep + + public int getValue(); + descriptor: ()I + flags: (0x0001) ACC_PUBLIC + Code: + stack=4, locals=1, args_size=1 + x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed + x: ldc #x // String getValue + x: ldc #x // String ()I + x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall + x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V + x: aload_0 + x: getfield #x // Field mValue:I + x: ireturn + LineNumberTable: + LocalVariableTable: + Start Length Slot Name Signature + 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed; + RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +} +SourceFile: "TinyFrameworkToBeRenamed.java" +RuntimeVisibleAnnotations: + x: #x() + com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep +RuntimeInvisibleAnnotations: + x: #x() + android.hosttest.annotation.HostSideTestWholeClassKeep diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/policy-override-tiny-framework.txt b/ravenwood/tools/hoststubgen/test-tiny-framework/policy-override-tiny-framework.txt new file mode 100644 index 000000000000..3c138d21b75d --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/policy-override-tiny-framework.txt @@ -0,0 +1,75 @@ +class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy keep + field stub keep + # field remove remove # Implicitly remove + method ()V keep + method addOne (I)I keep + method addOneInner (I)I keep + method toBeRemoved (Ljava/lang/String;)V remove + method addTwo (I)I @addTwo_host + # method addTwo_host (I)I # used as a substitute + method nativeAddThree (I)I @addThree_host + # method addThree_host (I)I # used as a substitute + method unsupportedMethod ()Ljava/lang/String; throw + method visibleButUsesUnsupportedMethod ()Ljava/lang/String; keep + method toBeIgnoredObj ()Ljava/lang/String; ignore + method toBeIgnoredV ()V ignore + method toBeIgnoredZ ()Z ignore + method toBeIgnoredB ()B ignore + method toBeIgnoredC ()C ignore + method toBeIgnoredS ()S ignore + method toBeIgnoredI ()I ignore + method toBeIgnoredL ()L ignore + method toBeIgnoredF ()F ignore + method toBeIgnoredD ()D ignore + +# Class load hook +class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy ~com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded + +# Heuristics rule: Stub all the AIDL classes. +class :aidl keepclass + +# Heuristics rule: Stub all the R classes. +class :r keepclass + +# Default is "remove", so let's put all the base classes / interfaces in the stub first. +class com.android.hoststubgen.test.tinyframework.subclasstest.C1 keep +class com.android.hoststubgen.test.tinyframework.subclasstest.C2 keep +class com.android.hoststubgen.test.tinyframework.subclasstest.C3 keep +class com.android.hoststubgen.test.tinyframework.subclasstest.CA keep +class com.android.hoststubgen.test.tinyframework.subclasstest.CB keep +class com.android.hoststubgen.test.tinyframework.subclasstest.I1 keep +class com.android.hoststubgen.test.tinyframework.subclasstest.I2 keep +class com.android.hoststubgen.test.tinyframework.subclasstest.I3 keep +class com.android.hoststubgen.test.tinyframework.subclasstest.IA keep +class com.android.hoststubgen.test.tinyframework.subclasstest.IB keep + +# Then define inheritance based policies. +class *com.android.hoststubgen.test.tinyframework.subclasstest.C1 keep +class *com.android.hoststubgen.test.tinyframework.subclasstest.CA remove + +class *com.android.hoststubgen.test.tinyframework.subclasstest.I1 keep +class *com.android.hoststubgen.test.tinyframework.subclasstest.IA remove + +# Test package directive +package com.android.hoststubgen.test.tinyframework.packagetest keep +class com.android.hoststubgen.test.tinyframework.packagetest.B remove +class com.android.hoststubgen.test.tinyframework.packagetest.sub.B remove +# The following rules are the same as above +# class com.android.hoststubgen.test.tinyframework.packagetest.A keep +# class com.android.hoststubgen.test.tinyframework.packagetest.sub.A keep + +# Used to test method call replacement. +class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace keepclass + method originalAdd (II)I @com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo.add + +# Used to test method call replacement. +# Note because java.lang.Thread is _not_ within the tiny-framework jar, the policy ("keep") +# doesn't realy matter. +class java.lang.Thread keep + method start ()V @com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo.startThread + + +# "rename" takes a type internal name, so '/'s is used as a separator. +# The leading / in the prefix is not needed (it'll be stripped), but it's added to make +# sure the stripping works. +rename ^.*/TinyFrameworkToBeRenamed$ /rename_prefix/ diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/run-test-manually.sh b/ravenwood/tools/hoststubgen/test-tiny-framework/run-test-manually.sh new file mode 100755 index 000000000000..80ebf3adab3d --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/run-test-manually.sh @@ -0,0 +1,130 @@ +#!/bin/bash +# Copyright (C) 2023 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +source "${0%/*}"/../../common.sh + +# This scripts run the "tiny-framework" test, but does most stuff from the command line, using +# the native java and javac commands. + +debug=0 +while getopts "d" opt; do +case "$opt" in + d) debug=1 ;; +esac +done +shift $(($OPTIND - 1)) + + +out=out + +rm -fr $out +mkdir -p $out + +HOSTSTUBGEN=hoststubgen + +# Rebuild the tool and the dependencies. These are the only things we build with the build system. +run m $HOSTSTUBGEN hoststubgen-annotations hoststubgen-helper-runtime truth junit + + +# Build tiny-framework + +tiny_framework_classes=$out/tiny-framework/classes/ +tiny_framework_jar=$out/tiny-framework.jar +tiny_framework_host_jar=$out/tiny-framework_host.jar + +tiny_test_classes=$out/tiny-test/classes/ +tiny_test_jar=$out/tiny-test.jar + +framework_compile_classpaths=( + $SOONG_INT/frameworks/base/tools/hoststubgen/hoststubgen/hoststubgen-annotations/android_common/javac/hoststubgen-annotations.jar +) + +test_compile_classpaths=( + $SOONG_INT/external/junit/junit/android_common/combined/junit.jar + $SOONG_INT/external/truth/truth/android_common/combined/truth.jar +) + +test_runtime_classpaths=( + $SOONG_INT/frameworks/base/tools/hoststubgen/hoststubgen/hoststubgen-helper-runtime/linux_glibc_common/javac/hoststubgen-helper-runtime.jar +) + +# This suite runs all tests in the JAR. +test_classes=(com.android.hoststubgen.hosthelper.HostTestSuite) + +# Uncomment this to run a specific test. +# tests=(com.android.hoststubgen.test.tinyframework.TinyFrameworkBenchmark) + + +# Build tiny-framework.jar +echo "# Building tiny-framework..." +run $JAVAC \ + -cp $( \ + join : \ + ${framework_compile_classpaths[@]} \ + ) \ + -d $tiny_framework_classes \ + tiny-framework/src/**/*.java + +run $JAR cvf $tiny_framework_jar \ + -C $tiny_framework_classes . + +# Build stub/impl jars +echo "# Generating the stub and impl jars..." +run $HOSTSTUBGEN \ + @../hoststubgen-standard-options.txt \ + --in-jar $tiny_framework_jar \ + --out-jar $tiny_framework_host_jar \ + --policy-override-file policy-override-tiny-framework.txt \ + --gen-keep-all-file out/tiny-framework_keep_all.txt \ + --gen-input-dump-file out/tiny-framework_dump.txt \ + --package-redirect com.unsupported:com.supported \ + --annotation-allowed-classes-file annotation-allowed-classes-tiny-framework.txt \ + $HOSTSTUBGEN_OPTS + +# Extract the jar files, so we can look into them. +extract $tiny_framework_host_jar + +# Build the test +echo "# Building tiny-test..." +run $JAVAC \ + -cp $( \ + join : \ + $tiny_framework_jar \ + "${test_compile_classpaths[@]}" \ + ) \ + -d $tiny_test_classes \ + tiny-test/src/**/*.java + +run $JAR cvf $tiny_test_jar \ + -C $tiny_test_classes . + +if (( $debug )) ; then + JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8700" +fi + +# Run the test +echo "# Running tiny-test..." +run $JAVA \ + $JAVA_OPTS \ + -cp $( \ + join : \ + $tiny_test_jar \ + $tiny_framework_host_jar \ + "${test_compile_classpaths[@]}" \ + "${test_runtime_classpaths[@]}" \ + ) \ + org.junit.runner.JUnitCore \ + ${test_classes[@]} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework-dump-test.py b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework-dump-test.py new file mode 100755 index 000000000000..cee29dcd1d59 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework-dump-test.py @@ -0,0 +1,64 @@ +#!/usr/bin/python3 +# Copyright (C) 2023 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Compare the tiny-framework JAR dumps to the golden files. + +import sys +import os +import unittest +import subprocess + +GOLDEN_DIR = 'golden-output' + +# Run diff. +def run_diff(file1, file2): + command = ['diff', '-u', '--ignore-blank-lines', '--ignore-space-change', file1, file2] + print(' '.join(command)) + result = subprocess.run(command, stderr = sys.stdout) + + success = result.returncode == 0 + + if success: + print(f'No diff found.') + else: + print(f'Fail: {file1} and {file2} are different.') + + return success + + +# Check one golden file. +def check_one_file(filename): + print(f'= Checking file: {filename}') + return run_diff(os.path.join(GOLDEN_DIR, filename), filename) + +class TestWithGoldenOutput(unittest.TestCase): + + # Test to check the generated jar files to the golden output. + def test_compare_to_golden(self): + files = os.listdir(GOLDEN_DIR) + files.sort() + + print(f"Golden files: {files}") + success = True + + for file in files: + if not check_one_file(file): + success = False + + if not success: + self.fail('Some files are different. See stdout log for more details.') + +if __name__ == "__main__": + unittest.main(verbosity=2) diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/IPretendingAidl.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/IPretendingAidl.java new file mode 100644 index 000000000000..0a07c2b91fc3 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/IPretendingAidl.java @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +/** + * An interface that matches the "AIDL detection heuristics' logic. + * + * The "class :aidl" line in the text policy file will control the visibility of it. + */ +public interface IPretendingAidl { + public static class Stub { + public static int addOne(int a) { + return a + 1; + } + + public static class Proxy { + public static int addTwo(int a) { + return a + 2; + } + } + } + +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/R.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/R.java new file mode 100644 index 000000000000..b1bedf4b6853 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/R.java @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +public class R { + public static class Nested { + public static int[] ARRAY = new int[] {1}; + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.java new file mode 100644 index 000000000000..3415deb957ed --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.java @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import android.hosttest.annotation.HostSideTestClassLoadHook; +import android.hosttest.annotation.HostSideTestIgnore; +import android.hosttest.annotation.HostSideTestKeep; +import android.hosttest.annotation.HostSideTestRemove; +import android.hosttest.annotation.HostSideTestSubstitute; +import android.hosttest.annotation.HostSideTestThrow; + +/** + * Test without class-wide annotations. + */ +@HostSideTestKeep +@HostSideTestClassLoadHook( + "com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded") +public class TinyFrameworkAnnotations { + @HostSideTestKeep + public TinyFrameworkAnnotations() { + } + + @HostSideTestKeep + public int keep = 1; + + // Members will be deleted by default. + // Deleted fields cannot have an initial value, because otherwise .ctor will fail to set it at + // runtime. + public int remove; + + @HostSideTestKeep + public int addOne(int value) { + return value + 1; + } + + @HostSideTestRemove // Explicitly remove + public void toBeRemoved(String foo) { + throw new RuntimeException(); + } + + @HostSideTestSubstitute(suffix = "_host") + public int addTwo(int value) { + throw new RuntimeException("not supported on host side"); + } + + public int addTwo_host(int value) { + return value + 2; + } + + @HostSideTestSubstitute(suffix = "_host") + public static native int nativeAddThree(int value); + + // This method is private, but at runtime, it'll inherit the visibility of the original method + private static int nativeAddThree_host(int value) { + return value + 3; + } + + @HostSideTestThrow + public String unsupportedMethod() { + return "This value shouldn't be seen on the host side."; + } + + @HostSideTestIgnore + public int toBeIgnored() { + throw new RuntimeException("not supported on host side"); + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook.java new file mode 100644 index 000000000000..f734790c8dd9 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import android.hosttest.annotation.HostSideTestWholeClassKeep; + +import java.util.HashSet; +import java.util.Set; + +@HostSideTestWholeClassKeep +public class TinyFrameworkClassLoadHook { + private TinyFrameworkClassLoadHook() { + } + + public static final Set> sLoadedClasses = new HashSet<>(); + + public static void onClassLoaded(Class clazz) { + sLoadedClasses.add(clazz); + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations.java new file mode 100644 index 000000000000..e83163edb5e5 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import android.hosttest.annotation.HostSideTestRemove; +import android.hosttest.annotation.HostSideTestSubstitute; +import android.hosttest.annotation.HostSideTestThrow; +import android.hosttest.annotation.HostSideTestWholeClassKeep; + +@HostSideTestWholeClassKeep +public class TinyFrameworkClassWideAnnotations { + public TinyFrameworkClassWideAnnotations() { + } + + public int keep = 1; + + @HostSideTestRemove + public int remove; + + public int addOne(int value) { + return value + 1; + } + + @HostSideTestSubstitute(suffix = "_host") + public int addTwo(int value) { + throw new RuntimeException("not supported on host side"); + } + + public int addTwo_host(int value) { + return value + 2; + } + + @HostSideTestRemove + public void toBeRemoved(String foo) { + throw new RuntimeException(); + } + + @HostSideTestThrow + public String unsupportedMethod() { + return "This value shouldn't be seen on the host side."; + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault.java new file mode 100644 index 000000000000..3df21d9a5647 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import android.hosttest.annotation.HostSideTestKeep; + +@HostSideTestKeep +public class TinyFrameworkClassWithInitializerDefault { + static { + sInitialized = true; + } + + @HostSideTestKeep + public static boolean sInitialized; + @HostSideTestKeep + public static Object sObject = new Object(); +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub.java new file mode 100644 index 000000000000..cc665de9cd01 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import android.hosttest.annotation.HostSideTestClassLoadHook; +import android.hosttest.annotation.HostSideTestKeep; +import android.hosttest.annotation.HostSideTestStaticInitializerKeep; + +@HostSideTestClassLoadHook( + "com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded") +@HostSideTestKeep +@HostSideTestStaticInitializerKeep +public class TinyFrameworkClassWithInitializerStub { + static { + sInitialized = true; + } + + @HostSideTestKeep + public static boolean sInitialized; + @HostSideTestKeep + public static Object sObject = new Object(); +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex.java new file mode 100644 index 000000000000..f833ad814513 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex.java @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import android.hosttest.annotation.HostSideTestKeep; + +@HostSideTestKeep +public enum TinyFrameworkEnumComplex { + @HostSideTestKeep + RED("Red", "R"), + @HostSideTestKeep + GREEN("Green", "G"), + @HostSideTestKeep + BLUE("Blue", "B"); + + @HostSideTestKeep + private final String mLongName; + + @HostSideTestKeep + private final String mShortName; + + @HostSideTestKeep + TinyFrameworkEnumComplex(String longName, String shortName) { + mLongName = longName; + mShortName = shortName; + } + + @HostSideTestKeep + public String getLongName() { + return mLongName; + } + + @HostSideTestKeep + public String getShortName() { + return mShortName; + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple.java new file mode 100644 index 000000000000..c023169b5601 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import android.hosttest.annotation.HostSideTestKeep; + +@HostSideTestKeep +public enum TinyFrameworkEnumSimple { + @HostSideTestKeep + CAT, + @HostSideTestKeep + DOG, +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester.java new file mode 100644 index 000000000000..f7cae7d255fe --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import android.hosttest.annotation.HostSideTestWholeClassKeep; + +@HostSideTestWholeClassKeep +public class TinyFrameworkExceptionTester { + public static int testException() { + try { + throw new IllegalStateException("Inner exception"); + } catch (Exception e) { + throw new RuntimeException("Outer exception", e); + } + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy.java new file mode 100644 index 000000000000..ec1efba99c77 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy.java @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +/** + * Class for testing the "text policy" file. + */ +public class TinyFrameworkForTextPolicy { + public TinyFrameworkForTextPolicy() { + } + + public int stub = 1; + + // Removed fields cannot have an initial value, because otherwise .ctor will fail to set it at + // runtime. + public int remove; + + public int addOne(int value) { + return value + 1; + } + + public void toBeRemoved(String foo) { + throw new RuntimeException(); + } + + public String toBeIgnoredObj() { + throw new RuntimeException(); + } + + public void toBeIgnoredV() { + throw new RuntimeException(); + } + + public boolean toBeIgnoredZ() { + throw new RuntimeException(); + } + + public byte toBeIgnoredB() { + throw new RuntimeException(); + } + + public char toBeIgnoredC() { + throw new RuntimeException(); + } + + public short toBeIgnoredS() { + throw new RuntimeException(); + } + + public int toBeIgnoredI() { + throw new RuntimeException(); + } + + public float toBeIgnoredF() { + throw new RuntimeException(); + } + + public double toBeIgnoredD() { + throw new RuntimeException(); + } + + public int addTwo(int value) { + throw new RuntimeException("not supported on host side"); + } + + public int addTwo_host(int value) { + return value + 2; + } + + public static native int nativeAddThree(int value); + + public static int addThree_host(int value) { + return value + 3; + } + + public String unsupportedMethod() { + return "This value shouldn't be seen on the host side."; + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.java new file mode 100644 index 000000000000..1ca653ec7da6 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.java @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import android.hosttest.annotation.HostSideTestKeep; +import android.hosttest.annotation.HostSideTestStaticInitializerKeep; + +import java.util.function.Supplier; + + +/** + * In this class, we explicitly mark each member as "stub". (rather than using WholeClassStub) + * + * This means the actual generated lambda functions would be removed by default. + * + * Implicit filter should take care of them. + */ +@HostSideTestKeep +@HostSideTestStaticInitializerKeep +public class TinyFrameworkLambdas { + @HostSideTestKeep + public TinyFrameworkLambdas() { + } + + @HostSideTestKeep + public final Supplier mSupplier = () -> 1; + + @HostSideTestKeep + public static final Supplier sSupplier = () -> 2; + + @HostSideTestKeep + public Supplier getSupplier() { + return () -> 3; + } + + @HostSideTestKeep + public static Supplier getSupplier_static() { + return () -> 4; + } + + @HostSideTestKeep + @HostSideTestStaticInitializerKeep + public static class Nested { + @HostSideTestKeep + public Nested() { + } + + @HostSideTestKeep + public final Supplier mSupplier = () -> 5; + + @HostSideTestKeep + public static final Supplier sSupplier = () -> 6; + + @HostSideTestKeep + public Supplier getSupplier() { + return () -> 7; + } + + @HostSideTestKeep + public static Supplier getSupplier_static() { + return () -> 8; + } + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.java new file mode 100644 index 000000000000..57c69a336654 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.java @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import android.hosttest.annotation.HostSideTestWholeClassKeep; + +import java.util.concurrent.atomic.AtomicBoolean; + +@HostSideTestWholeClassKeep +public class TinyFrameworkMethodCallReplace { + // This method should return true. + public static boolean nonStaticMethodCallReplaceTester() throws Exception { + final AtomicBoolean ab = new AtomicBoolean(false); + + Thread th = new Thread(() -> { + ab.set(Thread.currentThread().isDaemon()); + }); + // This Thread.start() call will be redirected to ReplaceTo.startThread() + // (because of the policy file directive) which will make the thread "daemon" and start it. + th.start(); + th.join(); + + return ab.get(); // This should be true. + } + + public static int staticMethodCallReplaceTester() { + // This method call will be replaced with ReplaceTo.add(). + return originalAdd(1, 2); + } + + private static int originalAdd(int a, int b) { + return a + b - 1; // Original is broken. + } + + public static class ReplaceTo { + public static void startThread(Thread thread) { + thread.setDaemon(true); + thread.start(); + } + + public static int add(int a, int b) { + return a + b; + } + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.java new file mode 100644 index 000000000000..04a551c8c46e --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.java @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import android.hosttest.annotation.HostSideTestRedirect; +import android.hosttest.annotation.HostSideTestRedirectionClass; +import android.hosttest.annotation.HostSideTestThrow; +import android.hosttest.annotation.HostSideTestWholeClassKeep; + +@HostSideTestWholeClassKeep +@HostSideTestRedirectionClass("TinyFrameworkNative_host") +public class TinyFrameworkNative { + + @HostSideTestRedirect + public static native int nativeAddTwo(int arg); + + public static int nativeAddTwo_should_be_like_this(int arg) { + return TinyFrameworkNative_host.nativeAddTwo(arg); + } + + @HostSideTestRedirect + public static native long nativeLongPlus(long arg1, long arg2); + + public static long nativeLongPlus_should_be_like_this(long arg1, long arg2) { + return TinyFrameworkNative_host.nativeLongPlus(arg1, arg2); + } + + int value; + + public void setValue(int v) { + this.value = v; + } + + @HostSideTestRedirect + public native int nativeNonStaticAddToValue(int arg); + + public int nativeNonStaticAddToValue_should_be_like_this(int arg) { + return TinyFrameworkNative_host.nativeNonStaticAddToValue(this, arg); + } + + @HostSideTestThrow + public static native void nativeStillNotSupported(); + + public static native void nativeStillKeep(); + + public static void nativeStillNotSupported_should_be_like_this() { + throw new RuntimeException(); + } + + @HostSideTestRedirect + public static native byte nativeBytePlus(byte arg1, byte arg2); + + @HostSideTestRedirect + public void notNativeRedirected() { + throw new RuntimeException(); + } + + @HostSideTestRedirect + public static void notNativeStaticRedirected() { + throw new RuntimeException(); + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.java new file mode 100644 index 000000000000..c7a29a1cc0f9 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import android.hosttest.annotation.HostSideTestWholeClassKeep; + +@HostSideTestWholeClassKeep +public class TinyFrameworkNative_host { + public static int nativeAddTwo(int arg) { + return arg + 2; + } + + public static long nativeLongPlus(long arg1, long arg2) { + return arg1 + arg2; + } + + // Note, the method must be static even for a non-static native method, but instead it + // must take the "source" instance as the first argument. + public static int nativeNonStaticAddToValue(TinyFrameworkNative source, int arg) { + return source.value + arg; + } + + public static byte nativeBytePlus(byte arg1, byte arg2) { + return (byte) (arg1 + arg2); + } + + public static void notNativeRedirected(TinyFrameworkNative source) { + } + + public static void notNativeStaticRedirected() { + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses.java new file mode 100644 index 000000000000..c1ea2ee59fbb --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses.java @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import android.hosttest.annotation.HostSideTestWholeClassKeep; + +import java.util.function.Supplier; + +@HostSideTestWholeClassKeep +public class TinyFrameworkNestedClasses { + public final Supplier mSupplier = new Supplier() { + @Override + public Integer get() { + return 1; + } + }; + + public static final Supplier sSupplier = new Supplier() { + @Override + public Integer get() { + return 2; + } + }; + + public Supplier getSupplier() { + return new Supplier() { + @Override + public Integer get() { + return 3; + } + }; + } + + public static Supplier getSupplier_static() { + return new Supplier() { + @Override + public Integer get() { + return 4; + } + }; + } + + public class InnerClass { + public int value = 5; + } + + public static class StaticNestedClass { + public int value = 6; + + // Double-nest + public static Supplier getSupplier_static() { + return new Supplier() { + @Override + public Integer get() { + return 7; + } + }; + } + + public static class Double$NestedClass { + public int value = 8; + } + } + + public static class BaseClass { + public int value; + public BaseClass(int x) { + value = x; + } + } + + public static class SubClass extends BaseClass { + public SubClass(int x) { + super(x); + } + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect.java new file mode 100644 index 000000000000..941fcff31d8e --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import android.hosttest.annotation.HostSideTestWholeClassKeep; + +@HostSideTestWholeClassKeep +public class TinyFrameworkPackageRedirect { + /** + * A method that uses "unsupported" class. HostStubGen will redirect them to the "supported" + * one (because of --package-redirect), so this test will pass. + */ + public static int foo(int value) { + // This method throws, so it's not callable as-is. But HostStubGen + // will rewrite it, it will actually work. + return new com.unsupported.UnsupportedClass(value).getValue(); + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.java new file mode 100644 index 000000000000..707bc0ebb4db --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import android.hosttest.annotation.HostSideTestWholeClassKeep; + +@HostSideTestWholeClassKeep +public class TinyFrameworkRenamedClassCaller { + /** Calls the class that'll be renamed. */ + public static int foo(int value) { + // When TinyFrameworkToBeRenamed gets renamed, this callsite should be updated too, + // so this code should work as-is. + return new TinyFrameworkToBeRenamed(value).getValue(); + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.java new file mode 100644 index 000000000000..8319ced6109a --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import android.hosttest.annotation.HostSideTestWholeClassKeep; + +/** + * This class will be renamed by the "rename" directive in the policy file. + */ +@HostSideTestWholeClassKeep +public class TinyFrameworkToBeRenamed { + private final int mValue; + + public TinyFrameworkToBeRenamed(int value) { + mValue = value; + } + + public int getValue() { + return mValue; + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/A.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/A.java new file mode 100644 index 000000000000..6a52e4401b45 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/A.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.packagetest; + +public class A { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/B.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/B.java new file mode 100644 index 000000000000..1374a288f7aa --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/B.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.packagetest; + +public class B { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/sub/A.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/sub/A.java new file mode 100644 index 000000000000..361a7fd04842 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/sub/A.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.packagetest.sub; + +public class A { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/sub/B.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/sub/B.java new file mode 100644 index 000000000000..716595a44243 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/sub/B.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.packagetest.sub; + +public class B { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C1.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C1.java new file mode 100644 index 000000000000..03c9e2a7b5bb --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C1.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class C1 { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C2.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C2.java new file mode 100644 index 000000000000..3ca8f1f172bd --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C2.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class C2 extends C1 { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C3.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C3.java new file mode 100644 index 000000000000..a6c14f09b680 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C3.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class C3 extends C2 { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/CA.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/CA.java new file mode 100644 index 000000000000..2e353709fd1e --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/CA.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class CA { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/CB.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/CB.java new file mode 100644 index 000000000000..fe4cee64b2f9 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/CB.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class CB { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1.java new file mode 100644 index 000000000000..12012fcdf6ca --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class Class_C1 extends C1 { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2.java new file mode 100644 index 000000000000..8d48ee6f6858 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class Class_C2 extends C2 { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3.java new file mode 100644 index 000000000000..6748430a8e6f --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class Class_C3 extends C3 { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CA.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CA.java new file mode 100644 index 000000000000..58aa5c3b74eb --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CA.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class Class_CA extends CA { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB.java new file mode 100644 index 000000000000..c1c3d624b126 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class Class_CB extends CB { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB_IA.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB_IA.java new file mode 100644 index 000000000000..398b56975f1c --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB_IA.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class Class_CB_IA extends CB implements IA { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1.java new file mode 100644 index 000000000000..44cbd8f9bffa --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class Class_I1 implements I1 { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA.java new file mode 100644 index 000000000000..42355a34b65c --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class Class_I1_IA implements I1, IA { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2.java new file mode 100644 index 000000000000..09c80992e450 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class Class_I2 implements I2 { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3.java new file mode 100644 index 000000000000..0806a478d756 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class Class_I3 implements I3 { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3_IA.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3_IA.java new file mode 100644 index 000000000000..eaa8528a3f31 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3_IA.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class Class_I3_IA implements I3, IA { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA.java new file mode 100644 index 000000000000..778c5aaf27f0 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class Class_IA implements IA { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I1.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I1.java new file mode 100644 index 000000000000..493f7c83c0f0 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I1.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class Class_IA_I1 implements IA, I1 { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I3.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I3.java new file mode 100644 index 000000000000..2aa1de18b7f4 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I3.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class Class_IA_I3 implements IA, I3 { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB.java new file mode 100644 index 000000000000..d9eae0934c42 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class Class_IB implements IB { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB_IA.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB_IA.java new file mode 100644 index 000000000000..9ee42836ac9a --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB_IA.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class Class_IB_IA implements IB, IA { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_None.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_None.java new file mode 100644 index 000000000000..50ec2cbc9c6e --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_None.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public class Class_None { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I1.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I1.java new file mode 100644 index 000000000000..3f3659644a80 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I1.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public interface I1 { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I2.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I2.java new file mode 100644 index 000000000000..960060c8a036 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I2.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public interface I2 extends I1 { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I3.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I3.java new file mode 100644 index 000000000000..c678eaa789b0 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I3.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public interface I3 extends I2 { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/IA.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/IA.java new file mode 100644 index 000000000000..1cff484c3cd8 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/IA.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public interface IA { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/IB.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/IB.java new file mode 100644 index 000000000000..84e7173c71b8 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/IB.java @@ -0,0 +1,19 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework.subclasstest; + +public interface IB { +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/supported/UnsupportedClass.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/supported/UnsupportedClass.java new file mode 100644 index 000000000000..fa5866451e83 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/supported/UnsupportedClass.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.supported; + +import android.hosttest.annotation.HostSideTestWholeClassKeep; + +// Used for testing --package-redirect. +@HostSideTestWholeClassKeep +public class UnsupportedClass { + private final int mValue; + + public UnsupportedClass(int value) { + mValue = value; + } + + public int getValue() { + return mValue; + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/unsupported/UnsupportedClass.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/unsupported/UnsupportedClass.java new file mode 100644 index 000000000000..92f41ac63cdb --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-framework/src/com/unsupported/UnsupportedClass.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.unsupported; + +import android.hosttest.annotation.HostSideTestWholeClassKeep; + +// Used for testing --package-redirect. +@HostSideTestWholeClassKeep +public class UnsupportedClass { + public UnsupportedClass(int value) { + throw new RuntimeException("This class is not supported"); + } + + public int getValue() { + throw new RuntimeException("This class is not supported"); + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotationsTest.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotationsTest.java new file mode 100644 index 000000000000..1ae049371229 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotationsTest.java @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import static com.google.common.truth.Truth.assertThat; + +import static org.junit.Assert.assertThrows; + +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; + +public class TinyFrameworkAnnotationsTest { + @Rule + public ExpectedException thrown = ExpectedException.none(); + + @Test + public void testSimple() { + TinyFrameworkAnnotations tfc = new TinyFrameworkAnnotations(); + assertThat(tfc.addOne(1)).isEqualTo(2); + assertThat(tfc.keep).isEqualTo(1); + } + + @Test + public void testRemove() { + TinyFrameworkAnnotations tfc = new TinyFrameworkAnnotations(); + assertThrows(NoSuchMethodError.class, () -> tfc.toBeRemoved("abc")); + assertThrows(NoSuchFieldError.class, () -> tfc.remove = 1); + } + + @Test + public void testSubstitute() { + TinyFrameworkAnnotations tfc = new TinyFrameworkAnnotations(); + assertThat(tfc.addTwo(1)).isEqualTo(3); + } + + @Test + public void testSubstituteNative() { + TinyFrameworkAnnotations tfc = new TinyFrameworkAnnotations(); + assertThat(tfc.nativeAddThree(1)).isEqualTo(4); + } + + @Test + public void testUnsupportedMethod() { + TinyFrameworkAnnotations tfc = new TinyFrameworkAnnotations(); + + thrown.expect(RuntimeException.class); + thrown.expectMessage("not yet supported"); + tfc.unsupportedMethod(); + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassTest.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassTest.java new file mode 100644 index 000000000000..68673dc2a5b8 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassTest.java @@ -0,0 +1,321 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import static com.google.common.truth.Truth.assertThat; + +import static org.junit.Assert.assertThrows; + +import com.android.hoststubgen.test.tinyframework.R.Nested; + +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; + +import java.io.FileDescriptor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; + +public class TinyFrameworkClassTest { + @Rule + public ExpectedException thrown = ExpectedException.none(); + + @Test + public void testSimple() { + TinyFrameworkForTextPolicy tfc = new TinyFrameworkForTextPolicy(); + assertThat(tfc.addOne(1)).isEqualTo(2); + assertThat(tfc.stub).isEqualTo(1); + } + + @Test + public void testRemove() { + TinyFrameworkForTextPolicy tfc = new TinyFrameworkForTextPolicy(); + assertThrows(NoSuchMethodError.class, () -> tfc.toBeRemoved("abc")); + assertThrows(NoSuchFieldError.class, () -> tfc.remove = 1); + } + + @Test + public void testIgnore() { + TinyFrameworkForTextPolicy tfc = new TinyFrameworkForTextPolicy(); + tfc.toBeIgnoredV(); + assertThat(tfc.toBeIgnoredZ()).isEqualTo(false); + assertThat(tfc.toBeIgnoredB()).isEqualTo(0); + assertThat(tfc.toBeIgnoredC()).isEqualTo(0); + assertThat(tfc.toBeIgnoredS()).isEqualTo(0); + assertThat(tfc.toBeIgnoredI()).isEqualTo(0); + assertThat(tfc.toBeIgnoredF()).isEqualTo(0); + assertThat(tfc.toBeIgnoredD()).isEqualTo(0); + assertThat(tfc.toBeIgnoredObj()).isEqualTo(null); + } + + @Test + public void testSubstitute() { + TinyFrameworkForTextPolicy tfc = new TinyFrameworkForTextPolicy(); + assertThat(tfc.addTwo(1)).isEqualTo(3); + } + + @Test + public void testSubstituteNative() { + TinyFrameworkForTextPolicy tfc = new TinyFrameworkForTextPolicy(); + assertThat(tfc.nativeAddThree(1)).isEqualTo(4); + } + + @Test + public void testUnsupportedMethod() { + TinyFrameworkForTextPolicy tfc = new TinyFrameworkForTextPolicy(); + + thrown.expect(RuntimeException.class); + thrown.expectMessage("not yet supported"); + tfc.unsupportedMethod(); + } + + @Test + public void testLambda1() { + assertThat(new TinyFrameworkLambdas().mSupplier.get()).isEqualTo(1); + } + + @Test + public void testLambda2() { + assertThat(TinyFrameworkLambdas.sSupplier.get()).isEqualTo(2); + } + + @Test + public void testLambda3() { + assertThat(new TinyFrameworkLambdas().getSupplier().get()).isEqualTo(3); + } + + @Test + public void testLambda4() { + assertThat(TinyFrameworkLambdas.getSupplier_static().get()).isEqualTo(4); + } + + @Test + public void testLambda5() { + assertThat(new TinyFrameworkLambdas.Nested().mSupplier.get()).isEqualTo(5); + } + + @Test + public void testLambda6() { + assertThat(TinyFrameworkLambdas.Nested.sSupplier.get()).isEqualTo(6); + } + + @Test + public void testLambda7() { + assertThat(new TinyFrameworkLambdas.Nested().getSupplier().get()).isEqualTo(7); + } + + @Test + public void testLambda8() { + assertThat(TinyFrameworkLambdas.Nested.getSupplier_static().get()).isEqualTo(8); + } + + @Test + public void testNativeSubstitutionClass() { + assertThat(TinyFrameworkNative.nativeAddTwo(3)).isEqualTo(5); + } + + @Test + public void testNativeSubstitutionLong() { + assertThat(TinyFrameworkNative.nativeLongPlus(1L, 2L)).isEqualTo(3L); + } + + @Test + public void testNativeSubstitutionByte() { + assertThat(TinyFrameworkNative.nativeBytePlus((byte) 3, (byte) 4)).isEqualTo(7); + } + + @Test + public void testNativeSubstitutionClass_nonStatic() { + TinyFrameworkNative instance = new TinyFrameworkNative(); + instance.setValue(5); + assertThat(instance.nativeNonStaticAddToValue(3)).isEqualTo(8); + } + + @Test + public void testSubstituteNativeWithThrow() { + thrown.expect(RuntimeException.class); + thrown.expectMessage("not yet supported"); + + TinyFrameworkNative.nativeStillNotSupported(); + } + + @Test + public void testSubstituteNativeWithKeep() { + // We don't want to complicate the test by setting up JNI, + // so to test out whether the native method is preserved, we + // check whether calling it will throw UnsatisfiedLinkError, + // which would only happen on native methods. + thrown.expect(UnsatisfiedLinkError.class); + + TinyFrameworkNative.nativeStillKeep(); + } + + @Test + public void testNotNativeRedirect() { + TinyFrameworkNative.notNativeStaticRedirected(); + new TinyFrameworkNative().notNativeRedirected(); + } + + @Test + public void testExitLog() { + thrown.expect(RuntimeException.class); + thrown.expectMessage("Outer exception"); + + TinyFrameworkExceptionTester.testException(); + } + + @Test + public void testClassLoadHook() { + assertThat(TinyFrameworkClassWithInitializerStub.sInitialized).isTrue(); + + // Having this line before assertThat() will ensure these class are already loaded. + var classes = new Class[]{ + TinyFrameworkClassWithInitializerStub.class, + TinyFrameworkAnnotations.class, + TinyFrameworkForTextPolicy.class, + }; + + // The following classes have a class load hook, so they should be registered. + assertThat(TinyFrameworkClassLoadHook.sLoadedClasses) + .containsAnyIn(classes); + + // This class doesn't have a class load hook, so shouldn't be included. + assertThat(TinyFrameworkClassLoadHook.sLoadedClasses) + .doesNotContain(TinyFrameworkNestedClasses.class); + } + + @Test + public void testStaticInitializer_Default() { + assertThat(TinyFrameworkClassWithInitializerDefault.sInitialized).isFalse(); + assertThat(TinyFrameworkClassWithInitializerDefault.sObject).isNull(); + } + + @Test + public void testStaticInitializer_Stub() { + assertThat(TinyFrameworkClassWithInitializerStub.sInitialized).isTrue(); + assertThat(TinyFrameworkClassWithInitializerStub.sObject).isNotNull(); + } + + /** + * Test to try accessing JDK private fields using reflections + setAccessible(true), + * which is now disallowed due to Java Modules, unless you run the javacommand with. + * --add-opens=java.base/java.io=ALL-UNNAMED + * + * You can try it from the command line, like: + * $ JAVA_OPTS="--add-opens=java.base/java.io=ALL-UNNAMED" ./run-test-manually.sh + * + * @throws Exception + */ + @Test + public void testFileDescriptor() throws Exception { + var fd = FileDescriptor.out; + + // Get the FD value directly from the private field. + // This is now prohibited due to Java Modules. + // It throws: + // java.lang.reflect.InaccessibleObjectException: Unable to make field private int java.io.FileDescriptor.fd accessible: module java.base does not "opens java.io" to unnamed module @3bb50eaa + + thrown.expect(java.lang.reflect.InaccessibleObjectException.class); + + // Access the private field. + final Field f = FileDescriptor.class.getDeclaredField("fd"); + final Method m = FileDescriptor.class.getDeclaredMethod("set", int.class); + f.setAccessible(true); + m.setAccessible(true); + + assertThat(f.get(fd)).isEqualTo(1); + + // Set + f.set(fd, 2); + assertThat(f.get(fd)).isEqualTo(2); + + // Call the package private method, set(int). + m.invoke(fd, 0); + assertThat(f.get(fd)).isEqualTo(0); + } + + @Test + public void testPackageRedirect() throws Exception { + assertThat(TinyFrameworkPackageRedirect.foo(1)).isEqualTo(1); + } + + @Test + public void testEnumSimple() throws Exception { + assertThat(TinyFrameworkEnumSimple.CAT.ordinal()).isEqualTo(0); + assertThat(TinyFrameworkEnumSimple.CAT.name()).isEqualTo("CAT"); + + assertThat(TinyFrameworkEnumSimple.DOG.ordinal()).isEqualTo(1); + assertThat(TinyFrameworkEnumSimple.DOG.name()).isEqualTo("DOG"); + + assertThat(TinyFrameworkEnumSimple.valueOf("DOG").ordinal()).isEqualTo(1); + + assertThat(TinyFrameworkEnumSimple.values()).isEqualTo( + new TinyFrameworkEnumSimple[]{ + TinyFrameworkEnumSimple.CAT, + TinyFrameworkEnumSimple.DOG, + } + ); + } + + @Test + public void testEnumComplex() throws Exception { + assertThat(TinyFrameworkEnumComplex.RED.ordinal()).isEqualTo(0); + assertThat(TinyFrameworkEnumComplex.RED.name()).isEqualTo("RED"); + + assertThat(TinyFrameworkEnumComplex.RED.getShortName()).isEqualTo("R"); + + assertThat(TinyFrameworkEnumComplex.GREEN.ordinal()).isEqualTo(1); + assertThat(TinyFrameworkEnumComplex.GREEN.name()).isEqualTo("GREEN"); + + assertThat(TinyFrameworkEnumComplex.valueOf("BLUE").ordinal()).isEqualTo(2); + + assertThat(TinyFrameworkEnumComplex.values()).isEqualTo( + new TinyFrameworkEnumComplex[]{ + TinyFrameworkEnumComplex.RED, + TinyFrameworkEnumComplex.GREEN, + TinyFrameworkEnumComplex.BLUE, + } + ); + } + + @Test + public void testAidlHeuristics() { + assertThat(IPretendingAidl.Stub.addOne(1)).isEqualTo(2); + assertThat(IPretendingAidl.Stub.Proxy.addTwo(1)).isEqualTo(3); + } + + @Test + public void testRFileHeuristics() { + assertThat(Nested.ARRAY.length).isEqualTo(1); + } + + @Test + public void testTypeRename() { + assertThat(TinyFrameworkRenamedClassCaller.foo(1)).isEqualTo(1); + } + + @Test + public void testMethodCallReplaceNonStatic() throws Exception { + assertThat(TinyFrameworkMethodCallReplace.nonStaticMethodCallReplaceTester()) + .isEqualTo(true); + } + + @Test + public void testMethodCallReplaceStatic() throws Exception { + assertThat(TinyFrameworkMethodCallReplace.staticMethodCallReplaceTester()) + .isEqualTo(3); + } +} diff --git a/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotationsTest.java b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotationsTest.java new file mode 100644 index 000000000000..1816b383f6f7 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotationsTest.java @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.test.tinyframework; + +import static com.google.common.truth.Truth.assertThat; + +import static org.junit.Assert.assertThrows; + +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; + +public class TinyFrameworkClassWideAnnotationsTest { + @Rule + public ExpectedException thrown = ExpectedException.none(); + + @Test + public void testSimple() { + var tfc = new TinyFrameworkClassWideAnnotations(); + assertThat(tfc.addOne(1)).isEqualTo(2); + assertThat(tfc.keep).isEqualTo(1); + } + + @Test + public void testRemove() { + var tfc = new TinyFrameworkClassWideAnnotations(); + assertThrows(NoSuchMethodError.class, () -> tfc.toBeRemoved("abc")); + assertThrows(NoSuchFieldError.class, () -> tfc.remove = 1); + } + + @Test + public void testSubstitute() { + var tfc = new TinyFrameworkClassWideAnnotations(); + assertThat(tfc.addTwo(1)).isEqualTo(3); + } + + @Test + public void testUnsupportedMethod() { + var tfc = new TinyFrameworkClassWideAnnotations(); + + thrown.expect(RuntimeException.class); + thrown.expectMessage("not yet supported"); + tfc.unsupportedMethod(); + } + + @Test + public void testMethodCallBeforeSuperCall() { + assertThat(new TinyFrameworkNestedClasses.SubClass(3).value).isEqualTo(3); + } + + @Test + public void testNestedClass1() { + assertThat(new TinyFrameworkNestedClasses().mSupplier.get()).isEqualTo(1); + } + + @Test + public void testNestedClass2() { + assertThat(TinyFrameworkNestedClasses.sSupplier.get()).isEqualTo(2); + } + + @Test + public void testNestedClass3() { + assertThat(new TinyFrameworkNestedClasses().getSupplier().get()).isEqualTo(3); + } + + @Test + public void testNestedClass4() { + assertThat(TinyFrameworkNestedClasses.getSupplier_static().get()).isEqualTo(4); + } + + @Test + public void testNestedClass5() { + assertThat((new TinyFrameworkNestedClasses()).new InnerClass().value).isEqualTo(5); + } + + @Test + public void testNestedClass6() { + assertThat(new TinyFrameworkNestedClasses.StaticNestedClass().value).isEqualTo(6); + } + + @Test + public void testNestedClass7() { + assertThat(TinyFrameworkNestedClasses.StaticNestedClass.getSupplier_static().get()) + .isEqualTo(7); + } + + @Test + public void testNestedClass8() { + assertThat(new TinyFrameworkNestedClasses.StaticNestedClass.Double$NestedClass().value) + .isEqualTo(8); + } + + @Test + public void testIgnoreAnnotation() { + // The actual method will throw, but because of @Ignore, it'll return 0. + assertThat(new TinyFrameworkAnnotations().toBeIgnored()) + .isEqualTo(0); + } +} diff --git a/ravenwood/tools/hoststubgen/test/com/android/hoststubgen/asm/AsmUtilsTest.kt b/ravenwood/tools/hoststubgen/test/com/android/hoststubgen/asm/AsmUtilsTest.kt new file mode 100644 index 000000000000..5b2795c4cff2 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test/com/android/hoststubgen/asm/AsmUtilsTest.kt @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.asm + +import com.google.common.truth.Truth.assertThat +import org.junit.Test +import org.objectweb.asm.Opcodes.ACC_PRIVATE +import org.objectweb.asm.Opcodes.ACC_PROTECTED +import org.objectweb.asm.Opcodes.ACC_PUBLIC +import org.objectweb.asm.Opcodes.ACC_STATIC + +class AsmUtilsTest { + @Test + fun testVisibility() { + fun test(access: Int, expected: Visibility) { + assertThat(Visibility.fromAccess(access)).isEqualTo(expected) + } + + test(ACC_PUBLIC or ACC_STATIC, Visibility.PUBLIC) + test(ACC_PRIVATE or ACC_STATIC, Visibility.PRIVATE) + test(ACC_PROTECTED or ACC_STATIC, Visibility.PROTECTED) + test(ACC_STATIC, Visibility.PACKAGE_PRIVATE) + } +} \ No newline at end of file diff --git a/ravenwood/tools/hoststubgen/test/com/android/hoststubgen/utils/ClassFilterTest.kt b/ravenwood/tools/hoststubgen/test/com/android/hoststubgen/utils/ClassFilterTest.kt new file mode 100644 index 000000000000..d4e75d43a54a --- /dev/null +++ b/ravenwood/tools/hoststubgen/test/com/android/hoststubgen/utils/ClassFilterTest.kt @@ -0,0 +1,115 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.utils + +import com.android.hoststubgen.ParseException +import com.google.common.truth.Truth.assertThat +import org.junit.Assert.fail +import org.junit.Test + +class ClassFilterTest { + @Test + fun testDefaultTrue() { + val f = ClassFilter.newNullFilter(true) + assertThat(f.matches("a/b/c")).isEqualTo(true) + } + + @Test + fun testDefaultFalse() { + val f = ClassFilter.newNullFilter(false) + assertThat(f.matches("a/b/c")).isEqualTo(false) + } + + @Test + fun testComplex1() { + val f = ClassFilter.buildFromString(""" + # ** this is a comment ** + a.b.c # allow + !a.b.d # disallow + * # allow all + """.trimIndent(), false, "X") + assertThat(f.getCacheSizeForTest()).isEqualTo(0) + + assertThat(f.matches("a/b/c")).isEqualTo(true) + assertThat(f.getCacheSizeForTest()).isEqualTo(1) + + assertThat(f.matches("a/b/d")).isEqualTo(false) + assertThat(f.matches("x")).isEqualTo(true) + + assertThat(f.getCacheSizeForTest()).isEqualTo(3) + + // Make sure the cache is working + assertThat(f.matches("x")).isEqualTo(true) + } + + @Test + fun testComplex2() { + val f = ClassFilter.buildFromString(""" + a.b.c # allow + !a.* # disallow everything else in package "a". + !d.e.f # disallow d.e.f. + + # everything else is allowed by default + """.trimIndent(), true, "X") + assertThat(f.matches("a/b/c")).isEqualTo(true) + assertThat(f.matches("a/x")).isEqualTo(false) + assertThat(f.matches("d/e/f")).isEqualTo(false) + assertThat(f.matches("d/e/f/g")).isEqualTo(true) + assertThat(f.matches("x")).isEqualTo(true) + + assertThat(f.matches("ab/x")).isEqualTo(true) + } + + @Test + fun testNestedClass() { + val f = ClassFilter.buildFromString("a.b.c\nm.n.o\$p\n", false, "X") + assertThat(f.matches("a/b/c")).isEqualTo(true) + assertThat(f.matches("a/b/c\$d")).isEqualTo(true) + assertThat(f.matches("a/b/c\$d\$e")).isEqualTo(true) + assertThat(f.matches("m/n/o")).isEqualTo(false) + assertThat(f.matches("m/n/o\$p")).isEqualTo(true) + assertThat(f.matches("m/n/o\$p\$r")).isEqualTo(true) + assertThat(f.matches("m/n/o\$p\$r\$")).isEqualTo(true) + } + + @Test + fun testBadFilter1() { + try { + ClassFilter.buildFromString(""" + a* + """.trimIndent(), true, "FILENAME") + fail("ParseException didn't happen") + } catch (e: ParseException) { + assertThat(e.message).contains("Wildcard") + assertThat(e.message).contains("FILENAME") + assertThat(e.message).contains("line 1") + } + } + + @Test + fun testSuffix() { + val f = ClassFilter.buildFromString(""" + *.Abc # allow + !* # Disallow by default + """.trimIndent(), true, "X") + assertThat(f.matches("a/b/c")).isEqualTo(false) + assertThat(f.matches("a/Abc")).isEqualTo(true) + assertThat(f.matches("a/b/c/Abc")).isEqualTo(true) + assertThat(f.matches("a/b/c/Abc\$Nested")).isEqualTo(true) + + assertThat(f.matches("a/XyzAbc")).isEqualTo(false) + } +} \ No newline at end of file diff --git a/ravenwood/tools/hoststubgen/test/com/android/hoststubgen/utils/TrieTest.kt b/ravenwood/tools/hoststubgen/test/com/android/hoststubgen/utils/TrieTest.kt new file mode 100644 index 000000000000..081d03909926 --- /dev/null +++ b/ravenwood/tools/hoststubgen/test/com/android/hoststubgen/utils/TrieTest.kt @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.utils + +import org.junit.Assert.assertEquals +import org.junit.Assert.assertNull +import org.junit.Test + +class TrieTest { + + private class TestTrie : Trie() { + override fun splitToComponents(key: String): Iterator { + return key.toCharArray().iterator() + } + } + + @Test + fun testPrefixTree() { + val trie = TestTrie() + trie["ab"] = 1 + trie["abc"] = 2 + trie["ab123"] = 3 + assertNull(trie["a"]) + assertNull(trie["x"]) + assertNull(trie["a1"]) + assertEquals(1, trie["ab"]) + assertEquals(2, trie["abc"]) + assertEquals(2, trie["abcd"]) + assertEquals(1, trie["ab1"]) + assertEquals(1, trie["ab12"]) + assertEquals(3, trie["ab123"]) + assertEquals(1, trie["ab@"]) + } +} diff --git a/ravenwood/tools/hoststubgen/test/com/android/hoststubgen/visitors/HelperTest.kt b/ravenwood/tools/hoststubgen/test/com/android/hoststubgen/visitors/HelperTest.kt new file mode 100644 index 000000000000..75e2536a98fa --- /dev/null +++ b/ravenwood/tools/hoststubgen/test/com/android/hoststubgen/visitors/HelperTest.kt @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2023 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.hoststubgen.visitors + +import com.android.hoststubgen.HostStubGenErrors +import com.android.hoststubgen.asm.ClassNodes +import com.google.common.truth.Truth.assertThat +import org.junit.Test +import org.objectweb.asm.Opcodes +import org.objectweb.asm.tree.ClassNode +import org.objectweb.asm.tree.MethodNode + +class HelperTest { + @Test + fun testCheckSubstitutionMethodCompatibility() { + val errors = object : HostStubGenErrors() { + override fun onErrorFound(message: String) { + // Don't throw + } + } + + val cn = ClassNode().apply { + name = "ClassName" + methods = ArrayList() + } + + val descriptor = "()V" + + val staticPublic = MethodNode().apply { + name = "staticPublic" + access = Opcodes.ACC_STATIC or Opcodes.ACC_PUBLIC + desc = descriptor + cn.methods.add(this) + } + + val staticPrivate = MethodNode().apply { + name = "staticPrivate" + access = Opcodes.ACC_STATIC or Opcodes.ACC_PRIVATE + desc = descriptor + cn.methods.add(this) + } + + val nonStaticPublic = MethodNode().apply { + name = "nonStaticPublic" + access = Opcodes.ACC_PUBLIC + desc = descriptor + cn.methods.add(this) + } + + val nonStaticPProtected = MethodNode().apply { + name = "nonStaticPProtected" + access = 0 + desc = descriptor + cn.methods.add(this) + } + + val classes = ClassNodes().apply { + addClass(cn) + } + + fun check(from: MethodNode?, to: MethodNode?, expected: Int) { + assertThat(checkSubstitutionMethodCompatibility( + classes, + cn.name, + (from?.name ?: "**nonexistentmethodname**"), + (to?.name ?: "**nonexistentmethodname**"), + descriptor, + errors, + )).isEqualTo(expected) + } + + check(staticPublic, staticPublic, Opcodes.ACC_PUBLIC or Opcodes.ACC_STATIC) + check(staticPrivate, staticPrivate, Opcodes.ACC_PRIVATE or Opcodes.ACC_STATIC) + check(nonStaticPublic, nonStaticPublic, Opcodes.ACC_PUBLIC) + check(nonStaticPProtected, nonStaticPProtected, 0) + + check(staticPublic, null, NOT_COMPATIBLE) + check(null, staticPublic, NOT_COMPATIBLE) + + check(staticPublic, nonStaticPublic, NOT_COMPATIBLE) + check(nonStaticPublic, staticPublic, NOT_COMPATIBLE) + + check(staticPublic, staticPrivate, Opcodes.ACC_PUBLIC or Opcodes.ACC_STATIC) + check(staticPrivate, staticPublic, Opcodes.ACC_PRIVATE or Opcodes.ACC_STATIC) + + check(nonStaticPublic, nonStaticPProtected, Opcodes.ACC_PUBLIC) + check(nonStaticPProtected, nonStaticPublic, 0) + } +} \ No newline at end of file diff --git a/tools/hoststubgen/.gitignore b/tools/hoststubgen/.gitignore deleted file mode 100644 index 6453bdef8cee..000000000000 --- a/tools/hoststubgen/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -out/ -*-out/ -*.log diff --git a/tools/hoststubgen/OWNERS b/tools/hoststubgen/OWNERS deleted file mode 100644 index 3d8888d83cf4..000000000000 --- a/tools/hoststubgen/OWNERS +++ /dev/null @@ -1 +0,0 @@ -file:platform/frameworks/base:/ravenwood/OWNERS diff --git a/tools/hoststubgen/README.md b/tools/hoststubgen/README.md deleted file mode 100644 index 1a895dc7dfce..000000000000 --- a/tools/hoststubgen/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# HostStubGen - -## Overview - -HostStubGen is a tool built for ravenwood. It can read an Android framework jar file -(such as `framework-minus-apex.jar` or `framework-all.jar`) and -converts them, so that they can be used on the Ravenwood environment. - -This directory contains the HostStubGen source code, tests and some library source files -used at runtime. - -- HostStubGen itself is design to be agnostic to Android. It doesn't use any Android APIs -(hidden or not). But it may use Android specific knowledge -- e.g. as of now, -AndroidHeuristicsFilter has hardcoded heuristics to detect AIDL generated classes. - -- `test-tiny-framework/` contains basic tests that are agnostic to Android. - -- More Android specific build files and code are stored in `frameworks/base/Ravenwood.bp` - `frameworks/base/ravenwood`. - -## Directories and files - -- `hoststubgen/` - Contains source code of the "hoststubgen" tool and relevant code - - - `src/` - - HostStubGen tool source code. - - - `annotations-src/` See `Android.bp`. - - `helper-framework-buildtime-src/` See `Android.bp`. - - `helper-framework-runtime-src/` See `Android.bp`. - - `helper-runtime-src/` See `Android.bp`. - - - `test-tiny-framework/` See `README.md` in it. - -- `scripts` - - `dump-jar.sh` - - A script to dump the content of `*.class` and `*.jar` files. - - - `run-all-tests.sh` - - Run all tests. Many tests may fail, but at least this should run til the end. - (It should print `run-all-tests.sh finished` at the end) - -## Build and run - -### Building `HostStubGen` binary - -``` -m hoststubgen -``` - -### Run the tests - -- Run all relevant tests and test scripts. All of it is expected to pass, and it'll print - "Ready to submit" at the end. - - However, because some of the script it executes depend on internal file paths to Soong's - intermediate directory, some of it might fail when something changes in the build system. - - We need proper build system integration to fix them. -``` -$ ./scripts/run-all-tests.sh -``` - -- See also `README.md` in `test-*` directories. - -## TODOs, etc - - - Make sure the parent's visibility is not smaller than the member's. - -- @HostSideTestNativeSubstitutionClass should automatically add class-keep to the substitute class. - (or at least check it.) - - - The `HostStubGenTest-framework-test-host-test-lib` jar somehow contain all ASM classes? Figure out where the dependency is coming from. - -- At some point, we can move or delete all Android specific code to `frameworks/base/ravenwood`. - - `helper-framework-*-src` should be moved to `frameworks/base/ravenwood` - - `test-framework` should be deleted. \ No newline at end of file diff --git a/tools/hoststubgen/TEST_MAPPING b/tools/hoststubgen/TEST_MAPPING deleted file mode 100644 index 856e6eefba15..000000000000 --- a/tools/hoststubgen/TEST_MAPPING +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": [ - { - "path": "frameworks/base/ravenwood" - } - ] -} diff --git a/tools/hoststubgen/common.sh b/tools/hoststubgen/common.sh deleted file mode 100644 index b49ee39a3142..000000000000 --- a/tools/hoststubgen/common.sh +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright (C) 2023 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -e # Exit at failure -shopt -s globstar # Enable double-star wildcards (**) - -cd "${0%/*}" # Move to the script dir - -fail() { - echo "Error: $*" 1>&2 - exit 1 -} - -# Print the arguments and then execute. -run() { - echo "Running: $*" 1>&2 - "$@" -} - -# Concatenate the second and subsequent args with the first arg as a separator. -# e.g. `join : a b c` -> prints `a:b:c` -join() { - local IFS="$1" - shift - echo "$*" -} - -abspath() { - for name in "${@}"; do - readlink -f $name - done -} - -m() { - if (( $SKIP_BUILD )) ; then - echo "Skipping build: $*" 1>&2 - return 0 - fi - run ${ANDROID_BUILD_TOP}/build/soong/soong_ui.bash --make-mode "$@" -} - -# Extract given jar files -extract() { - for f in "${@}"; do - local out=$f.ext - run rm -fr $out - run mkdir -p $out - - # It's too noisy, so only show the first few lines. - { - # Hmm unzipping kotlin jar files may produce a warning? Let's just add `|| true`... - run unzip $f -d $out || true - } |& sed -e '5,$d' - echo ' (omitting remaining output)' - - done -} - -# Find all *.java files in $1, and print them as Java class names. -# For example, if there's a file `src/com/android/test/Test.java`, and you run -# `list_all_classes_under_dir src`, then it'll print `com.android.test.Test`. -list_all_classes_under_dir() { - local dir="$1" - ( # Use a subshell, so we won't change the current directory on the caller side. - cd "$dir" - - # List the java files, but replace the slashes with dots, and remove the `.java` suffix. - ls **/*.java | sed -e 's!/!.!g' -e 's!.java$!!' - ) -} - -checkenv() { - # Make sure $ANDROID_BUILD_TOP is set. - : ${ANDROID_BUILD_TOP:?} - - # Make sure ANDROID_BUILD_TOP doesn't contain whitespace. - set ${ANDROID_BUILD_TOP} - if [[ $# != 1 ]] ; then - fail "\$ANDROID_BUILD_TOP cannot contain whitespace." - fi -} - -checkenv - -JAVAC=${JAVAC:-javac} -JAVA=${JAVA:-java} -JAR=${JAR:-jar} - -JAVAC_OPTS=${JAVAC_OPTS:--Xmaxerrs 99999 -Xlint:none} - -SOONG_INT=$ANDROID_BUILD_TOP/out/soong/.intermediates - -JUNIT_TEST_MAIN_CLASS=com.android.hoststubgen.hosthelper.HostTestSuite - -run_junit_test_jar() { - local jar="$1" - echo "Starting test: $jar ..." - run cd "${jar%/*}" - - run $JAVA $JAVA_OPTS \ - -cp $jar \ - org.junit.runner.JUnitCore \ - $main_class || return 1 - return 0 -} diff --git a/tools/hoststubgen/hoststubgen/.gitignore b/tools/hoststubgen/hoststubgen/.gitignore deleted file mode 100644 index 0f384074ed7f..000000000000 --- a/tools/hoststubgen/hoststubgen/.gitignore +++ /dev/null @@ -1 +0,0 @@ -framework-all-stub-out \ No newline at end of file diff --git a/tools/hoststubgen/hoststubgen/Android.bp b/tools/hoststubgen/hoststubgen/Android.bp deleted file mode 100644 index a5ff4964b0a4..000000000000 --- a/tools/hoststubgen/hoststubgen/Android.bp +++ /dev/null @@ -1,171 +0,0 @@ -package { - // See: http://go/android-license-faq - // A large-scale-change added 'default_applicable_licenses' to import - // all of the 'license_kinds' from "frameworks_base_license" - // to get the below license kinds: - // SPDX-license-identifier-Apache-2.0 - default_applicable_licenses: ["frameworks_base_license"], - - // OWNER: g/ravenwood - // Bug component: 25698 - default_team: "trendy_team_ravenwood", -} - -// Visibility only for ravenwood prototype uses. -genrule_defaults { - name: "ravenwood-internal-only-visibility-genrule", - visibility: [ - ":__subpackages__", - "//frameworks/base", - "//frameworks/base/ravenwood:__subpackages__", - ], -} - -// Visibility only for ravenwood prototype uses. -java_defaults { - name: "ravenwood-internal-only-visibility-java", - visibility: [ - ":__subpackages__", - "//frameworks/base", - "//frameworks/base/ravenwood:__subpackages__", - ], -} - -// Visibility only for ravenwood prototype uses. -filegroup_defaults { - name: "ravenwood-internal-only-visibility-filegroup", - visibility: [ - ":__subpackages__", - "//frameworks/base", - "//frameworks/base/ravenwood:__subpackages__", - ], -} - -// This library contains the standard hoststubgen annotations. -// This is only for the prototype. The productionized version is "ravenwood-annotations". -java_library { - name: "hoststubgen-annotations", - defaults: ["ravenwood-internal-only-visibility-java"], - srcs: [ - "annotations-src/**/*.java", - ], - host_supported: true, - - sdk_version: "core_current", -} - -// This library contains helper classes used in the host side test environment at runtime. -// This library is _not_ specific to Android APIs. -java_library_host { - name: "hoststubgen-helper-runtime", - defaults: ["ravenwood-internal-only-visibility-java"], - srcs: [ - "helper-runtime-src/**/*.java", - ], - libs: [ - "junit", - ], - static_libs: [ - "guava", - ], - jarjar_rules: "jarjar-rules.txt", -} - -java_library { - name: "hoststubgen-helper-runtime.ravenwood", - defaults: ["ravenwood-internal-only-visibility-java"], - srcs: [ - "helper-runtime-src/**/*.java", - ], - libs: [ - "junit", - ], - static_libs: [ - "guava", - ], - jarjar_rules: "jarjar-rules.txt", -} - -// For sharing the code with other tools -java_library_host { - name: "hoststubgen-lib", - defaults: ["ravenwood-internal-only-visibility-java"], - srcs: ["src/**/*.kt"], - static_libs: [ - "hoststubgen-helper-runtime", - ], - libs: [ - "junit", - "ow2-asm", - "ow2-asm-analysis", - "ow2-asm-commons", - "ow2-asm-tree", - "ow2-asm-util", - ], -} - -// Host-side stub generator tool. -java_binary_host { - name: "hoststubgen", - main_class: "com.android.hoststubgen.HostStubGenMain", - static_libs: [ - "hoststubgen-lib", - "junit", - "ow2-asm", - "ow2-asm-analysis", - "ow2-asm-commons", - "ow2-asm-tree", - "ow2-asm-util", - ], - visibility: ["//visibility:public"], -} - -java_test_host { - name: "hoststubgentest", - srcs: ["test/**/*.kt"], - static_libs: [ - "hoststubgen", - "truth", - ], - test_suites: ["general-tests"], - visibility: ["//visibility:private"], -} - -// File that contains the standard command line argumetns to hoststubgen. -// This is only for the prototype. The productionized version is "ravenwood-standard-options". -filegroup { - name: "hoststubgen-standard-options", - defaults: ["ravenwood-internal-only-visibility-filegroup"], - srcs: [ - "hoststubgen-standard-options.txt", - ], -} - -hoststubgen_common_options = "$(location hoststubgen) " + - // "--in-jar $(location :framework-all) " + - // "--policy-override-file $(location framework-policy-override.txt) " + - "@$(location :hoststubgen-standard-options) " + - - "--out-jar $(location host.jar) " + - - // "--keep-all-classes " + // Used it for an experiment. See KeepAllClassesFilter. - "--gen-keep-all-file $(location hoststubgen_keep_all.txt) " + - "--gen-input-dump-file $(location hoststubgen_dump.txt) " + - "" - -// Common defaults for stub generation. -// This one is not specific to Android APIs. -genrule_defaults { - name: "hoststubgen-command-defaults", - tools: ["hoststubgen"], - srcs: [ - ":hoststubgen-standard-options", - ], - out: [ - "host.jar", - - // Following files are created just as FYI. - "hoststubgen_keep_all.txt", - "hoststubgen_dump.txt", - ], -} diff --git a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestClassLoadHook.java b/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestClassLoadHook.java deleted file mode 100644 index a774336a897c..000000000000 --- a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestClassLoadHook.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package android.hosttest.annotation; - -import static java.lang.annotation.ElementType.TYPE; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * Add this with a fully-specified method name (e.g. {@code "com.package.Class.methodName"}) - * of a callback to get a callback at the class load time. - * - * The method must be {@code public static} with a single argument that takes - * {@link java.lang.Class}. - */ -@Target({TYPE}) -@Retention(RetentionPolicy.CLASS) -public @interface HostSideTestClassLoadHook { - String value(); -} diff --git a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestIgnore.java b/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestIgnore.java deleted file mode 100644 index 501fd652145e..000000000000 --- a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestIgnore.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package android.hosttest.annotation; - -import static java.lang.annotation.ElementType.CONSTRUCTOR; -import static java.lang.annotation.ElementType.METHOD; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * @hide - */ -@Target({METHOD, CONSTRUCTOR}) -@Retention(RetentionPolicy.CLASS) -public @interface HostSideTestIgnore { -} diff --git a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestKeep.java b/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestKeep.java deleted file mode 100644 index 06ad1c266a14..000000000000 --- a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestKeep.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package android.hosttest.annotation; - -import static java.lang.annotation.ElementType.CONSTRUCTOR; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.TYPE; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * Mark a class, field or a method as "Stub", meaning tests can _not_ see the APIs, but they - * can indirectly be used on the host side. - * When applied to a class, it will _not_ affect the visibility of its members. They need to be - * individually marked. - * - *

In order to expose a class and all its members, use {@link HostSideTestWholeClassStub} - * instead. - * @hide - */ -@Target({TYPE, FIELD, METHOD, CONSTRUCTOR}) -@Retention(RetentionPolicy.CLASS) -public @interface HostSideTestKeep { -} diff --git a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRedirect.java b/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRedirect.java deleted file mode 100644 index bc9471b84b97..000000000000 --- a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRedirect.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package android.hosttest.annotation; - -import static java.lang.annotation.ElementType.METHOD; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * @hide - */ -@Target({METHOD}) -@Retention(RetentionPolicy.CLASS) -public @interface HostSideTestRedirect { -} diff --git a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRedirectionClass.java b/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRedirectionClass.java deleted file mode 100644 index 28ad236a66f3..000000000000 --- a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRedirectionClass.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package android.hosttest.annotation; - -import static java.lang.annotation.ElementType.TYPE; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * If a class has this annotation, all its native methods will be delegated to another class. - * (See {@link android.os.Parcel} as an example.) - */ -@Target({TYPE}) -@Retention(RetentionPolicy.CLASS) -public @interface HostSideTestRedirectionClass { - String value(); -} diff --git a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRemove.java b/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRemove.java deleted file mode 100644 index 46e5078fb05d..000000000000 --- a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestRemove.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package android.hosttest.annotation; - -import static java.lang.annotation.ElementType.CONSTRUCTOR; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.TYPE; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * Mark an item as "remove", so this cannot be used on the host side even indirectly. - * This is the default behavior. - * - * @hide - */ -@Target({TYPE, FIELD, METHOD, CONSTRUCTOR}) -@Retention(RetentionPolicy.CLASS) -public @interface HostSideTestRemove { -} diff --git a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestStaticInitializerKeep.java b/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestStaticInitializerKeep.java deleted file mode 100644 index eec72269e0d3..000000000000 --- a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestStaticInitializerKeep.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package android.hosttest.annotation; - -import static java.lang.annotation.ElementType.CONSTRUCTOR; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.TYPE; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * @hide - */ -@Target({TYPE, FIELD, METHOD, CONSTRUCTOR}) -@Retention(RetentionPolicy.CLASS) -public @interface HostSideTestStaticInitializerKeep { -} diff --git a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestSubstitute.java b/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestSubstitute.java deleted file mode 100644 index 510a67e0aaed..000000000000 --- a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestSubstitute.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package android.hosttest.annotation; - -import static java.lang.annotation.ElementType.METHOD; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * If a method has this annotation, we'll replace it with another method on the host side. - * - * See {@link android.util.LruCache#getEldest()} and its substitution. - * - * @hide - */ -@Target({METHOD}) -@Retention(RetentionPolicy.CLASS) -public @interface HostSideTestSubstitute { - // TODO We should add "_host" as default. We're not doing it yet, because extractign the default - // value with ASM doesn't seem trivial. (? not sure.) - String suffix(); -} diff --git a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestThrow.java b/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestThrow.java deleted file mode 100644 index cd1bef4be505..000000000000 --- a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestThrow.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package android.hosttest.annotation; - -import static java.lang.annotation.ElementType.CONSTRUCTOR; -import static java.lang.annotation.ElementType.METHOD; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * If a method has this annotation, it will throw on the host side. - * - * @hide - */ -@Target({METHOD, CONSTRUCTOR}) -@Retention(RetentionPolicy.CLASS) -public @interface HostSideTestThrow { -} diff --git a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestWholeClassKeep.java b/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestWholeClassKeep.java deleted file mode 100644 index 3d1ddea2cbb7..000000000000 --- a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/HostSideTestWholeClassKeep.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package android.hosttest.annotation; - -import static java.lang.annotation.ElementType.TYPE; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * THIS ANNOTATION IS EXPERIMENTAL. REACH OUT TO g/ravenwood BEFORE USING IT, OR YOU HAVE ANY - * QUESTIONS ABOUT IT. - * - * Same as {@link HostSideTestKeep} but it'll change the visibility of all its members too. - * @hide - */ -@Target({TYPE}) -@Retention(RetentionPolicy.CLASS) -public @interface HostSideTestWholeClassKeep { -} diff --git a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/tests/HostSideTestSuppress.java b/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/tests/HostSideTestSuppress.java deleted file mode 100644 index b10f0ff1a4b1..000000000000 --- a/tools/hoststubgen/hoststubgen/annotations-src/android/hosttest/annotation/tests/HostSideTestSuppress.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package android.hosttest.annotation.tests; - -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.TYPE; - -import java.lang.annotation.Target; - -/** - * Use this annotation to skip certain tests for host side tests. - * - * TODO: Actually use it in the test runner. - */ -@Target({TYPE, FIELD, METHOD}) -public @interface HostSideTestSuppress { -} diff --git a/tools/hoststubgen/hoststubgen/framework-policy-override.txt b/tools/hoststubgen/hoststubgen/framework-policy-override.txt deleted file mode 100644 index af3789e270a4..000000000000 --- a/tools/hoststubgen/hoststubgen/framework-policy-override.txt +++ /dev/null @@ -1,105 +0,0 @@ -# -------------------------------------------------------------------------------------------------- -# This file contains rules to process `framework-all.jar` to generate the host side test "stub" and -# "impl" jars, without using Java annotations. -# -# Useful when: -# - The class is auto-generated and annotations can't be added. -# (We need to figure out what to do on auto-generated classes.) -# - Want to quickly change filter rules without having to rebuild framework.jar. -# -# Using this file, one can control the visibility of APIs on a per-class, per-field and per-method -# basis, but in most cases, per-class directives would be sufficient. That is: -# -# - To put the entire class, including its members and nested classes, in the "stub" jar, -# so that the test / target code can use the API, use `stubclass`. -# -# class package.class stubclass -# -# - To put the entire class, including its members and nested classes, in the "impl" jar, -# but not in the "stub" jar, use `keepclass`. Use this when you don't want to expose an API to -# tests/target directly, but it's still needed at runtime, because it's used by other "stub" APIs -# directly or indirectly. -# -# class package.class keepclass -# -# All other classes will be removed from both the stub jar and impl jar. -# -# -------------------------------------------------------------------------------------------------- - -# -------------------------------------------------------------------------------------------------- -# Directions on auto-generated classes, where we can't use Java annotations (yet). -# -------------------------------------------------------------------------------------------------- -class android.Manifest stubclass -class android.R stubclass -class android.os.PersistableBundleProto keepclass - -# This is in module-utils, where using a HostStubGen annotation would be complicated, so we -# add a direction here rather than using a java annotation. -# The build file says it's deprecated, anyway...? Figure out what to do with it. -class com.android.internal.util.Preconditions keepclass - -# -------------------------------------------------------------------------------------------------- -# Actual framework classes -# -------------------------------------------------------------------------------------------------- - -# Put basic exception classes in the "impl" jar. -# We don't put them in stub yet (until something actually needs them). -class android.os.DeadObjectException keepclass -class android.os.DeadSystemRuntimeException keepclass -class android.os.NetworkOnMainThreadException keepclass -class android.os.RemoteException keepclass -class android.os.ServiceSpecificException keepclass -class android.util.AndroidException keepclass -class android.util.AndroidRuntimeException keepclass -class android.os.DeadSystemException keepclass - - -# For now, we only want to expose ArrayMap and Log, but they and their tests depend on -# more classes. - -class android.util.ArrayMap stubclass - -# Used by ArrayMap. No need to put them in the stub, but we need them in impl. -class android.util.MapCollections keepclass -class android.util.ContainerHelpers keepclass -class android.util.EmptyArray stubclass -class com.android.internal.util.XmlUtils keepclass -class com.android.internal.util.FastMath keepclass -class android.util.MathUtils keepclass - - -class android.util.Log stubclass -class android.util.Slog stubclass -# We don't use Log's native code, yet. Instead, the following line enables the Java substitution. -# Comment it out to disable Java substitution of Log's native methods. -class android.util.Log !com.android.hoststubgen.nativesubstitution.Log_host - -# Used by log -class com.android.internal.util.FastPrintWriter keepclass -class com.android.internal.util.LineBreakBufferedWriter keepclass - -class android.util.EventLog stubclass -class android.util.EventLog !com.android.hoststubgen.nativesubstitution.EventLog_host -class android.util.EventLog$Event stubclass - -# Expose Context because it's referred to by AndroidTestCase, but don't need to expose any of -# its members. -class android.content.Context keep - -# Expose Parcel, Parcel and there relevant classes, which are used by ArrayMapTets. -class android.os.Parcelable StubClass -class android.os.Parcel StubClass -class android.os.Parcel !com.android.hoststubgen.nativesubstitution.Parcel_host - -class android.os.IBinder stubClass -class android.os.IInterface stubclass - -class android.os.BadParcelableException stubclass -class android.os.BadTypeParcelableException stubclass - -class android.os.BaseBundle stubclass -class android.os.Bundle stubclass -class android.os.PersistableBundle stubclass - -class android.os.MessageQueue stubclass -class android.os.MessageQueue !com.android.hoststubgen.nativesubstitution.MessageQueue_host diff --git a/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsIgnore.java b/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsIgnore.java deleted file mode 100644 index b01710347537..000000000000 --- a/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsIgnore.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.hosthelper; - -import static java.lang.annotation.ElementType.METHOD; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Annotation injected to all methods processed as "ignore". - */ -@Target({METHOD}) -@Retention(RetentionPolicy.RUNTIME) -public @interface HostStubGenProcessedAsIgnore { - String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenProcessedAsIgnore.class); - String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; -} diff --git a/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsKeep.java b/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsKeep.java deleted file mode 100644 index 18ef1bab203e..000000000000 --- a/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsKeep.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.hosthelper; - -import static java.lang.annotation.ElementType.CONSTRUCTOR; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.TYPE; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Annotation injected to all classes/methods/fields that are kept in the processes jar. - */ -@Target({TYPE, METHOD, CONSTRUCTOR, FIELD}) -@Retention(RetentionPolicy.RUNTIME) -public @interface HostStubGenProcessedAsKeep { - String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenProcessedAsKeep.class); - String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; -} diff --git a/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsSubstitute.java b/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsSubstitute.java deleted file mode 100644 index 99e38c0b1725..000000000000 --- a/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsSubstitute.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.hosthelper; - -import static java.lang.annotation.ElementType.CONSTRUCTOR; -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.ElementType.METHOD; -import static java.lang.annotation.ElementType.TYPE; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Annotation injected to all methods that are processed as "substitute". - */ -@Target({TYPE, METHOD, CONSTRUCTOR, FIELD}) -@Retention(RetentionPolicy.RUNTIME) -public @interface HostStubGenProcessedAsSubstitute { - String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName( - HostStubGenProcessedAsSubstitute.class); - String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; -} diff --git a/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsThrow.java b/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsThrow.java deleted file mode 100644 index 4933cf8784d9..000000000000 --- a/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostStubGenProcessedAsThrow.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.hosthelper; - -import static java.lang.annotation.ElementType.METHOD; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Annotation injected to all methods that are processed as "throw". - */ -@Target({METHOD}) -@Retention(RetentionPolicy.RUNTIME) -public @interface HostStubGenProcessedAsThrow { - String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenProcessedAsThrow.class); - String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";"; -} diff --git a/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestException.java b/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestException.java deleted file mode 100644 index c54c2c111229..000000000000 --- a/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestException.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.hosthelper; - -public class HostTestException extends RuntimeException { - public HostTestException(String message) { - super(message); - } - - public HostTestException(String message, Throwable inner) { - super(message, inner); - } -} diff --git a/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestSuite.java b/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestSuite.java deleted file mode 100644 index 29f7be008eef..000000000000 --- a/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestSuite.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.hosthelper; - -import com.google.common.reflect.ClassPath; -import com.google.common.reflect.ClassPath.ClassInfo; - -import junit.framework.JUnit4TestAdapter; -import junit.framework.TestSuite; - -import java.util.regex.Pattern; - -/** - * A very simple Junit {@link TestSuite} builder that finds all classes that look like test classes. - * - * We use it to run ravenwood test jars from the command line. - */ -public class HostTestSuite { - private static final String CLASS_NAME_REGEX_ENV = "HOST_TEST_CLASS_NAME_REGEX"; - - /** - * Called by junit, and return all test-looking classes as a suite. - */ - public static TestSuite suite() { - TestSuite suite = new TestSuite(); - - final Pattern classNamePattern; - final var filterRegex = System.getenv(CLASS_NAME_REGEX_ENV); - if (filterRegex == null) { - classNamePattern = Pattern.compile(""); - } else { - classNamePattern = Pattern.compile(filterRegex); - } - try { - // We use guava to list all classes. - ClassPath cp = ClassPath.from(HostTestSuite.class.getClassLoader()); - - for (var classInfo : cp.getAllClasses()) { - Class clazz = asTestClass(classInfo); - if (clazz != null) { - if (classNamePattern.matcher(clazz.getSimpleName()).find()) { - System.out.println("Test class found " + clazz.getName()); - } else { - System.out.println("Skipping test class (for $" - + CLASS_NAME_REGEX_ENV + "): " + clazz.getName()); - } - suite.addTest(new JUnit4TestAdapter(clazz)); - } - } - } catch (Exception e) { - throw new RuntimeException(e); - } - return suite; - } - - /** - * Decide whether a class looks like a test class or not, and if so, return it as a Class - * instance. - */ - private static Class asTestClass(ClassInfo classInfo) { - try { - final Class clazz = classInfo.load(); - - // Does it extend junit.framework.TestCase? - if (junit.framework.TestCase.class.isAssignableFrom(clazz)) { - // Ignore classes in JUnit itself, or the android(x) test lib. - if (classInfo.getName().startsWith("junit.") - || classInfo.getName().startsWith("org.junit.") - || classInfo.getName().startsWith("android.test.") - || classInfo.getName().startsWith("androidx.test.")) { - return null; // Ignore junit classes. - } - return clazz; - } - // Does it have any "@Test" method? - for (var method : clazz.getMethods()) { - for (var an : method.getAnnotations()) { - if (an.annotationType() == org.junit.Test.class) { - return clazz; - } - } - } - return null; - } catch (java.lang.NoClassDefFoundError e) { - // Ignore unloadable classes. - return null; - } - } -} diff --git a/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestUtils.java b/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestUtils.java deleted file mode 100644 index 78fd8f7f960a..000000000000 --- a/tools/hoststubgen/hoststubgen/helper-runtime-src/com/android/hoststubgen/hosthelper/HostTestUtils.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.hosthelper; - -import java.io.PrintStream; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; - -/** - * Utilities used in the host side test environment. - */ -public class HostTestUtils { - private HostTestUtils() { - } - - /** - * Same as ASM's Type.getInternalName(). Copied here, to avoid having a reference to ASM - * in this JAR. - */ - public static String getInternalName(final Class clazz) { - return clazz.getName().replace('.', '/'); - } - - public static final String CLASS_INTERNAL_NAME = getInternalName(HostTestUtils.class); - - /** If true, we won't print method call log. */ - private static final boolean SKIP_METHOD_LOG = "1".equals(System.getenv( - "HOSTTEST_SKIP_METHOD_LOG")); - - /** If true, we won't print class load log. */ - private static final boolean SKIP_CLASS_LOG = "1".equals(System.getenv( - "HOSTTEST_SKIP_CLASS_LOG")); - - /** If true, we won't perform non-stub method direct call check. */ - private static final boolean SKIP_NON_STUB_METHOD_CHECK = "1".equals(System.getenv( - "HOSTTEST_SKIP_NON_STUB_METHOD_CHECK")); - - - /** - * Method call log will be printed to it. - */ - public static PrintStream logPrintStream = System.out; - - /** - * Called from methods with FilterPolicy.Throw. - */ - public static void onThrowMethodCalled() { - // TODO: Maybe add call tracking? - throw new RuntimeException( - "This method is not yet supported under the Ravenwood deviceless testing " - + "environment; consider requesting support from the API owner or " - + "consider using Mockito; more details at go/ravenwood-docs"); - } - - /** - * Trampoline method for method-call-hook. - */ - public static void callMethodCallHook( - Class methodClass, - String methodName, - String methodDescriptor, - String callbackMethod - ) { - callStaticMethodByName(callbackMethod, "method call hook", methodClass, - methodName, methodDescriptor); - } - - /** - * I can be used as - * {@code --default-method-call-hook - * com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall}. - * - * It logs every single methods called. - */ - public static void logMethodCall( - Class methodClass, - String methodName, - String methodDescriptor - ) { - if (SKIP_METHOD_LOG) { - return; - } - logPrintStream.println("# method called: " + methodClass.getCanonicalName() + "." - + methodName + methodDescriptor); - } - - /** - * Called when any top level class (not nested classes) in the impl jar is loaded. - * - * When HostStubGen inject a class-load hook, it's always a call to this method, with the - * actual method name as the second argument. - * - * This method discovers the hook method with reflections and call it. - * - * TODO: Add a unit test. - */ - public static void onClassLoaded(Class loadedClass, String callbackMethod) { - logPrintStream.println("! Class loaded: " + loadedClass.getCanonicalName() - + " calling hook " + callbackMethod); - - callStaticMethodByName(callbackMethod, "class load hook", loadedClass); - } - - private static void callStaticMethodByName(String classAndMethodName, - String description, Object... args) { - // Forward the call to callbackMethod. - final int lastPeriod = classAndMethodName.lastIndexOf("."); - - if ((lastPeriod) < 0 || (lastPeriod == classAndMethodName.length() - 1)) { - throw new HostTestException(String.format( - "Unable to find %s: malformed method name \"%s\"", - description, - classAndMethodName)); - } - - final String className = classAndMethodName.substring(0, lastPeriod); - final String methodName = classAndMethodName.substring(lastPeriod + 1); - - Class clazz = null; - try { - clazz = Class.forName(className); - } catch (Exception e) { - throw new HostTestException(String.format( - "Unable to find %s: Class %s not found", - description, - className), e); - } - if (!Modifier.isPublic(clazz.getModifiers())) { - throw new HostTestException(String.format( - "Unable to find %s: Class %s must be public", - description, - className)); - } - - Class[] argTypes = new Class[args.length]; - for (int i = 0; i < args.length; i++) { - argTypes[i] = args[i].getClass(); - } - - Method method = null; - try { - method = clazz.getMethod(methodName, argTypes); - } catch (Exception e) { - throw new HostTestException(String.format( - "Unable to find %s: class %s doesn't have method %s" - + " (method must take exactly one parameter of type Class," - + " and public static)", - description, className, methodName), e); - } - if (!(Modifier.isPublic(method.getModifiers()) - && Modifier.isStatic(method.getModifiers()))) { - throw new HostTestException(String.format( - "Unable to find %s: Method %s in class %s must be public static", - description, methodName, className)); - } - try { - method.invoke(null, args); - } catch (Exception e) { - throw new HostTestException(String.format( - "Unable to invoke %s %s.%s", - description, className, methodName), e); - } - } - - /** - * I can be used as - * {@code --default-class-load-hook - * com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded}. - * - * It logs every loaded class. - */ - public static void logClassLoaded(Class clazz) { - if (SKIP_CLASS_LOG) { - return; - } - logPrintStream.println("# class loaded: " + clazz.getCanonicalName()); - } -} diff --git a/tools/hoststubgen/hoststubgen/hoststubgen-standard-options.txt b/tools/hoststubgen/hoststubgen/hoststubgen-standard-options.txt deleted file mode 100644 index 001943c18d6b..000000000000 --- a/tools/hoststubgen/hoststubgen/hoststubgen-standard-options.txt +++ /dev/null @@ -1,43 +0,0 @@ -# File containing standard options to HostStubGen - ---debug - -# Uncomment below lines to enable each feature. - -#--default-method-call-hook -# com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall -#--default-class-load-hook -# com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - -# Standard annotations. -# Note, each line is a single argument, so we need newlines after each `--xxx-annotation`. - ---keep-annotation - android.hosttest.annotation.HostSideTestKeep - ---keep-class-annotation - android.hosttest.annotation.HostSideTestWholeClassKeep - ---throw-annotation - android.hosttest.annotation.HostSideTestThrow - ---remove-annotation - android.hosttest.annotation.HostSideTestRemove - ---ignore-annotation - android.hosttest.annotation.HostSideTestIgnore - ---substitute-annotation - android.hosttest.annotation.HostSideTestSubstitute - ---redirect-annotation - android.hosttest.annotation.HostSideTestRedirect - ---redirection-class-annotation - android.hosttest.annotation.HostSideTestRedirectionClass - ---class-load-hook-annotation - android.hosttest.annotation.HostSideTestClassLoadHook - ---keep-static-initializer-annotation - android.hosttest.annotation.HostSideTestStaticInitializerKeep diff --git a/tools/hoststubgen/hoststubgen/invoketest/Android.bp b/tools/hoststubgen/hoststubgen/invoketest/Android.bp deleted file mode 100644 index 7e90e421a1f9..000000000000 --- a/tools/hoststubgen/hoststubgen/invoketest/Android.bp +++ /dev/null @@ -1,20 +0,0 @@ -package { - // See: http://go/android-license-faq - // A large-scale-change added 'default_applicable_licenses' to import - // all of the 'license_kinds' from "frameworks_base_license" - // to get the below license kinds: - // SPDX-license-identifier-Apache-2.0 - default_applicable_licenses: ["frameworks_base_license"], -} - -sh_test_host { - name: "hoststubgen-invoke-test", - src: "hoststubgen-invoke-test.sh", - test_suites: ["general-tests"], - - // Note: java_data: ["hoststubgen"] will only install the jar file, but not the command wrapper. - java_data: [ - "hoststubgen", - "hoststubgen-test-tiny-framework", - ], -} diff --git a/tools/hoststubgen/hoststubgen/invoketest/hoststubgen-invoke-test.sh b/tools/hoststubgen/hoststubgen/invoketest/hoststubgen-invoke-test.sh deleted file mode 100755 index 084448d0a797..000000000000 --- a/tools/hoststubgen/hoststubgen/invoketest/hoststubgen-invoke-test.sh +++ /dev/null @@ -1,228 +0,0 @@ -#!/bin/bash -# Copyright (C) 2023 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This command is expected to be executed with: atest hoststubgen-invoke-test - -set -e # Exit when any command files - -# This script runs HostStubGen directly with various arguments and make sure -# the tool behaves in the expected way. - - -echo "# Listing files in the test environment" -ls -lR - -echo "# Dumping the environment variables" -env - -# Set up the constants and variables - -# Bazel sets $TEST_TMPDIR. -export TEMP=$TEST_TMPDIR - -if [[ "$TEMP" == "" ]] ; then - TEMP=./tmp - mkdir -p $TEMP -fi - -cleanup_temp() { - rm -fr $TEMP/* -} - -cleanup_temp - -INJAR=hoststubgen-test-tiny-framework.jar -OUTJAR=$TEMP/host.jar - -ANNOTATION_FILTER=$TEMP/annotation-filter.txt - -HOSTSTUBGEN_OUT=$TEMP/output.txt - -EXTRA_ARGS="" - -# Because of `set -e`, we can't return non-zero from functions, so we store -# HostStubGen result in it. -HOSTSTUBGEN_RC=0 - -# Note, because the build rule will only install hoststubgen.jar, but not the wrapper script, -# we need to execute it manually with the java command. -hoststubgen() { - echo "Running hoststubgen with: $*" - java -jar ./hoststubgen.jar "$@" -} - -run_hoststubgen() { - local test_name="$1" - local annotation_filter="$2" - - echo "# Test: $test_name" - - cleanup_temp - - local filter_arg="" - - if [[ "$annotation_filter" != "" ]] ; then - echo "$annotation_filter" > $ANNOTATION_FILTER - filter_arg="--annotation-allowed-classes-file $ANNOTATION_FILTER" - echo "=== filter ===" - cat $ANNOTATION_FILTER - fi - - local out_arg="" - - if [[ "$OUTJAR" != "" ]] ; then - out_arg="--out-jar $OUTJAR" - fi - - hoststubgen \ - --debug \ - --in-jar $INJAR \ - $out_arg \ - --keep-annotation \ - android.hosttest.annotation.HostSideTestKeep \ - --keep-class-annotation \ - android.hosttest.annotation.HostSideTestWholeClassKeep \ - --throw-annotation \ - android.hosttest.annotation.HostSideTestThrow \ - --remove-annotation \ - android.hosttest.annotation.HostSideTestRemove \ - --substitute-annotation \ - android.hosttest.annotation.HostSideTestSubstitute \ - --redirect-annotation \ - android.hosttest.annotation.HostSideTestRedirect \ - --redirection-class-annotation \ - android.hosttest.annotation.HostSideTestRedirectionClass \ - --class-load-hook-annotation \ - android.hosttest.annotation.HostSideTestClassLoadHook \ - --keep-static-initializer-annotation \ - android.hosttest.annotation.HostSideTestStaticInitializerKeep \ - $filter_arg \ - $EXTRA_ARGS \ - |& tee $HOSTSTUBGEN_OUT - HOSTSTUBGEN_RC=${PIPESTATUS[0]} - echo "HostStubGen exited with $HOSTSTUBGEN_RC" - return 0 -} - -assert_file_generated() { - local file="$1" - if [[ "$file" == "" ]] ; then - if [[ -f "$file" ]] ; then - echo "HostStubGen shouldn't have generated $file" - return 1 - fi - else - if ! [[ -f "$file" ]] ; then - echo "HostStubGen didn't generate $file" - return 1 - fi - fi -} - -run_hoststubgen_for_success() { - run_hoststubgen "$@" - - if (( $HOSTSTUBGEN_RC != 0 )) ; then - echo "HostStubGen expected to finish successfully, but failed with $rc" - return 1 - fi - - assert_file_generated "$STUB" - assert_file_generated "$IMPL" -} - -run_hoststubgen_for_failure() { - local test_name="$1" - local expected_error_message="$2" - shift 2 - - run_hoststubgen "$test_name" "$@" - - if (( $HOSTSTUBGEN_RC == 0 )) ; then - echo "HostStubGen expected to fail, but it didn't fail" - return 1 - fi - - # The output should contain the expected message. (note we se fgrep here.) - grep -Fq "$expected_error_message" $HOSTSTUBGEN_OUT -} - -# Start the tests... - -# Pass "" as a filter to _not_ add `--annotation-allowed-classes-file`. -run_hoststubgen_for_success "No annotation filter" "" - -# Now, we use " ", so we do add `--annotation-allowed-classes-file`. -run_hoststubgen_for_failure "No classes are allowed to have annotations" \ - "not allowed to have Ravenwood annotations" \ - " " - -run_hoststubgen_for_success "All classes allowed (wildcard)" \ - " -* # Allow all classes -" - -run_hoststubgen_for_failure "All classes disallowed (wildcard)" \ - "not allowed to have Ravenwood annotations" \ - " -!* # Disallow all classes -" - -run_hoststubgen_for_failure "Some classes not allowed (1)" \ - "not allowed to have Ravenwood annotations" \ - " -android.hosttest.* -com.android.hoststubgen.* -com.supported.* -" - -run_hoststubgen_for_failure "Some classes not allowed (2)" \ - "not allowed to have Ravenwood annotations" \ - " -android.hosttest.* -com.android.hoststubgen.* -com.unsupported.* -" - -run_hoststubgen_for_success "All classes allowed (package wildcard)" \ - " -android.hosttest.* -com.android.hoststubgen.* -com.supported.* -com.unsupported.* -" - -run_hoststubgen_for_failure "One specific class disallowed" \ - "TinyFrameworkAnnotations is not allowed to have Ravenwood annotations" \ - " -!com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations -* # All other classes allowed -" - -run_hoststubgen_for_success "One specific class disallowed, but it doesn't use annotations" \ - " -!com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPolicy -* # All other classes allowed -" - -OUTJAR="" run_hoststubgen_for_success "No output generation" "" - -EXTRA_ARGS="--in-jar abc" run_hoststubgen_for_failure "Duplicate arg" \ - "Duplicate or conflicting argument found: --in-jar" \ - "" - - -echo "All tests passed" -exit 0 diff --git a/tools/hoststubgen/hoststubgen/jarjar-rules.txt b/tools/hoststubgen/hoststubgen/jarjar-rules.txt deleted file mode 100644 index b1f2fc21c8e9..000000000000 --- a/tools/hoststubgen/hoststubgen/jarjar-rules.txt +++ /dev/null @@ -1,2 +0,0 @@ -# Rename guava -rule com.google.** com.android.hoststubgen.x.google.@0 \ No newline at end of file diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/Exceptions.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/Exceptions.kt deleted file mode 100644 index f59e143c1e4e..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/Exceptions.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen - -import java.io.File - -/** - * We will not print the stack trace for exceptions implementing it. - */ -interface UserErrorException - -/** - * Exceptions about parsing class files. - */ -class ClassParseException(message: String) : Exception(message) - -/** - * Use it for internal exception that really shouldn't happen. - */ -class HostStubGenInternalException(message: String) : Exception(message) - -/** - * Exceptions about the content in a jar file. - */ -class InvalidJarFileException(message: String) : Exception(message), UserErrorException - -/** - * Exceptions missing classes, fields, methods, etc. - */ -class UnknownApiException(message: String) : Exception(message), UserErrorException - -/** - * Exceptions related to invalid annotations -- e.g. more than one visibility annotation - * on a single API. - */ -class InvalidAnnotationException(message: String) : Exception(message), UserErrorException - -/** - * We use this for general "user" errors. - */ -class GeneralUserErrorException(message: String) : Exception(message), UserErrorException - -/** Base exception class for invalid command line arguments. */ -open class ArgumentsException(message: String?) : Exception(message), UserErrorException - -/** Thrown when the same annotation is used with different annotation arguments. */ -class DuplicateAnnotationException(annotationName: String?) : - ArgumentsException("Duplicate annotation specified: '$annotationName'") - -/** Thrown when an input file does not exist. */ -class InputFileNotFoundException(filename: String) : - ArgumentsException("File '$filename' not found") - -fun String.ensureFileExists(): String { - if (!File(this).exists()) { - throw InputFileNotFoundException(this) - } - return this -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGen.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGen.kt deleted file mode 100644 index 6d8d7b768b91..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGen.kt +++ /dev/null @@ -1,424 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen - -import com.android.hoststubgen.asm.ClassNodes -import com.android.hoststubgen.dumper.ApiDumper -import com.android.hoststubgen.filters.AnnotationBasedFilter -import com.android.hoststubgen.filters.ClassWidePolicyPropagatingFilter -import com.android.hoststubgen.filters.ConstantFilter -import com.android.hoststubgen.filters.DefaultHookInjectingFilter -import com.android.hoststubgen.filters.FilterPolicy -import com.android.hoststubgen.filters.FilterRemapper -import com.android.hoststubgen.filters.ImplicitOutputFilter -import com.android.hoststubgen.filters.KeepNativeFilter -import com.android.hoststubgen.filters.OutputFilter -import com.android.hoststubgen.filters.SanitizationFilter -import com.android.hoststubgen.filters.TextFileFilterPolicyParser -import com.android.hoststubgen.filters.printAsTextPolicy -import com.android.hoststubgen.utils.ClassFilter -import com.android.hoststubgen.visitors.BaseAdapter -import com.android.hoststubgen.visitors.PackageRedirectRemapper -import java.io.BufferedInputStream -import java.io.BufferedOutputStream -import java.io.FileOutputStream -import java.io.InputStream -import java.io.OutputStream -import java.io.PrintWriter -import java.util.zip.ZipEntry -import java.util.zip.ZipFile -import java.util.zip.ZipOutputStream -import org.objectweb.asm.ClassReader -import org.objectweb.asm.ClassVisitor -import org.objectweb.asm.ClassWriter -import org.objectweb.asm.commons.ClassRemapper -import org.objectweb.asm.commons.Remapper -import org.objectweb.asm.util.CheckClassAdapter - -/** - * Actual main class. - */ -class HostStubGen(val options: HostStubGenOptions) { - fun run() { - val errors = HostStubGenErrors() - val stats = HostStubGenStats() - - // Load all classes. - val allClasses = ClassNodes.loadClassStructures(options.inJar.get) - - // Dump the classes, if specified. - options.inputJarDumpFile.ifSet { - log.iTime("Dump file created at $it") { - PrintWriter(it).use { pw -> allClasses.dump(pw) } - } - } - - options.inputJarAsKeepAllFile.ifSet { - log.iTime("Dump file created at $it") { - PrintWriter(it).use { pw -> - allClasses.forEach { classNode -> - printAsTextPolicy(pw, classNode) - } - } - } - } - - // Build the filters. - val filter = buildFilter(errors, allClasses, options) - - val filterRemapper = FilterRemapper(filter) - - // Transform the jar. - convert( - options.inJar.get, - options.outJar.get, - filter, - options.enableClassChecker.get, - allClasses, - errors, - stats, - filterRemapper, - options.numShards.get, - options.shard.get, - ) - - // Dump statistics, if specified. - options.statsFile.ifSet { - log.iTime("Dump file created at $it") { - PrintWriter(it).use { pw -> stats.dumpOverview(pw) } - } - } - options.apiListFile.ifSet { - log.iTime("API list file created at $it") { - PrintWriter(it).use { pw -> - // TODO, when dumping a jar that's not framework-minus-apex.jar, we need to feed - // framework-minus-apex.jar so that we can dump inherited methods from it. - ApiDumper(pw, allClasses, null, filter).dump() - } - } - } - } - - /** - * Build the filter, which decides what classes/methods/fields should be put in stub or impl - * jars, and "how". (e.g. with substitution?) - */ - private fun buildFilter( - errors: HostStubGenErrors, - allClasses: ClassNodes, - options: HostStubGenOptions, - ): OutputFilter { - // We build a "chain" of multiple filters here. - // - // The filters are build in from "inside", meaning the first filter created here is - // the last filter used, so it has the least precedence. - // - // So, for example, the "remove" annotation, which is handled by AnnotationBasedFilter, - // can override a class-wide annotation, which is handled by - // ClassWidePolicyPropagatingFilter, and any annotations can be overridden by the - // text-file based filter, which is handled by parseTextFilterPolicyFile. - - // The first filter is for the default policy from the command line options. - var filter: OutputFilter = ConstantFilter(options.defaultPolicy.get, "default-by-options") - - // Next, we build a filter that preserves all native methods by default - filter = KeepNativeFilter(allClasses, filter) - - // Next, we need a filter that resolves "class-wide" policies. - // This is used when a member (methods, fields, nested classes) don't get any polices - // from upper filters. e.g. when a method has no annotations, then this filter will apply - // the class-wide policy, if any. (if not, we'll fall back to the above filter.) - filter = ClassWidePolicyPropagatingFilter(allClasses, filter) - - // Inject default hooks from options. - filter = DefaultHookInjectingFilter( - options.defaultClassLoadHook.get, - options.defaultMethodCallHook.get, - filter - ) - - val annotationAllowedClassesFilter = options.annotationAllowedClassesFile.get.let { file -> - if (file == null) { - ClassFilter.newNullFilter(true) // Allow all classes - } else { - ClassFilter.loadFromFile(file, false) - } - } - - // Next, Java annotation based filter. - filter = AnnotationBasedFilter( - errors, - allClasses, - options.keepAnnotations, - options.keepClassAnnotations, - options.throwAnnotations, - options.removeAnnotations, - options.ignoreAnnotations, - options.substituteAnnotations, - options.redirectAnnotations, - options.redirectionClassAnnotations, - options.classLoadHookAnnotations, - options.keepStaticInitializerAnnotations, - annotationAllowedClassesFilter, - filter - ) - - // Next, "text based" filter, which allows to override polices without touching - // the target code. - if (options.policyOverrideFiles.isNotEmpty()) { - val parser = TextFileFilterPolicyParser(allClasses, filter) - options.policyOverrideFiles.forEach(parser::parse) - filter = parser.createOutputFilter() - } - - // Apply the implicit filter. - filter = ImplicitOutputFilter(errors, allClasses, filter) - - // Add a final sanitization step. - filter = SanitizationFilter(errors, allClasses, filter) - - return filter - } - - /** - * Convert a JAR file into "stub" and "impl" JAR files. - */ - private fun convert( - inJar: String, - outJar: String?, - filter: OutputFilter, - enableChecker: Boolean, - classes: ClassNodes, - errors: HostStubGenErrors, - stats: HostStubGenStats, - remapper: Remapper?, - numShards: Int, - shard: Int - ) { - log.i("Converting %s into %s ...", inJar, outJar) - log.i("ASM CheckClassAdapter is %s", if (enableChecker) "enabled" else "disabled") - - log.iTime("Transforming jar") { - val packageRedirector = PackageRedirectRemapper(options.packageRedirects) - - var itemIndex = 0 - var numItemsProcessed = 0 - var numItems = -1 // == Unknown - - log.withIndent { - // Open the input jar file and process each entry. - ZipFile(inJar).use { inZip -> - - numItems = inZip.size() - val shardStart = numItems * shard / numShards - val shardNextStart = numItems * (shard + 1) / numShards - - maybeWithZipOutputStream(outJar) { outStream -> - val inEntries = inZip.entries() - while (inEntries.hasMoreElements()) { - val entry = inEntries.nextElement() - val inShard = (shardStart <= itemIndex) - && (itemIndex < shardNextStart) - itemIndex++ - if (!inShard) { - continue - } - convertSingleEntry( - inZip, entry, outStream, filter, - packageRedirector, remapper, enableChecker, - classes, errors, stats - ) - numItemsProcessed++ - } - log.i("Converted all entries.") - } - outJar?.let { log.i("Created: $it") } - } - } - log.i("%d / %d item(s) processed.", numItemsProcessed, numItems) - } - } - - private fun maybeWithZipOutputStream(filename: String?, block: (ZipOutputStream?) -> T): T { - if (filename == null) { - return block(null) - } - return ZipOutputStream(BufferedOutputStream(FileOutputStream(filename))).use(block) - } - - /** - * Convert a single ZIP entry, which may or may not be a class file. - */ - private fun convertSingleEntry( - inZip: ZipFile, - entry: ZipEntry, - outStream: ZipOutputStream?, - filter: OutputFilter, - packageRedirector: PackageRedirectRemapper, - remapper: Remapper?, - enableChecker: Boolean, - classes: ClassNodes, - errors: HostStubGenErrors, - stats: HostStubGenStats - ) { - log.d("Entry: %s", entry.name) - log.withIndent { - val name = entry.name - - // Just ignore all the directories. (TODO: make sure it's okay) - if (name.endsWith("/")) { - return - } - - // If it's a class, convert it. - if (name.endsWith(".class")) { - processSingleClass( - inZip, entry, outStream, filter, packageRedirector, - remapper, enableChecker, classes, errors, stats - ) - return - } - - // Handle other file types... - - // - *.uau seems to contain hidden API information. - // - *_compat_config.xml is also about compat-framework. - if (name.endsWith(".uau") || name.endsWith("_compat_config.xml")) { - log.d("Not needed: %s", entry.name) - return - } - - // Unknown type, we just copy it to both output zip files. - log.v("Copying: %s", entry.name) - outStream?.let { copyZipEntry(inZip, entry, it) } - } - } - - /** - * Copy a single ZIP entry to the output. - */ - private fun copyZipEntry( - inZip: ZipFile, - entry: ZipEntry, - out: ZipOutputStream, - ) { - // TODO: It seems like copying entries this way is _very_ slow, - // even with out.setLevel(0). Look for other ways to do it. - - inZip.getInputStream(entry).use { ins -> - // Copy unknown entries as is to the impl out. (but not to the stub out.) - val outEntry = ZipEntry(entry.name) - out.putNextEntry(outEntry) - ins.transferTo(out) - out.closeEntry() - } - } - - /** - * Convert a single class to "stub" and "impl". - */ - private fun processSingleClass( - inZip: ZipFile, - entry: ZipEntry, - outStream: ZipOutputStream?, - filter: OutputFilter, - packageRedirector: PackageRedirectRemapper, - remapper: Remapper?, - enableChecker: Boolean, - classes: ClassNodes, - errors: HostStubGenErrors, - stats: HostStubGenStats - ) { - val classInternalName = entry.name.replaceFirst("\\.class$".toRegex(), "") - val classPolicy = filter.getPolicyForClass(classInternalName) - if (classPolicy.policy == FilterPolicy.Remove) { - log.d("Removing class: %s %s", classInternalName, classPolicy) - return - } - // If we're applying a remapper, we need to rename the file too. - var newName = entry.name - remapper?.mapType(classInternalName)?.let { remappedName -> - if (remappedName != classInternalName) { - log.d("Renaming class file: %s -> %s", classInternalName, remappedName) - newName = "$remappedName.class" - } - } - - if (outStream != null) { - log.v("Creating class: %s Policy: %s", classInternalName, classPolicy) - log.withIndent { - BufferedInputStream(inZip.getInputStream(entry)).use { bis -> - val newEntry = ZipEntry(newName) - outStream.putNextEntry(newEntry) - convertClass( - classInternalName, bis, - outStream, filter, packageRedirector, remapper, - enableChecker, classes, errors, stats - ) - outStream.closeEntry() - } - } - } - } - - /** - * Convert a single class to either "stub" or "impl". - */ - private fun convertClass( - classInternalName: String, - input: InputStream, - out: OutputStream, - filter: OutputFilter, - packageRedirector: PackageRedirectRemapper, - remapper: Remapper?, - enableChecker: Boolean, - classes: ClassNodes, - errors: HostStubGenErrors, - stats: HostStubGenStats? - ) { - val cr = ClassReader(input) - - // COMPUTE_FRAMES wouldn't be happy if code uses - val flags = ClassWriter.COMPUTE_MAXS // or ClassWriter.COMPUTE_FRAMES - val cw = ClassWriter(flags) - - // Connect to the class writer - var outVisitor: ClassVisitor = cw - if (enableChecker) { - outVisitor = CheckClassAdapter(outVisitor) - } - - // Remapping should happen at the end. - remapper?.let { - outVisitor = ClassRemapper(outVisitor, remapper) - } - - val visitorOptions = BaseAdapter.Options( - errors = errors, - stats = stats, - enablePreTrace = options.enablePreTrace.get, - enablePostTrace = options.enablePostTrace.get, - ) - outVisitor = BaseAdapter.getVisitor( - classInternalName, classes, outVisitor, filter, - packageRedirector, visitorOptions - ) - - cr.accept(outVisitor, ClassReader.EXPAND_FRAMES) - val data = cw.toByteArray() - out.write(data) - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenErrors.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenErrors.kt deleted file mode 100644 index a218c5599553..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenErrors.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen - -open class HostStubGenErrors { - open fun onErrorFound(message: String) { - // TODO: For now, we just throw as soon as any error is found, but eventually we should keep - // all errors and print them at the end. - throw GeneralUserErrorException(message) - } -} \ No newline at end of file diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenLogger.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenLogger.kt deleted file mode 100644 index 4bcee409aaec..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenLogger.kt +++ /dev/null @@ -1,320 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen - -import java.io.BufferedOutputStream -import java.io.FileOutputStream -import java.io.PrintWriter -import java.io.Writer - -val log: HostStubGenLogger = HostStubGenLogger().setConsoleLogLevel(LogLevel.Info) - -/** Logging level */ -enum class LogLevel { - None, - Error, - Warn, - Info, - Verbose, - Debug, -} - -/** - * Simple logging class. - * - * By default, it has no printers set. Use [setConsoleLogLevel] or [addFilePrinter] to actually - * write log. - */ -class HostStubGenLogger { - private var indentLevel: Int = 0 - get() = field - set(value) { - field = value - indent = " ".repeat(value) - } - private var indent: String = "" - - private val printers: MutableList = mutableListOf() - - private var consolePrinter: LogPrinter? = null - - private var maxLogLevel = LogLevel.None - - private fun updateMaxLogLevel() { - maxLogLevel = LogLevel.None - - printers.forEach { - if (maxLogLevel < it.logLevel) { - maxLogLevel = it.logLevel - } - } - } - - private fun addPrinter(printer: LogPrinter) { - printers.add(printer) - updateMaxLogLevel() - } - - private fun removePrinter(printer: LogPrinter) { - printers.remove(printer) - updateMaxLogLevel() - } - - fun setConsoleLogLevel(level: LogLevel): HostStubGenLogger { - // If there's already a console log printer set, remove it, and then add a new one - consolePrinter?.let { - removePrinter(it) - } - val cp = StreamPrinter(level, PrintWriter(System.out)) - addPrinter(cp) - consolePrinter = cp - - return this - } - - fun addFilePrinter(level: LogLevel, logFilename: String): HostStubGenLogger { - addPrinter(StreamPrinter(level, PrintWriter(BufferedOutputStream( - FileOutputStream(logFilename))))) - - log.i("Log file set: $logFilename for $level") - - return this - } - - /** Flush all the printers */ - fun flush() { - printers.forEach { it.flush() } - } - - fun indent() { - indentLevel++ - } - - fun unindent() { - if (indentLevel <= 0) { - throw IllegalStateException("Unbalanced unindent() call.") - } - indentLevel-- - } - - inline fun withIndent(block: () -> T): T { - try { - indent() - return block() - } finally { - unindent() - } - } - - fun isEnabled(level: LogLevel): Boolean { - return level.ordinal <= maxLogLevel.ordinal - } - - fun println(level: LogLevel, message: String) { - if (message.isEmpty()) { - return // Don't print an empty message. - } - printers.forEach { - if (it.logLevel.ordinal >= level.ordinal) { - it.println(level, indent, message) - } - } - } - - fun println(level: LogLevel, format: String, vararg args: Any?) { - if (isEnabled(level)) { - println(level, String.format(format, *args)) - } - } - - /** Log an error. */ - fun e(message: String) { - println(LogLevel.Error, message) - } - - /** Log an error. */ - fun e(format: String, vararg args: Any?) { - println(LogLevel.Error, format, *args) - } - - /** Log a warning. */ - fun w(message: String) { - println(LogLevel.Warn, message) - } - - /** Log a warning. */ - fun w(format: String, vararg args: Any?) { - println(LogLevel.Warn, format, *args) - } - - /** Log an info message. */ - fun i(message: String) { - println(LogLevel.Info, message) - } - - /** Log an info message. */ - fun i(format: String, vararg args: Any?) { - println(LogLevel.Info, format, *args) - } - - /** Log a verbose message. */ - fun v(message: String) { - println(LogLevel.Verbose, message) - } - - /** Log a verbose message. */ - fun v(format: String, vararg args: Any?) { - println(LogLevel.Verbose, format, *args) - } - - /** Log a debug message. */ - fun d(message: String) { - println(LogLevel.Debug, message) - } - - /** Log a debug message. */ - fun d(format: String, vararg args: Any?) { - println(LogLevel.Debug, format, *args) - } - - inline fun logTime(level: LogLevel, message: String, block: () -> T): Double { - var ret: Double = -1.0 - val start = System.currentTimeMillis() - try { - block() - } finally { - val end = System.currentTimeMillis() - ret = (end - start) / 1000.0 - if (isEnabled(level)) { - println(level, - String.format("%s: took %.1f second(s).", message, (end - start) / 1000.0)) - } - } - return ret - } - - /** Do an "i" log with how long it took. */ - inline fun iTime(message: String, block: () -> T): Double { - return logTime(LogLevel.Info, message, block) - } - - /** Do a "v" log with how long it took. */ - inline fun vTime(message: String, block: () -> T): Double { - return logTime(LogLevel.Verbose, message, block) - } - - /** Do a "d" log with how long it took. */ - inline fun dTime(message: String, block: () -> T): Double { - return logTime(LogLevel.Debug, message, block) - } - - /** - * Similar to the other "xTime" methods, but the message is not supposed to be printed. - * It's only used to measure the duration with the same interface as other log methods. - */ - inline fun nTime(block: () -> T): Double { - return logTime(LogLevel.Debug, "", block) - } - - inline fun forVerbose(block: () -> Unit) { - if (isEnabled(LogLevel.Verbose)) { - block() - } - } - - inline fun forDebug(block: () -> Unit) { - if (isEnabled(LogLevel.Debug)) { - block() - } - } - - /** Return a Writer for a given log level. */ - fun getWriter(level: LogLevel): Writer { - return MultiplexingWriter(level) - } - - private inner class MultiplexingWriter(val level: LogLevel) : Writer() { - private inline fun forPrinters(callback: (LogPrinter) -> Unit) { - printers.forEach { - if (it.logLevel.ordinal >= level.ordinal) { - callback(it) - } - } - } - - override fun close() { - flush() - } - - override fun flush() { - forPrinters { - it.flush() - } - } - - override fun write(cbuf: CharArray, off: Int, len: Int) { - // TODO Apply indent - forPrinters { - it.write(cbuf, off, len) - } - } - } - - /** - * Handle log-related command line arguments. - */ - fun maybeHandleCommandLineArg(currentArg: String, nextArgProvider: () -> String): Boolean { - when (currentArg) { - "-v", "--verbose" -> setConsoleLogLevel(LogLevel.Verbose) - "-d", "--debug" -> setConsoleLogLevel(LogLevel.Debug) - "-q", "--quiet" -> setConsoleLogLevel(LogLevel.None) - "--verbose-log" -> addFilePrinter(LogLevel.Verbose, nextArgProvider()) - "--debug-log" -> addFilePrinter(LogLevel.Debug, nextArgProvider()) - else -> return false - } - return true - } -} - -private interface LogPrinter { - val logLevel: LogLevel - - fun println(logLevel: LogLevel, indent: String, message: String) - - // TODO: This should be removed once MultiplexingWriter starts applying indent, at which point - // println() should be used instead. - fun write(cbuf: CharArray, off: Int, len: Int) - - fun flush() -} - -private class StreamPrinter( - override val logLevel: LogLevel, - val out: PrintWriter, -) : LogPrinter { - override fun println(logLevel: LogLevel, indent: String, message: String) { - out.print(indent) - out.println(message) - } - - override fun write(cbuf: CharArray, off: Int, len: Int) { - out.write(cbuf, off, len) - } - - override fun flush() { - out.flush() - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenMain.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenMain.kt deleted file mode 100644 index 85064661cd2b..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenMain.kt +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -@file:JvmName("HostStubGenMain") - -package com.android.hoststubgen - -import java.io.PrintWriter - -/** - * Entry point. - */ -fun main(args: Array) { - executableName = "HostStubGen" - runMainWithBoilerplate { - // Parse the command line arguments. - var clanupOnError = false - try { - val options = HostStubGenOptions.parseArgs(args) - clanupOnError = options.cleanUpOnError.get - - log.v("$executableName started") - log.v("Options: $options") - - // Run. - HostStubGen(options).run() - } catch (e: Throwable) { - if (clanupOnError) { - TODO("Remove output jars here") - } - throw e - } - } -} - -inline fun runMainWithBoilerplate(realMain: () -> Unit) { - var success = false - - try { - realMain() - - success = true - } catch (e: Throwable) { - log.e("$executableName: Error: ${e.message}") - if (e !is UserErrorException) { - e.printStackTrace(PrintWriter(log.getWriter(LogLevel.Error))) - } - } finally { - log.i("$executableName finished") - log.flush() - } - - System.exit(if (success) 0 else 1 ) -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenOptions.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenOptions.kt deleted file mode 100644 index 55e853e3e2fb..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenOptions.kt +++ /dev/null @@ -1,384 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen - -import com.android.hoststubgen.filters.FilterPolicy -import java.io.BufferedReader -import java.io.FileReader - -/** - * A single value that can only set once. - */ -open class SetOnce(private var value: T) { - class SetMoreThanOnceException : Exception() - - private var set = false - - fun set(v: T): T { - if (set) { - throw SetMoreThanOnceException() - } - if (v == null) { - throw NullPointerException("This shouldn't happen") - } - set = true - value = v - return v - } - - val get: T - get() = this.value - - val isSet: Boolean - get() = this.set - - fun ifSet(block: (T & Any) -> R): R? { - if (isSet) { - return block(value!!) - } - return null - } - - override fun toString(): String { - return "$value" - } -} - -class IntSetOnce(value: Int) : SetOnce(value) { - fun set(v: String): Int { - try { - return this.set(v.toInt()) - } catch (e: NumberFormatException) { - throw ArgumentsException("Invalid integer $v") - } - } -} - -/** - * Options that can be set from command line arguments. - */ -class HostStubGenOptions( - /** Input jar file*/ - var inJar: SetOnce = SetOnce(""), - - /** Output jar file */ - var outJar: SetOnce = SetOnce(null), - - var inputJarDumpFile: SetOnce = SetOnce(null), - - var inputJarAsKeepAllFile: SetOnce = SetOnce(null), - - var keepAnnotations: MutableSet = mutableSetOf(), - var throwAnnotations: MutableSet = mutableSetOf(), - var removeAnnotations: MutableSet = mutableSetOf(), - var ignoreAnnotations: MutableSet = mutableSetOf(), - var keepClassAnnotations: MutableSet = mutableSetOf(), - var redirectAnnotations: MutableSet = mutableSetOf(), - - var substituteAnnotations: MutableSet = mutableSetOf(), - var redirectionClassAnnotations: MutableSet = mutableSetOf(), - var classLoadHookAnnotations: MutableSet = mutableSetOf(), - var keepStaticInitializerAnnotations: MutableSet = mutableSetOf(), - - var packageRedirects: MutableList> = mutableListOf(), - - var annotationAllowedClassesFile: SetOnce = SetOnce(null), - - var defaultClassLoadHook: SetOnce = SetOnce(null), - var defaultMethodCallHook: SetOnce = SetOnce(null), - - var policyOverrideFiles: MutableList = mutableListOf(), - - var defaultPolicy: SetOnce = SetOnce(FilterPolicy.Remove), - - var cleanUpOnError: SetOnce = SetOnce(false), - - var enableClassChecker: SetOnce = SetOnce(false), - var enablePreTrace: SetOnce = SetOnce(false), - var enablePostTrace: SetOnce = SetOnce(false), - - var statsFile: SetOnce = SetOnce(null), - - var apiListFile: SetOnce = SetOnce(null), - - var numShards: IntSetOnce = IntSetOnce(1), - var shard: IntSetOnce = IntSetOnce(0), -) { - companion object { - - private fun parsePackageRedirect(fromColonTo: String): Pair { - val colon = fromColonTo.indexOf(':') - if ((colon < 1) || (colon + 1 >= fromColonTo.length)) { - throw ArgumentsException("--package-redirect must be a colon-separated string") - } - // TODO check for duplicates - return Pair(fromColonTo.substring(0, colon), fromColonTo.substring(colon + 1)) - } - - fun parseArgs(args: Array): HostStubGenOptions { - val ret = HostStubGenOptions() - - val ai = ArgIterator.withAtFiles(args) - - var allAnnotations = mutableSetOf() - - fun ensureUniqueAnnotation(name: String): String { - if (!allAnnotations.add(name)) { - throw DuplicateAnnotationException(ai.current) - } - return name - } - - while (true) { - val arg = ai.nextArgOptional() ?: break - - // Define some shorthands... - fun nextArg(): String = ai.nextArgRequired(arg) - fun MutableSet.addUniqueAnnotationArg(): String = - nextArg().also { this += ensureUniqueAnnotation(it) } - - if (log.maybeHandleCommandLineArg(arg) { nextArg() }) { - continue - } - try { - when (arg) { - // TODO: Write help - "-h", "--help" -> TODO("Help is not implemented yet") - - "--in-jar" -> ret.inJar.set(nextArg()).ensureFileExists() - // We support both arguments because some AOSP dependencies - // still use the old argument - "--out-jar", "--out-impl-jar" -> ret.outJar.set(nextArg()) - - "--policy-override-file" -> - ret.policyOverrideFiles.add(nextArg().ensureFileExists()) - - "--clean-up-on-error" -> ret.cleanUpOnError.set(true) - "--no-clean-up-on-error" -> ret.cleanUpOnError.set(false) - - "--default-remove" -> ret.defaultPolicy.set(FilterPolicy.Remove) - "--default-throw" -> ret.defaultPolicy.set(FilterPolicy.Throw) - "--default-keep" -> ret.defaultPolicy.set(FilterPolicy.Keep) - - "--keep-annotation" -> - ret.keepAnnotations.addUniqueAnnotationArg() - - "--keep-class-annotation" -> - ret.keepClassAnnotations.addUniqueAnnotationArg() - - "--throw-annotation" -> - ret.throwAnnotations.addUniqueAnnotationArg() - - "--remove-annotation" -> - ret.removeAnnotations.addUniqueAnnotationArg() - - "--ignore-annotation" -> - ret.ignoreAnnotations.addUniqueAnnotationArg() - - "--substitute-annotation" -> - ret.substituteAnnotations.addUniqueAnnotationArg() - - "--redirect-annotation" -> - ret.redirectAnnotations.addUniqueAnnotationArg() - - "--redirection-class-annotation" -> - ret.redirectionClassAnnotations.addUniqueAnnotationArg() - - "--class-load-hook-annotation" -> - ret.classLoadHookAnnotations.addUniqueAnnotationArg() - - "--keep-static-initializer-annotation" -> - ret.keepStaticInitializerAnnotations.addUniqueAnnotationArg() - - "--package-redirect" -> - ret.packageRedirects += parsePackageRedirect(nextArg()) - - "--annotation-allowed-classes-file" -> - ret.annotationAllowedClassesFile.set(nextArg()) - - "--default-class-load-hook" -> - ret.defaultClassLoadHook.set(nextArg()) - - "--default-method-call-hook" -> - ret.defaultMethodCallHook.set(nextArg()) - - "--gen-keep-all-file" -> - ret.inputJarAsKeepAllFile.set(nextArg()) - - // Following options are for debugging. - "--enable-class-checker" -> ret.enableClassChecker.set(true) - "--no-class-checker" -> ret.enableClassChecker.set(false) - - "--enable-pre-trace" -> ret.enablePreTrace.set(true) - "--no-pre-trace" -> ret.enablePreTrace.set(false) - - "--enable-post-trace" -> ret.enablePostTrace.set(true) - "--no-post-trace" -> ret.enablePostTrace.set(false) - - "--gen-input-dump-file" -> ret.inputJarDumpFile.set(nextArg()) - - "--stats-file" -> ret.statsFile.set(nextArg()) - "--supported-api-list-file" -> ret.apiListFile.set(nextArg()) - - "--num-shards" -> ret.numShards.set(nextArg()).also { - if (it < 1) { - throw ArgumentsException("$arg must be positive integer") - } - } - "--shard-index" -> ret.shard.set(nextArg()).also { - if (it < 0) { - throw ArgumentsException("$arg must be positive integer or zero") - } - } - - else -> throw ArgumentsException("Unknown option: $arg") - } - } catch (e: SetOnce.SetMoreThanOnceException) { - throw ArgumentsException("Duplicate or conflicting argument found: $arg") - } - } - - if (!ret.inJar.isSet) { - throw ArgumentsException("Required option missing: --in-jar") - } - if (!ret.outJar.isSet) { - log.w("--out-jar is not set. $executableName will not generate jar files.") - } - if (ret.numShards.isSet != ret.shard.isSet) { - throw ArgumentsException("--num-shards and --shard-index must be used together") - } - - if (ret.numShards.isSet) { - if (ret.shard.get >= ret.numShards.get) { - throw ArgumentsException("--shard-index must be smaller than --num-shards") - } - } - - return ret - } - } - - override fun toString(): String { - return """ - HostStubGenOptions{ - inJar='$inJar', - outJar='$outJar', - inputJarDumpFile=$inputJarDumpFile, - inputJarAsKeepAllFile=$inputJarAsKeepAllFile, - keepAnnotations=$keepAnnotations, - throwAnnotations=$throwAnnotations, - removeAnnotations=$removeAnnotations, - ignoreAnnotations=$ignoreAnnotations, - keepClassAnnotations=$keepClassAnnotations, - substituteAnnotations=$substituteAnnotations, - nativeSubstituteAnnotations=$redirectionClassAnnotations, - classLoadHookAnnotations=$classLoadHookAnnotations, - keepStaticInitializerAnnotations=$keepStaticInitializerAnnotations, - packageRedirects=$packageRedirects, - annotationAllowedClassesFile=$annotationAllowedClassesFile, - defaultClassLoadHook=$defaultClassLoadHook, - defaultMethodCallHook=$defaultMethodCallHook, - policyOverrideFiles=${policyOverrideFiles.toTypedArray().contentToString()}, - defaultPolicy=$defaultPolicy, - cleanUpOnError=$cleanUpOnError, - enableClassChecker=$enableClassChecker, - enablePreTrace=$enablePreTrace, - enablePostTrace=$enablePostTrace, - statsFile=$statsFile, - apiListFile=$apiListFile, - numShards=$numShards, - shard=$shard, - } - """.trimIndent() - } -} - -class ArgIterator( - private val args: List, - private var currentIndex: Int = -1 -) { - val current: String - get() = args.get(currentIndex) - - /** - * Get the next argument, or [null] if there's no more arguments. - */ - fun nextArgOptional(): String? { - if ((currentIndex + 1) >= args.size) { - return null - } - return args.get(++currentIndex) - } - - /** - * Get the next argument, or throw if - */ - fun nextArgRequired(argName: String): String { - nextArgOptional().let { - if (it == null) { - throw ArgumentsException("Missing parameter for option $argName") - } - if (it.isEmpty()) { - throw ArgumentsException("Parameter can't be empty for option $argName") - } - return it - } - } - - companion object { - fun withAtFiles(args: Array): ArgIterator { - return ArgIterator(expandAtFiles(args)) - } - } -} - -/** - * Scan the arguments, and if any of them starts with an `@`, then load from the file - * and use its content as arguments. - * - * In this file, each line is treated as a single argument. - * - * The file can contain '#' as comments. - */ -private fun expandAtFiles(args: Array): List { - val ret = mutableListOf() - - args.forEach { arg -> - if (!arg.startsWith('@')) { - ret += arg - return@forEach - } - // Read from the file, and add each line to the result. - val filename = arg.substring(1).ensureFileExists() - - log.v("Expanding options file $filename") - - BufferedReader(FileReader(filename)).use { reader -> - while (true) { - var line = reader.readLine() - if (line == null) { - break // EOF - } - - line = normalizeTextLine(line) - if (line.isNotEmpty()) { - ret += line - } - } - } - } - return ret -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenStats.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenStats.kt deleted file mode 100644 index 9045db210495..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/HostStubGenStats.kt +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen - -import com.android.hoststubgen.asm.getOuterClassNameFromFullClassName -import com.android.hoststubgen.asm.getPackageNameFromFullClassName -import com.android.hoststubgen.filters.FilterPolicyWithReason -import org.objectweb.asm.Opcodes -import java.io.PrintWriter - -open class HostStubGenStats { - data class Stats( - var supported: Int = 0, - var total: Int = 0, - val children: MutableMap = mutableMapOf(), - ) - - private val stats = mutableMapOf() - - data class Api( - val fullClassName: String, - val methodName: String, - val methodDesc: String, - ) - - private val apis = mutableListOf() - - fun onVisitPolicyForMethod( - fullClassName: String, - methodName: String, - descriptor: String, - policy: FilterPolicyWithReason, - access: Int - ) { - if (policy.policy.isSupported) { - apis.add(Api(fullClassName, methodName, descriptor)) - } - - // Ignore methods that aren't public - if ((access and Opcodes.ACC_PUBLIC) == 0) return - // Ignore methods that are abstract - if ((access and Opcodes.ACC_ABSTRACT) != 0) return - // Ignore methods where policy isn't relevant - if (policy.isIgnoredForStats) return - - val packageName = getPackageNameFromFullClassName(fullClassName) - val className = getOuterClassNameFromFullClassName(fullClassName) - - // Ignore methods for certain generated code - if (className.endsWith("Proto") - or className.endsWith("ProtoEnums") - or className.endsWith("LogTags") - or className.endsWith("StatsLog")) { - return - } - - val packageStats = stats.getOrPut(packageName) { Stats() } - val classStats = packageStats.children.getOrPut(className) { Stats() } - - if (policy.policy.isSupported) { - packageStats.supported += 1 - classStats.supported += 1 - } - packageStats.total += 1 - classStats.total += 1 - } - - fun dumpOverview(pw: PrintWriter) { - pw.printf("PackageName,ClassName,SupportedMethods,TotalMethods\n") - stats.toSortedMap().forEach { (packageName, packageStats) -> - if (packageStats.supported > 0) { - packageStats.children.toSortedMap().forEach { (className, classStats) -> - pw.printf("%s,%s,%d,%d\n", packageName, className, - classStats.supported, classStats.total) - } - } - } - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/Utils.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/Utils.kt deleted file mode 100644 index 10179eefcb95..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/Utils.kt +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen - -/** - * Name of this executable. Set it in the main method. - */ -var executableName = "[command name not set]" - -/** - * A regex that maches whitespate. - */ -val whitespaceRegex = """\s+""".toRegex() - -/** - * Remove the comment ('#' and following) and surrounding whitespace from a line. - */ -fun normalizeTextLine(s: String): String { - // Remove # and after. (comment) - val pos = s.indexOf('#') - val uncommented = if (pos < 0) s else s.substring(0, pos) - - // Remove surrounding whitespace. - return uncommented.trim() -} - -/** - * Concatenate list [a] and [b] and return it. As an optimization, it returns an input - * [List] as-is if the other [List] is empty, so do not modify input [List]'s. - */ -fun addLists(a: List, b: List): List { - if (a.isEmpty()) { - return b - } - if (b.isEmpty()) { - return a - } - return a + b -} - -/** - * Add element [b] to list [a] if [b] is not null. Otherwise, just return [a]. - * (because the method may return [a] as-is, do not modify it after passing it.) - */ -fun addNonNullElement(a: List, b: T?): List { - if (b == null) { - return a - } - if (a.isEmpty()) { - return listOf(b) - } - return a + b -} - - -/** - * Exception for a parse error in a file - */ -class ParseException : Exception, UserErrorException { - val hasSourceInfo: Boolean - - constructor(message: String) : super(message) { - hasSourceInfo = false - } - - constructor(message: String, file: String, line: Int) : - super("$message in file $file line $line") { - hasSourceInfo = true - } - - fun withSourceInfo(filename: String, lineNo: Int): ParseException { - if (hasSourceInfo) { - return this // Already has source information. - } else { - return ParseException(this.message ?: "", filename, lineNo) - } - } -} - -/** - * Escape a string for a CSV field. - */ -fun csvEscape(value: String): String { - return "\"" + value.replace("\"", "\"\"") + "\"" -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/asm/AsmUtils.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/asm/AsmUtils.kt deleted file mode 100644 index a02082d12934..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/asm/AsmUtils.kt +++ /dev/null @@ -1,478 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.asm - -import com.android.hoststubgen.ClassParseException -import com.android.hoststubgen.HostStubGenInternalException -import org.objectweb.asm.ClassVisitor -import org.objectweb.asm.FieldVisitor -import org.objectweb.asm.MethodVisitor -import org.objectweb.asm.Opcodes -import org.objectweb.asm.Type -import org.objectweb.asm.tree.AnnotationNode -import org.objectweb.asm.tree.ClassNode -import org.objectweb.asm.tree.FieldNode -import org.objectweb.asm.tree.MethodNode - - -/** Name of the class initializer method. */ -const val CLASS_INITIALIZER_NAME = "" - -/** Descriptor of the class initializer method. */ -const val CLASS_INITIALIZER_DESC = "()V" - -/** Name of constructors. */ -const val CTOR_NAME = "" - -/** - * Find any of [set] from the list of visible / invisible annotations. - */ -fun findAnyAnnotation( - set: Set, - visibleAnnotations: List?, - invisibleAnnotations: List?, -): AnnotationNode? { - return visibleAnnotations?.find { it.desc in set } - ?: invisibleAnnotations?.find { it.desc in set } -} - -fun ClassNode.findAnyAnnotation(set: Set): AnnotationNode? { - return findAnyAnnotation(set, this.visibleAnnotations, this.invisibleAnnotations) -} - -fun MethodNode.findAnyAnnotation(set: Set): AnnotationNode? { - return findAnyAnnotation(set, this.visibleAnnotations, this.invisibleAnnotations) -} - -fun FieldNode.findAnyAnnotation(set: Set): AnnotationNode? { - return findAnyAnnotation(set, this.visibleAnnotations, this.invisibleAnnotations) -} - -fun findAllAnnotations( - set: Set, - visibleAnnotations: List?, - invisibleAnnotations: List? -): List { - return (visibleAnnotations ?: emptyList()).filter { it.desc in set } + - (invisibleAnnotations ?: emptyList()).filter { it.desc in set } -} - -fun ClassNode.findAllAnnotations(set: Set): List { - return findAllAnnotations(set, this.visibleAnnotations, this.invisibleAnnotations) -} - -fun MethodNode.findAllAnnotations(set: Set): List { - return findAllAnnotations(set, this.visibleAnnotations, this.invisibleAnnotations) -} - -fun FieldNode.findAllAnnotations(set: Set): List { - return findAllAnnotations(set, this.visibleAnnotations, this.invisibleAnnotations) -} - -fun findAnnotationValueAsObject( - an: AnnotationNode, - propertyName: String, - expectedTypeHumanReadableName: String, - converter: (Any?) -> T?, -): T? { - for (i in 0..(an.values?.size ?: 0) - 2 step 2) { - val name = an.values[i] - - if (name != propertyName) { - continue - } - val value = an.values[i + 1] - if (value == null) { - return null - } - - try { - return converter(value) - } catch (e: ClassCastException) { - throw ClassParseException( - "The type of '$propertyName' in annotation @${an.desc} must be " + - "$expectedTypeHumanReadableName, but is ${value?.javaClass?.canonicalName}") - } - } - return null -} - -fun findAnnotationValueAsString(an: AnnotationNode, propertyName: String): String? { - return findAnnotationValueAsObject(an, propertyName, "String", {it as String}) -} - -fun findAnnotationValueAsType(an: AnnotationNode, propertyName: String): Type? { - return findAnnotationValueAsObject(an, propertyName, "Class", {it as Type}) -} - - -val periodOrSlash = charArrayOf('.', '/') - -fun getPackageNameFromFullClassName(fullClassName: String): String { - val pos = fullClassName.lastIndexOfAny(periodOrSlash) - if (pos == -1) { - return "" - } else { - return fullClassName.substring(0, pos) - } -} - -fun getClassNameFromFullClassName(fullClassName: String): String { - val pos = fullClassName.lastIndexOfAny(periodOrSlash) - if (pos == -1) { - return fullClassName - } else { - return fullClassName.substring(pos + 1) - } -} - -fun getOuterClassNameFromFullClassName(fullClassName: String): String { - val start = fullClassName.lastIndexOfAny(periodOrSlash) - val end = fullClassName.indexOf('$') - if (end == -1) { - return fullClassName.substring(start + 1) - } else { - return fullClassName.substring(start + 1, end) - } -} - -/** - * If [className] is a fully qualified name, just return it. - * Otherwise, prepend [defaultPackageName]. - */ -fun resolveClassNameWithDefaultPackage(className: String, defaultPackageName: String): String { - if (className.contains('.') || className.contains('/')) { - return className - } - return "$defaultPackageName.$className" -} - -fun splitWithLastPeriod(name: String): Pair? { - val pos = name.lastIndexOf('.') - if (pos < 0) { - return null - } - return Pair(name.substring(0, pos), name.substring(pos + 1)) -} - -fun String.startsWithAny(vararg prefixes: String): Boolean { - prefixes.forEach { - if (this.startsWith(it)) { - return true - } - } - return false -} - -fun String.endsWithAny(vararg suffixes: String): Boolean { - suffixes.forEach { - if (this.endsWith(it)) { - return true - } - } - return false -} - -fun String.toJvmClassName(): String { - return this.replace('.', '/') -} - -fun String.toHumanReadableClassName(): String { - return this.replace('/', '.') -} - -fun String.toHumanReadableMethodName(): String { - return this.replace('/', '.') -} - -fun zipEntryNameToClassName(entryFilename: String): String? { - val suffix = ".class" - if (!entryFilename.endsWith(suffix)) { - return null - } - return entryFilename.substring(0, entryFilename.length - suffix.length) -} - -private val numericalInnerClassName = """.*\$\d+$""".toRegex() - -fun isAnonymousInnerClass(cn: ClassNode): Boolean { - // TODO: Is there a better way? - return cn.name.matches(numericalInnerClassName) -} - -/** - * Write bytecode to push all the method arguments to the stack. - * The number of arguments and their type are taken from [methodDescriptor]. - */ -fun writeByteCodeToPushArguments( - methodDescriptor: String, - writer: MethodVisitor, - argOffset: Int = 0, - ) { - var i = argOffset - 1 - Type.getArgumentTypes(methodDescriptor).forEach { type -> - i++ - - // See https://en.wikipedia.org/wiki/List_of_Java_bytecode_instructions - - // Note, long and double will consume two local variable spaces, so the extra `i++`. - when (type) { - Type.VOID_TYPE -> throw HostStubGenInternalException("VOID_TYPE not expected") - Type.BOOLEAN_TYPE, Type.CHAR_TYPE, Type.BYTE_TYPE, Type.SHORT_TYPE, Type.INT_TYPE - -> writer.visitVarInsn(Opcodes.ILOAD, i) - Type.FLOAT_TYPE -> writer.visitVarInsn(Opcodes.FLOAD, i) - Type.LONG_TYPE -> writer.visitVarInsn(Opcodes.LLOAD, i++) - Type.DOUBLE_TYPE -> writer.visitVarInsn(Opcodes.DLOAD, i++) - else -> writer.visitVarInsn(Opcodes.ALOAD, i) - } - } -} - -/** - * Write bytecode to "RETURN" that matches the method's return type, according to - * [methodDescriptor]. - */ -fun writeByteCodeToReturn(methodDescriptor: String, writer: MethodVisitor) { - Type.getReturnType(methodDescriptor).let { type -> - // See https://en.wikipedia.org/wiki/List_of_Java_bytecode_instructions - when (type) { - Type.VOID_TYPE -> writer.visitInsn(Opcodes.RETURN) - Type.BOOLEAN_TYPE, Type.CHAR_TYPE, Type.BYTE_TYPE, Type.SHORT_TYPE, Type.INT_TYPE - -> writer.visitInsn(Opcodes.IRETURN) - Type.FLOAT_TYPE -> writer.visitInsn(Opcodes.FRETURN) - Type.LONG_TYPE -> writer.visitInsn(Opcodes.LRETURN) - Type.DOUBLE_TYPE -> writer.visitInsn(Opcodes.DRETURN) - else -> writer.visitInsn(Opcodes.ARETURN) - } - } -} - -/** - * Given a method descriptor, insert an [argType] as the first argument to it. - */ -fun prependArgTypeToMethodDescriptor(methodDescriptor: String, classInternalName: String): String { - val returnType = Type.getReturnType(methodDescriptor) - val argTypes = Type.getArgumentTypes(methodDescriptor).toMutableList() - - argTypes.add(0, Type.getType("L" + classInternalName + ";")) - - return Type.getMethodDescriptor(returnType, *argTypes.toTypedArray()) -} - -/** - * Return the "visibility" modifier from an `access` integer. - * - * (see https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.1-200-E.1) - */ -fun getVisibilityModifier(access: Int): Int { - return access and (Opcodes.ACC_PUBLIC or Opcodes.ACC_PRIVATE or Opcodes.ACC_PROTECTED) -} - -/** - * Return true if an `access` integer is "private" or "package private". - */ -fun isVisibilityPrivateOrPackagePrivate(access: Int): Boolean { - return when (getVisibilityModifier(access)) { - 0 -> true // Package private. - Opcodes.ACC_PRIVATE -> true - else -> false - } -} - -enum class Visibility { - PRIVATE, - PACKAGE_PRIVATE, - PROTECTED, - PUBLIC; - - companion object { - fun fromAccess(access: Int): Visibility { - if ((access and Opcodes.ACC_PUBLIC) != 0) { - return PUBLIC - } - if ((access and Opcodes.ACC_PROTECTED) != 0) { - return PROTECTED - } - if ((access and Opcodes.ACC_PRIVATE) != 0) { - return PRIVATE - } - - return PACKAGE_PRIVATE - } - } -} - -fun ClassNode.isEnum(): Boolean { - return (this.access and Opcodes.ACC_ENUM) != 0 -} - -fun ClassNode.isAnnotation(): Boolean { - return (this.access and Opcodes.ACC_ANNOTATION) != 0 -} - -fun ClassNode.isSynthetic(): Boolean { - return (this.access and Opcodes.ACC_SYNTHETIC) != 0 -} - -fun MethodNode.isSynthetic(): Boolean { - return (this.access and Opcodes.ACC_SYNTHETIC) != 0 -} - -fun MethodNode.isStatic(): Boolean { - return (this.access and Opcodes.ACC_STATIC) != 0 -} - -fun MethodNode.isPublic(): Boolean { - return (this.access and Opcodes.ACC_PUBLIC) != 0 -} - -fun MethodNode.isNative(): Boolean { - return (this.access and Opcodes.ACC_NATIVE) != 0 -} - -fun MethodNode.isSpecial(): Boolean { - return CTOR_NAME == this.name || CLASS_INITIALIZER_NAME == this.name -} - -fun FieldNode.isEnum(): Boolean { - return (this.access and Opcodes.ACC_ENUM) != 0 -} - -fun FieldNode.isSynthetic(): Boolean { - return (this.access and Opcodes.ACC_SYNTHETIC) != 0 -} - -fun ClassNode.getVisibility(): Visibility { - return Visibility.fromAccess(this.access) -} - -fun MethodNode.getVisibility(): Visibility { - return Visibility.fromAccess(this.access) -} - -fun FieldNode.getVisibility(): Visibility { - return Visibility.fromAccess(this.access) -} - -/** Return the [access] flags without the visibility */ -fun clearVisibility(access: Int): Int { - return access and (Opcodes.ACC_PUBLIC or Opcodes.ACC_PROTECTED or Opcodes.ACC_PRIVATE).inv() -} - -/** Return the visibility part of the [access] flags */ -fun getVisibility(access: Int): Int { - return access and (Opcodes.ACC_PUBLIC or Opcodes.ACC_PROTECTED or Opcodes.ACC_PRIVATE) -} - - -/* - -Dump of the members of TinyFrameworkEnumSimple: - -class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple keep - field Cat keep (ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM) - field Dog keep - field $VALUES keep (ACC_PRIVATE, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC) - - method values ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; keep - ^- NOT synthetic (ACC_PUBLIC, ACC_STATIC) - method valueOf (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; keep - ^- NOT synthetic (ACC_PUBLIC, ACC_STATIC) - method (Ljava/lang/String;I)V keep - ^- NOT synthetic (ACC_PRIVATE) - - method $values ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; keep - (ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC) - method ()V keep - -Dump of the members of TinyFrameworkEnumSimple: - -class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex keep - field RED keep - field BLUE keep - field GREEN keep - field mLongName keep - field mShortName keep - field $VALUES keep - method values ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; keep - method valueOf (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; keep - method (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V keep - method getLongName ()Ljava/lang/String; keep - method getShortName ()Ljava/lang/String; keep - method $values ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; keep - method ()V keep - - */ - -fun isAutoGeneratedEnumMember(mn: MethodNode): Boolean { - if (mn.isSynthetic()) { - return true - } - if (mn.name == "" && mn.desc == "(Ljava/lang/String;I)V") { - return true - } - if (mn.name == "" && mn.desc == "()V") { - return true - } - if (mn.name == "values" && mn.desc.startsWith("()")) { - return true - } - if (mn.name == "valueOf" && mn.desc.startsWith("(Ljava/lang/String;)")) { - return true - } - - return false -} - -fun isAutoGeneratedEnumMember(fn: FieldNode): Boolean { - if (fn.isSynthetic() || fn.isEnum()) { - return true - } - return false -} - -/** - * Class to help handle [ClassVisitor], [MethodVisitor] and [FieldVisitor] in a unified way. - */ -abstract class UnifiedVisitor { - abstract fun visitAnnotation(descriptor: String, visible: Boolean) - - companion object { - fun on(target: ClassVisitor): UnifiedVisitor { - return object : UnifiedVisitor() { - override fun visitAnnotation(descriptor: String, visible: Boolean) { - target.visitAnnotation(descriptor, visible) - } - } - } - - fun on(target: MethodVisitor): UnifiedVisitor { - return object : UnifiedVisitor() { - override fun visitAnnotation(descriptor: String, visible: Boolean) { - target.visitAnnotation(descriptor, visible) - } - } - } - - fun on(target: FieldVisitor): UnifiedVisitor { - return object : UnifiedVisitor() { - override fun visitAnnotation(descriptor: String, visible: Boolean) { - target.visitAnnotation(descriptor, visible) - } - } - } - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/asm/ClassNodes.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/asm/ClassNodes.kt deleted file mode 100644 index e2647eb13ed3..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/asm/ClassNodes.kt +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.asm - -import com.android.hoststubgen.ClassParseException -import com.android.hoststubgen.InvalidJarFileException -import com.android.hoststubgen.log -import org.objectweb.asm.ClassReader -import org.objectweb.asm.tree.AnnotationNode -import org.objectweb.asm.tree.ClassNode -import org.objectweb.asm.tree.FieldNode -import org.objectweb.asm.tree.MethodNode -import org.objectweb.asm.tree.TypeAnnotationNode -import java.io.BufferedInputStream -import java.io.PrintWriter -import java.util.Arrays -import java.util.concurrent.Executors -import java.util.concurrent.TimeUnit -import java.util.concurrent.atomic.AtomicReference -import java.util.function.Consumer -import java.util.zip.ZipEntry -import java.util.zip.ZipFile - -/** - * Stores all classes loaded from a jar file, in a form of [ClassNode] - */ -class ClassNodes { - val mAllClasses: MutableMap = HashMap() - - /** - * Total number of classes registered. - */ - val size: Int - get() = mAllClasses.size - - /** Add a [ClassNode] */ - fun addClass(cn: ClassNode): Boolean { - if (mAllClasses.containsKey(cn.name)) { - return false - } - mAllClasses[cn.name.toJvmClassName()] = cn - return true - } - - /** Get a class's [ClassNodes] (which may not exist) */ - fun findClass(name: String): ClassNode? { - return mAllClasses[name.toJvmClassName()] - } - - /** Get a class's [ClassNodes] (which must exists) */ - fun getClass(name: String): ClassNode { - return findClass(name) ?: throw ClassParseException("Class $name not found") - } - - /** @return whether a class exists or not */ - fun hasClass(name: String): Boolean { - return mAllClasses.containsKey(name.toJvmClassName()) - } - - /** Find a field, which may not exist. */ - fun findField( - className: String, - fieldName: String, - ): FieldNode? { - return findClass(className)?.fields?.firstOrNull { it.name == fieldName }?.let { fn -> - return fn - } - } - - /** Find a method, which may not exist. */ - fun findMethod( - className: String, - methodName: String, - descriptor: String, - ): MethodNode? { - return findClass(className)?.methods - ?.firstOrNull { it.name == methodName && it.desc == descriptor }?.let { mn -> - return mn - } - } - - /** @return true if a class has a class initializer. */ - fun hasClassInitializer(className: String): Boolean { - return findMethod(className, CLASS_INITIALIZER_NAME, CLASS_INITIALIZER_DESC) != null - } - - /** Run the lambda on each class in alphabetical order. */ - fun forEach(consumer: (classNode: ClassNode) -> Unit) { - val keys = mAllClasses.keys.toTypedArray() - Arrays.sort(keys) - - for (name in keys) { - consumer(mAllClasses[name]!!) - } - } - - /** - * Dump all classes. - */ - fun dump(pw: PrintWriter) { - forEach { classNode -> dumpClass(pw, classNode) } - } - - private fun dumpClass(pw: PrintWriter, cn: ClassNode) { - pw.printf("Class: %s [access: %x]\n", cn.name, cn.access) - dumpAnnotations( - pw, " ", - cn.visibleTypeAnnotations, cn.invisibleTypeAnnotations, - cn.visibleAnnotations, cn.invisibleAnnotations, - ) - - for (f in cn.fields ?: emptyList()) { - pw.printf( - " Field: %s [sig: %s] [desc: %s] [access: %x]\n", - f.name, f.signature, f.desc, f.access - ) - dumpAnnotations( - pw, " ", - f.visibleTypeAnnotations, f.invisibleTypeAnnotations, - f.visibleAnnotations, f.invisibleAnnotations, - ) - } - for (m in cn.methods ?: emptyList()) { - pw.printf( - " Method: %s [sig: %s] [desc: %s] [access: %x]\n", - m.name, m.signature, m.desc, m.access - ) - dumpAnnotations( - pw, " ", - m.visibleTypeAnnotations, m.invisibleTypeAnnotations, - m.visibleAnnotations, m.invisibleAnnotations, - ) - } - } - - private fun dumpAnnotations( - pw: PrintWriter, - prefix: String, - visibleTypeAnnotations: List?, - invisibleTypeAnnotations: List?, - visibleAnnotations: List?, - invisibleAnnotations: List?, - ) { - for (an in visibleTypeAnnotations ?: emptyList()) { - pw.printf("%sTypeAnnotation(vis): %s\n", prefix, an.desc) - } - for (an in invisibleTypeAnnotations ?: emptyList()) { - pw.printf("%sTypeAnnotation(inv): %s\n", prefix, an.desc) - } - for (an in visibleAnnotations ?: emptyList()) { - pw.printf("%sAnnotation(vis): %s\n", prefix, an.desc) - if (an.values == null) { - continue - } - var i = 0 - while (i < an.values.size - 1) { - pw.printf("%s - %s -> %s \n", prefix, an.values[i], an.values[i + 1]) - i += 2 - } - } - for (an in invisibleAnnotations ?: emptyList()) { - pw.printf("%sAnnotation(inv): %s\n", prefix, an.desc) - if (an.values == null) { - continue - } - var i = 0 - while (i < an.values.size - 1) { - pw.printf("%s - %s -> %s \n", prefix, an.values[i], an.values[i + 1]) - i += 2 - } - } - } - - companion object { - /** - * Load all the classes, without code. - */ - fun loadClassStructures( - inJar: String, - timeCollector: Consumer? = null, - ): ClassNodes { - val allClasses = ClassNodes() - - // Load classes in parallel. - val executor = Executors.newFixedThreadPool(4) - - // First exception defected. - val exception = AtomicReference() - - // Called on a BG thread. Read a single jar entry and add it to [allClasses]. - fun parseClass(inZip: ZipFile, entry: ZipEntry) { - try { - inZip.getInputStream(entry).use { ins -> - val cr = ClassReader(BufferedInputStream(ins)) - val cn = ClassNode() - cr.accept( - cn, ClassReader.SKIP_CODE - or ClassReader.SKIP_DEBUG - or ClassReader.SKIP_FRAMES - ) - synchronized(allClasses) { - if (!allClasses.addClass(cn)) { - log.w("Duplicate class found: ${cn.name}") - } - } - } - } catch (e: Throwable) { - log.e("Failed to load class: $e") - exception.compareAndSet(null, e) - } - } - - // Actually open the jar and read it on worker threads. - val time = log.iTime("Reading class structure from $inJar") { - log.withIndent { - ZipFile(inJar).use { inZip -> - val inEntries = inZip.entries() - - while (inEntries.hasMoreElements()) { - val entry = inEntries.nextElement() - - if (entry.name.endsWith(".class")) { - executor.submit { - parseClass(inZip, entry) - } - } else if (entry.name.endsWith(".dex")) { - // Seems like it's an ART jar file. We can't process it. - // It's a fatal error. - throw InvalidJarFileException( - "$inJar is not a desktop jar file." - + " It contains a *.dex file." - ) - } else { - // Unknown file type. Skip. - } - } - // Wait for all the work to complete. (must do it before closing the zip) - log.i("Waiting for all loaders to finish...") - executor.shutdown() - executor.awaitTermination(5, TimeUnit.MINUTES) - log.i("All loaders to finished.") - } - } - - // If any exception is detected, throw it. - exception.get()?.let { - throw it - } - - if (allClasses.size == 0) { - log.w("$inJar contains no *.class files.") - } else { - log.i("Loaded ${allClasses.size} classes from $inJar.") - } - } - timeCollector?.accept(time) - return allClasses - } - } -} \ No newline at end of file diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/dumper/ApiDumper.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/dumper/ApiDumper.kt deleted file mode 100644 index 5e4e70f0cbaa..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/dumper/ApiDumper.kt +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.dumper - -import com.android.hoststubgen.asm.CLASS_INITIALIZER_NAME -import com.android.hoststubgen.asm.CTOR_NAME -import com.android.hoststubgen.asm.ClassNodes -import com.android.hoststubgen.asm.getClassNameFromFullClassName -import com.android.hoststubgen.asm.getPackageNameFromFullClassName -import com.android.hoststubgen.asm.toHumanReadableClassName -import com.android.hoststubgen.csvEscape -import com.android.hoststubgen.filters.FilterPolicy -import com.android.hoststubgen.filters.FilterPolicyWithReason -import com.android.hoststubgen.filters.OutputFilter -import com.android.hoststubgen.log -import org.objectweb.asm.Type -import org.objectweb.asm.tree.ClassNode -import java.io.PrintWriter - -/** - * Dump all the API methods in [classes], with inherited methods, with their policies. - */ -class ApiDumper( - val pw: PrintWriter, - val classes: ClassNodes, - val frameworkClasses: ClassNodes?, - val filter: OutputFilter, -) { - private data class MethodKey( - val name: String, - val descriptor: String, - ) - - private val javaStandardApiPolicy = FilterPolicy.Keep.withReason("Java standard API") - - private val shownMethods = mutableSetOf() - - /** - * Do the dump. - */ - fun dump() { - pw.printf("PackageName,ClassName,FromSubclass,DeclareClass,MethodName,MethodDesc" + - ",Supported,Policy,Reason\n") - - classes.forEach { classNode -> - shownMethods.clear() - dump(classNode, classNode) - } - } - - private fun dumpMethod( - classPackage: String, - className: String, - isSuperClass: Boolean, - methodClassName: String, - methodName: String, - methodDesc: String, - policy: FilterPolicyWithReason, - ) { - pw.printf( - "%s,%s,%d,%s,%s,%s,%d,%s,%s\n", - csvEscape(classPackage), - csvEscape(className), - if (isSuperClass) { 1 } else { 0 }, - csvEscape(methodClassName), - csvEscape(methodName), - csvEscape(methodDesc), - if (policy.policy.isSupported) { 1 } else { 0 }, - policy.policy, - csvEscape(policy.reason), - ) - } - - private fun isDuplicate(methodName: String, methodDesc: String): Boolean { - val methodKey = MethodKey(methodName, methodDesc) - - if (shownMethods.contains(methodKey)) { - return true - } - shownMethods.add(methodKey) - return false - } - - private fun dump( - dumpClass: ClassNode, - methodClass: ClassNode, - ) { - val pkg = getPackageNameFromFullClassName(dumpClass.name).toHumanReadableClassName() - val cls = getClassNameFromFullClassName(dumpClass.name).toHumanReadableClassName() - - val isSuperClass = dumpClass != methodClass - - methodClass.methods?.sortedWith(compareBy({ it.name }, { it.desc }))?.forEach { method -> - - // Don't print ctor's from super classes. - if (isSuperClass) { - if (CTOR_NAME == method.name || CLASS_INITIALIZER_NAME == method.name) { - return@forEach - } - } - // If we already printed the method from a subclass, don't print it. - if (isDuplicate(method.name, method.desc)) { - return@forEach - } - - val policy = filter.getPolicyForMethod(methodClass.name, method.name, method.desc) - - // Let's skip "Remove" APIs. Ideally we want to print it, just to make the CSV - // complete, we still need to hide methods substituted (== @RavenwoodReplace) methods - // and for now we don't have an easy way to detect it. - if (policy.policy == FilterPolicy.Remove) { - return@forEach - } - - val renameTo = filter.getRenameTo(methodClass.name, method.name, method.desc) - - dumpMethod(pkg, cls, isSuperClass, methodClass.name.toHumanReadableClassName(), - renameTo ?: method.name, method.desc, policy) - } - - // Dump super class methods. - dumpSuper(dumpClass, methodClass.superName) - - // Dump interface methods (which may have default methods). - methodClass.interfaces?.sorted()?.forEach { interfaceName -> - dumpSuper(dumpClass, interfaceName) - } - } - - /** - * Dump a given super class / interface. - */ - private fun dumpSuper( - dumpClass: ClassNode, - methodClassName: String, - ) { - classes.findClass(methodClassName)?.let { methodClass -> - dump(dumpClass, methodClass) - return - } - frameworkClasses?.findClass(methodClassName)?.let { methodClass -> - dump(dumpClass, methodClass) - return - } - if (methodClassName.startsWith("java/") || - methodClassName.startsWith("javax/") - ) { - dumpStandardClass(dumpClass, methodClassName) - return - } - log.w("Super class or interface $methodClassName (used by ${dumpClass.name}) not found.") - } - - /** - * Dump methods from Java standard classes. - */ - private fun dumpStandardClass( - dumpClass: ClassNode, - methodClassName: String, - ) { - val pkg = getPackageNameFromFullClassName(dumpClass.name).toHumanReadableClassName() - val cls = getClassNameFromFullClassName(dumpClass.name).toHumanReadableClassName() - - val methodClassName = methodClassName.toHumanReadableClassName() - - try { - val clazz = Class.forName(methodClassName) - - // Method.getMethods() returns only public methods, but with inherited ones. - // Method.getDeclaredMethods() returns private methods too, but no inherited methods. - // - // Since we're only interested in public ones, just use getMethods(). - clazz.methods.forEach { method -> - val methodName = method.name - val methodDesc = Type.getMethodDescriptor(method) - - // If we already printed the method from a subclass, don't print it. - if (isDuplicate(methodName, methodDesc)) { - return@forEach - } - - dumpMethod(pkg, cls, true, methodClassName, - methodName, methodDesc, javaStandardApiPolicy) - } - } catch (e: ClassNotFoundException) { - log.w("JVM type $methodClassName (used by ${dumpClass.name}) not found.") - } - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/AndroidHeuristicsFilter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/AndroidHeuristicsFilter.kt deleted file mode 100644 index 6b360b79c327..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/AndroidHeuristicsFilter.kt +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -import com.android.hoststubgen.asm.ClassNodes - -/** - * Filter that deals with Android specific heuristics. - */ -class AndroidHeuristicsFilter( - private val classes: ClassNodes, - val aidlPolicy: FilterPolicyWithReason?, - val featureFlagsPolicy: FilterPolicyWithReason?, - val syspropsPolicy: FilterPolicyWithReason?, - val rFilePolicy: FilterPolicyWithReason?, - fallback: OutputFilter -) : DelegatingFilter(fallback) { - override fun getPolicyForClass(className: String): FilterPolicyWithReason { - if (aidlPolicy != null && classes.isAidlClass(className)) { - return aidlPolicy - } - if (featureFlagsPolicy != null && classes.isFeatureFlagsClass(className)) { - return featureFlagsPolicy - } - if (syspropsPolicy != null && classes.isSyspropsClass(className)) { - return syspropsPolicy - } - if (rFilePolicy != null && classes.isRClass(className)) { - return rFilePolicy - } - return super.getPolicyForClass(className) - } -} - -/** - * @return if a given class "seems like" an AIDL (top-level) class. - */ -private fun ClassNodes.isAidlClass(className: String): Boolean { - return hasClass(className) && - hasClass("$className\$Stub") && - hasClass("$className\$Stub\$Proxy") -} - -/** - * Effectively apply @RavenwoodKeepWholeClass to all classes with these names - * - * @return if a given class "seems like" an feature flags class. - */ -private fun ClassNodes.isFeatureFlagsClass(className: String): Boolean { - // Matches template classes defined here: - // https://cs.android.com/android/platform/superproject/+/master:build/make/tools/aconfig/templates/ - return className.endsWith("/Flags") - || className.endsWith("/FeatureFlags") - || className.endsWith("/FeatureFlagsImpl") - || className.endsWith("/CustomFeatureFlags") - || className.endsWith("/FakeFeatureFlagsImpl"); -} - -/** - * @return if a given class "seems like" a sysprops class. - */ -private fun ClassNodes.isSyspropsClass(className: String): Boolean { - // Matches template classes defined here: - // https://cs.android.com/android/platform/superproject/main/+/main:system/tools/sysprop/ - return className.startsWith("android/sysprop/") - && className.endsWith("Properties") -} - -/** - * @return if a given class "seems like" an R class or its nested classes. - */ -private fun ClassNodes.isRClass(className: String): Boolean { - return className.endsWith("/R") || className.contains("/R$") -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/AnnotationBasedFilter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/AnnotationBasedFilter.kt deleted file mode 100644 index 36adf0626415..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/AnnotationBasedFilter.kt +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -import com.android.hoststubgen.ClassParseException -import com.android.hoststubgen.HostStubGenErrors -import com.android.hoststubgen.InvalidAnnotationException -import com.android.hoststubgen.addLists -import com.android.hoststubgen.asm.CLASS_INITIALIZER_DESC -import com.android.hoststubgen.asm.CLASS_INITIALIZER_NAME -import com.android.hoststubgen.asm.ClassNodes -import com.android.hoststubgen.asm.findAllAnnotations -import com.android.hoststubgen.asm.findAnnotationValueAsString -import com.android.hoststubgen.asm.findAnyAnnotation -import com.android.hoststubgen.asm.getPackageNameFromFullClassName -import com.android.hoststubgen.asm.resolveClassNameWithDefaultPackage -import com.android.hoststubgen.asm.toHumanReadableClassName -import com.android.hoststubgen.asm.toHumanReadableMethodName -import com.android.hoststubgen.asm.toJvmClassName -import com.android.hoststubgen.log -import com.android.hoststubgen.utils.ClassFilter -import org.objectweb.asm.tree.AnnotationNode -import org.objectweb.asm.tree.ClassNode - -// TODO: Detect invalid cases, such as... -// - Class's visibility is lower than the members'. - -/** - * [OutputFilter] using Java annotations. - */ -class AnnotationBasedFilter( - private val errors: HostStubGenErrors, - private val classes: ClassNodes, - keepAnnotations_: Set, - keepClassAnnotations_: Set, - throwAnnotations_: Set, - removeAnnotations_: Set, - ignoreAnnotations_: Set, - substituteAnnotations_: Set, - redirectAnnotations_: Set, - redirectionClassAnnotations_: Set, - classLoadHookAnnotations_: Set, - keepStaticInitializerAnnotations_: Set, - private val annotationAllowedClassesFilter: ClassFilter, - fallback: OutputFilter, -) : DelegatingFilter(fallback) { - private val keepAnnotations = convertToInternalNames(keepAnnotations_) - private val keepClassAnnotations = convertToInternalNames(keepClassAnnotations_) - private val throwAnnotations = convertToInternalNames(throwAnnotations_) - private val removeAnnotations = convertToInternalNames(removeAnnotations_) - private val ignoreAnnotations = convertToInternalNames(ignoreAnnotations_) - private val redirectAnnotations = convertToInternalNames(redirectAnnotations_) - private val substituteAnnotations = convertToInternalNames(substituteAnnotations_) - private val redirectionClassAnnotations = - convertToInternalNames(redirectionClassAnnotations_) - private val classLoadHookAnnotations = convertToInternalNames(classLoadHookAnnotations_) - private val keepStaticInitializerAnnotations = - convertToInternalNames(keepStaticInitializerAnnotations_) - - /** Annotations that control API visibility. */ - private val visibilityAnnotations = keepAnnotations + - keepClassAnnotations + - throwAnnotations + - removeAnnotations + - ignoreAnnotations + - redirectAnnotations + - substituteAnnotations - - /** All the annotations we use. */ - private val allAnnotations = visibilityAnnotations + - redirectionClassAnnotations + - classLoadHookAnnotations + - keepStaticInitializerAnnotations - - /** - * All the annotations we use. Note, this one is in a [convertToJvmNames] format unlike - * other ones, because of how it's used. - */ - private val allAnnotationClasses: Set = convertToJvmNames( - keepAnnotations_ + - keepClassAnnotations_ + - throwAnnotations_ + - removeAnnotations_ + - redirectAnnotations_ + - substituteAnnotations_ + - redirectionClassAnnotations_ + - classLoadHookAnnotations_ + - keepStaticInitializerAnnotations_ - ) - - private val policyCache = mutableMapOf() - - private val AnnotationNode.policy: FilterPolicyWithReason? get() { - return when (desc) { - in keepAnnotations -> FilterPolicy.Keep.withReason(REASON_ANNOTATION) - in keepClassAnnotations -> FilterPolicy.KeepClass.withReason(REASON_CLASS_ANNOTATION) - in substituteAnnotations -> FilterPolicy.Substitute.withReason(REASON_ANNOTATION) - in throwAnnotations -> FilterPolicy.Throw.withReason(REASON_ANNOTATION) - in removeAnnotations -> FilterPolicy.Remove.withReason(REASON_ANNOTATION) - in ignoreAnnotations -> FilterPolicy.Ignore.withReason(REASON_ANNOTATION) - in redirectAnnotations -> FilterPolicy.Redirect.withReason(REASON_ANNOTATION) - else -> null - } - } - - private fun getAnnotationPolicy(cn: ClassNode): ClassAnnotations { - return policyCache.getOrPut(cn.name) { ClassAnnotations(cn) } - } - - override fun getPolicyForClass(className: String): FilterPolicyWithReason { - // If it's any of the annotations, then always keep it. - if (allAnnotationClasses.contains(className)) { - return FilterPolicy.KeepClass.withReason("HostStubGen Annotation") - } - - val cn = classes.getClass(className) - return getAnnotationPolicy(cn).classPolicy ?: super.getPolicyForClass(className) - } - - override fun getPolicyForField(className: String, fieldName: String): FilterPolicyWithReason { - val cn = classes.getClass(className) - return getAnnotationPolicy(cn).fieldPolicies[fieldName] - ?: super.getPolicyForField(className, fieldName) - } - - override fun getPolicyForMethod( - className: String, - methodName: String, - descriptor: String - ): FilterPolicyWithReason { - val cn = classes.getClass(className) - return getAnnotationPolicy(cn).methodPolicies[MethodKey(methodName, descriptor)] - ?: super.getPolicyForMethod(className, methodName, descriptor) - } - - override fun getRenameTo( - className: String, - methodName: String, - descriptor: String - ): String? { - val cn = classes.getClass(className) - return getAnnotationPolicy(cn).renamedMethods[MethodKey(methodName, descriptor)] - ?: super.getRenameTo(className, methodName, descriptor) - } - - override fun getRedirectionClass(className: String): String? { - val cn = classes.getClass(className) - return getAnnotationPolicy(cn).redirectionClass - } - - override fun getClassLoadHooks(className: String): List { - val cn = classes.getClass(className) - return addLists(super.getClassLoadHooks(className), getAnnotationPolicy(cn).classLoadHooks) - } - - private data class MethodKey(val name: String, val desc: String) - - /** - * Every time we see a class, we scan all its methods for substitution attributes, - * and compute (implicit) policies caused by them. - * - * For example, for the following methods: - * - * @Substitute(suffix = "_host") - * private void foo() { - * // This isn't supported on the host side. - * } - * private void foo_host() { - * // Host side implementation - * } - * - * We internally handle them as: - * - * foo() -> Substitute - * foo_host() -> Stub, and then rename it to foo(). - */ - private inner class ClassAnnotations(cn: ClassNode) { - - val classPolicy: FilterPolicyWithReason? - val fieldPolicies = mutableMapOf() - val methodPolicies = mutableMapOf() - val renamedMethods = mutableMapOf() - val redirectionClass: String? - val classLoadHooks: List - - init { - val allowAnnotation = annotationAllowedClassesFilter.matches(cn.name) - detectInvalidAnnotations( - cn.name, allowAnnotation, - cn.visibleAnnotations, cn.invisibleAnnotations, - "class", cn.name - ) - classPolicy = cn.findAnyAnnotation(visibilityAnnotations)?.policy - redirectionClass = cn.findAnyAnnotation(redirectionClassAnnotations)?.let { an -> - getAnnotationField(an, "value")?.let { resolveRelativeClass(cn, it) } - } - classLoadHooks = cn.findAllAnnotations(classLoadHookAnnotations).mapNotNull { an -> - getAnnotationField(an, "value")?.toHumanReadableMethodName() - } - if (cn.findAnyAnnotation(keepStaticInitializerAnnotations) != null) { - methodPolicies[MethodKey(CLASS_INITIALIZER_NAME, CLASS_INITIALIZER_DESC)] = - FilterPolicy.Keep.withReason(REASON_ANNOTATION) - } - - for (fn in cn.fields ?: emptyList()) { - detectInvalidAnnotations( - cn.name, allowAnnotation, - fn.visibleAnnotations, fn.invisibleAnnotations, - "field", cn.name, fn.name - ) - fn.findAnyAnnotation(visibilityAnnotations)?.policy?.let { - fieldPolicies[fn.name] = it - } - } - - for (mn in cn.methods ?: emptyList()) { - detectInvalidAnnotations( - cn.name, allowAnnotation, - mn.visibleAnnotations, mn.invisibleAnnotations, - "method", cn.name, mn.name, mn.desc - ) - - val an = mn.findAnyAnnotation(visibilityAnnotations) ?: continue - val policy = an.policy ?: continue - methodPolicies[MethodKey(mn.name, mn.desc)] = policy - - if (policy.policy != FilterPolicy.Substitute) continue - - // Handle substitution - val suffix = getAnnotationField(an, "suffix", false) ?: "\$ravenwood" - val replacement = mn.name + suffix - - if (replacement == mn.name) { - errors.onErrorFound("@SubstituteWith require a different name") - } else { - // The replacement method has to be renamed - methodPolicies[MethodKey(replacement, mn.desc)] = - FilterPolicy.Keep.withReason(REASON_ANNOTATION) - renamedMethods[MethodKey(replacement, mn.desc)] = mn.name - - log.v("Substitution found: %s%s -> %s", replacement, mn.desc, mn.name) - } - } - } - - /** - * Throw if an item has more than one visibility annotations, or the class is not allowed - * - * name1 - 4 are only used in exception messages. We take them as separate strings - * to avoid unnecessary string concatenations. - */ - private fun detectInvalidAnnotations( - className: String, - allowAnnotation: Boolean, - visibles: List?, - invisibles: List?, - type: String, - name1: String, - name2: String = "", - name3: String = "", - ) { - var count = 0 - var visibleCount = 0 - for (an in visibles ?: emptyList()) { - if (visibilityAnnotations.contains(an.desc)) { - visibleCount++ - } - if (allAnnotations.contains(an.desc)) { - count++ - } - } - for (an in invisibles ?: emptyList()) { - if (visibilityAnnotations.contains(an.desc)) { - visibleCount++ - } - if (allAnnotations.contains(an.desc)) { - count++ - } - } - if (count > 0 && !allowAnnotation) { - throw InvalidAnnotationException( - "Class ${className.toHumanReadableClassName()} is not allowed to have " + - "Ravenwood annotations. Contact g/ravenwood for more details." - ) - } - if (visibleCount > 1) { - val description = if (name2 == "" && name3 == "") { - "$type $name1" - } else { - "$type $name1.$name2$name3" - } - throw InvalidAnnotationException( - "Found more than one visibility annotations on $description" - ) - } - } - - /** - * Return the (String) value of 'value' parameter from an annotation. - */ - private fun getAnnotationField( - an: AnnotationNode, - name: String, - required: Boolean = true - ): String? { - try { - val suffix = findAnnotationValueAsString(an, name) - if (suffix == null && required) { - errors.onErrorFound("Annotation \"${an.desc}\" must have field $name") - } - return suffix - } catch (e: ClassParseException) { - errors.onErrorFound(e.message!!) - return null - } - } - - /** - * Resolve the full class name if the class is relative - */ - private fun resolveRelativeClass( - cn: ClassNode, - name: String - ): String { - val packageName = getPackageNameFromFullClassName(cn.name) - return resolveClassNameWithDefaultPackage(name, packageName).toJvmClassName() - } - } - - companion object { - private const val REASON_ANNOTATION = "annotation" - private const val REASON_CLASS_ANNOTATION = "class-annotation" - - /** - * Convert from human-readable type names (e.g. "com.android.TypeName") to the internal type - * names (e.g. "Lcom/android/TypeName). - */ - private fun convertToInternalNames(input: Set): Set { - val ret = mutableSetOf() - input.forEach { ret.add("L" + it.toJvmClassName() + ";") } - return ret - } - - /** - * Convert from human-readable type names to JVM type names. - */ - private fun convertToJvmNames(input: Set): Set { - val ret = mutableSetOf() - input.forEach { ret.add(it.toJvmClassName()) } - return ret - } - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/ClassWidePolicyPropagatingFilter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/ClassWidePolicyPropagatingFilter.kt deleted file mode 100644 index f8bb526d0a86..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/ClassWidePolicyPropagatingFilter.kt +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -import com.android.hoststubgen.asm.ClassNodes - -/** - * This is used as the second last fallback filter. This filter propagates the class-wide policy - * (obtained from [outermostFilter]) to the fields and methods. - */ -class ClassWidePolicyPropagatingFilter( - private val classes: ClassNodes, - fallback: OutputFilter -) : DelegatingFilter(fallback) { - - /** - * We don't use ClassNode.outerClass, because it gives as the top-level - * outer class (A$B$C -> A), not the direct outer class (A$B$C -> A$B). - * - * Sometimes a class name includes `$`, but is not as a nested class name separator - * (e.g. a class name like `MyClass$$`). In this case, `MyClass$` is not actually a class. - * - * So before getting the class policy on a nonexistent class, which may cause an - * incorrect result, we make sure the class actually exists. - */ - private fun getDirectOuterClass(className: String): String? { - var currentClass = className - while (true) { - val pos = currentClass.lastIndexOf('$') - if (pos < 0) { - return null - } - currentClass = currentClass.substring(0, pos) - if (classes.hasClass(currentClass)) { - return currentClass - } - } - } - - private fun getClassWidePolicy(className: String, resolve: Boolean): FilterPolicyWithReason? { - outermostFilter.getPolicyForClass(className).let { policy -> - if (policy.policy == FilterPolicy.KeepClass) { - val p = if (resolve) { - policy.policy.resolveClassWidePolicy() - } else { - policy.policy - } - - return p.withReason(policy.reason) - .wrapReason("class-wide in $className") - } - // If the class's policy is remove, then remove it. - if (policy.policy == FilterPolicy.Remove) { - return FilterPolicy.Remove.withReason("class-wide in $className") - } - } - return null - } - - override fun getPolicyForClass(className: String): FilterPolicyWithReason { - // If the class name is `a.b.c.A$B$C`, then we try to get the class wide policy - // from a.b.c.A$B$C, then a.b.c.A$B, and then a.b.c.A, recursively - return getDirectOuterClass(className)?.let { getClassWidePolicy(it, resolve = false) } - ?: super.getPolicyForClass(className) - } - - override fun getPolicyForField(className: String, fieldName: String): FilterPolicyWithReason { - return getClassWidePolicy(className, resolve = true) - ?: super.getPolicyForField(className, fieldName) - } - - override fun getPolicyForMethod( - className: String, - methodName: String, - descriptor: String - ): FilterPolicyWithReason { - return getClassWidePolicy(className, resolve = true) - ?: super.getPolicyForMethod(className, methodName, descriptor) - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/ConstantFilter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/ConstantFilter.kt deleted file mode 100644 index be3c59c80152..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/ConstantFilter.kt +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -import com.android.hoststubgen.HostStubGenInternalException - - -/** - * [OutputFilter] with a given policy. Used to represent the default policy. - * - * This is used as the last fallback filter. - * - * @param policy the policy. Cannot be a "substitute" policy. - */ -class ConstantFilter( - policy: FilterPolicy, - private val reason: String -) : OutputFilter() { - - private val classPolicy: FilterPolicy - private val fieldPolicy: FilterPolicy - private val methodPolicy: FilterPolicy - - init { - if (!policy.isUsableWithDefault) { - throw HostStubGenInternalException("ConstantFilter doesn't support $policy.") - } - methodPolicy = policy - - // If the default policy is "throw", we convert it to "keep" for classes and fields. - classPolicy = when (policy) { - FilterPolicy.Throw -> FilterPolicy.Keep - else -> policy - } - fieldPolicy = classPolicy - } - - override fun getPolicyForClass(className: String): FilterPolicyWithReason { - return classPolicy.withReason(reason) - } - - override fun getPolicyForField(className: String, fieldName: String): FilterPolicyWithReason { - return fieldPolicy.withReason(reason) - } - - override fun getPolicyForMethod( - className: String, - methodName: String, - descriptor: String, - ): FilterPolicyWithReason { - return methodPolicy.withReason(reason) - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/DefaultHookInjectingFilter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/DefaultHookInjectingFilter.kt deleted file mode 100644 index d771003a955d..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/DefaultHookInjectingFilter.kt +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -import com.android.hoststubgen.addLists - -class DefaultHookInjectingFilter( - defaultClassLoadHook: String?, - defaultMethodCallHook: String?, - fallback: OutputFilter -) : DelegatingFilter(fallback) { - /** - * Create a List containing a single element [e], if e != null. Otherwise, returns - * an empty list. - */ - private fun toSingleList(e: String?): List { - if (e == null) { - return emptyList() - } - return listOf(e) - } - - private val defaultClassLoadHookAsList: List = toSingleList(defaultClassLoadHook) - private val defaultMethodCallHookAsList: List = toSingleList(defaultMethodCallHook) - - override fun getClassLoadHooks(className: String): List { - return addLists(super.getClassLoadHooks(className), defaultClassLoadHookAsList) - } - - override fun getMethodCallHooks( - className: String, - methodName: String, - descriptor: String - ): List { - return addLists( - super.getMethodCallHooks(className, methodName, descriptor), - defaultMethodCallHookAsList, - ) - } -} \ No newline at end of file diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/DelegatingFilter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/DelegatingFilter.kt deleted file mode 100644 index b8b0d8a31268..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/DelegatingFilter.kt +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -/** - * Base class for an [OutputFilter] that uses another filter as a fallback. - */ -abstract class DelegatingFilter( - // fallback shouldn't be used by subclasses directly, so make it private. - // They should instead be calling into `super` or `outermostFilter`. - private val fallback: OutputFilter -) : OutputFilter() { - init { - fallback.outermostFilter = this - } - - /** - * Returns the outermost filter in a filter chain. - * - * When methods in a subclass needs to refer to a policy on an item (class, fields, methods) - * that are not the "subject" item -- e.g. - * in [ClassWidePolicyPropagatingFilter.getPolicyForField], when it checks the - * class policy -- [outermostFilter] must be used, rather than the super's method. - * The former will always return the correct policy, but the later won't consult outer - * filters than the current filter. - */ - override var outermostFilter: OutputFilter = this - get() = field - set(value) { - field = value - // Propagate to the inner filters. - fallback.outermostFilter = value - } - - override fun getPolicyForClass(className: String): FilterPolicyWithReason { - return fallback.getPolicyForClass(className) - } - - override fun getPolicyForField( - className: String, - fieldName: String - ): FilterPolicyWithReason { - return fallback.getPolicyForField(className, fieldName) - } - - override fun getPolicyForMethod( - className: String, - methodName: String, - descriptor: String - ): FilterPolicyWithReason { - return fallback.getPolicyForMethod(className, methodName, descriptor) - } - - override fun getRenameTo( - className: String, - methodName: String, - descriptor: String - ): String? { - return fallback.getRenameTo(className, methodName, descriptor) - } - - override fun getRedirectionClass(className: String): String? { - return fallback.getRedirectionClass(className) - } - - override fun getClassLoadHooks(className: String): List { - return fallback.getClassLoadHooks(className) - } - - override fun getMethodCallHooks( - className: String, - methodName: String, - descriptor: String - ): List { - return fallback.getMethodCallHooks(className, methodName, descriptor) - } - - override fun remapType(className: String): String? { - return fallback.remapType(className) - } - - override fun hasAnyMethodCallReplace(): Boolean { - return fallback.hasAnyMethodCallReplace() - } - - override fun getMethodCallReplaceTo( - callerClassName: String, - callerMethodName: String, - className: String, - methodName: String, - descriptor: String, - ): MethodReplaceTarget? { - return fallback.getMethodCallReplaceTo( - callerClassName, callerMethodName, className, methodName, descriptor) - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicy.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicy.kt deleted file mode 100644 index 2f2f81b05ad1..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicy.kt +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -enum class FilterPolicy { - /** - * Keep the item in the jar file. - */ - Keep, - - /** - * Only usable with classes. Keep the class in the jar, and also all its members. - * Each member can have another policy to override it. - */ - KeepClass, - - /** - * Only usable with methods. Replace a method with a "substitution" method. - */ - Substitute, - - /** - * Only usable with methods. Redirect a method to a method in the substitution class. - */ - Redirect, - - /** - * Only usable with methods. The item will be kept in the impl jar file, but when called, - * it'll throw. - */ - Throw, - - /** - * Only usable with methods. The item will be kept in the impl jar file, but when called, - * it'll no-op. - */ - Ignore, - - /** - * Remove the item completely. - */ - Remove; - - val needsInOutput: Boolean - get() { - return when (this) { - Remove -> false - else -> true - } - } - - /** Returns whether a policy can be used with classes */ - val isUsableWithClasses: Boolean - get() { - return when (this) { - Keep, KeepClass, Remove -> true - else -> false - } - } - - /** Returns whether a policy can be used with fields. */ - val isUsableWithFields: Boolean - get() { - return when (this) { - Keep, Remove -> true - else -> false - } - } - - /** Returns whether a policy can be used with methods */ - val isUsableWithMethods: Boolean - get() { - return when (this) { - KeepClass -> false - else -> true - } - } - - /** Returns whether a policy can be used as default policy. */ - val isUsableWithDefault: Boolean - get() { - return when (this) { - Keep, Throw, Remove -> true - else -> false - } - } - - /** Returns whether a policy is considered supported. */ - val isSupported: Boolean - get() { - return when (this) { - Keep, KeepClass, Substitute, Redirect -> true - else -> false - } - } - - val isMethodRewriteBody: Boolean - get() { - return when (this) { - Redirect, Throw, Ignore -> true - else -> false - } - } - - /** - * Convert KeepClass to Keep, or return itself. - */ - fun resolveClassWidePolicy(): FilterPolicy { - return when (this) { - KeepClass -> Keep - else -> this - } - } - - /** - * Create a [FilterPolicyWithReason] with a given reason. - */ - fun withReason(reason: String): FilterPolicyWithReason { - return FilterPolicyWithReason(this, reason) - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicyWithReason.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicyWithReason.kt deleted file mode 100644 index b10165b835f2..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/FilterPolicyWithReason.kt +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -/** - * Captures a [FilterPolicy] with a human-readable reason. - */ -data class FilterPolicyWithReason ( - val policy: FilterPolicy, - val reason: String = "", -) { - /** - * Return a new [FilterPolicy] with an updated reason, while keeping the original reason - * as an "inner-reason". - */ - fun wrapReason(reason: String): FilterPolicyWithReason { - return FilterPolicyWithReason(policy, "$reason [inner-reason: ${this.reason}]") - } - - override fun toString(): String { - return "[$policy - reason: $reason]" - } - - /** Returns whether this policy should be ignored for stats. */ - val isIgnoredForStats: Boolean - get() { - return reason.contains("anonymous-inner-class") - || reason.contains("is-annotation") - || reason.contains("is-enum") - || reason.contains("is-synthetic-method") - || reason.contains("special-class") - || reason.contains("substitute-to") - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/FilterRemapper.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/FilterRemapper.kt deleted file mode 100644 index c5a2f9ff5e96..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/FilterRemapper.kt +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -import org.objectweb.asm.commons.Remapper - -/** - * A [Remapper] that uses [OutputFilter.remapType] - */ -class FilterRemapper(val filter: OutputFilter) : Remapper() { - private val cache = mutableMapOf() - - override fun mapType(typeInternalName: String?): String? { - if (typeInternalName == null) { - return null - } - - cache[typeInternalName]?.let { - return it - } - - var mapped = filter.remapType(typeInternalName) ?: typeInternalName - cache[typeInternalName] = mapped - return mapped - } - - // TODO Do we need to implement mapPackage(), etc too? -} \ No newline at end of file diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/ImplicitOutputFilter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/ImplicitOutputFilter.kt deleted file mode 100644 index 474da6dfa1b9..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/ImplicitOutputFilter.kt +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -import com.android.hoststubgen.HostStubGenErrors -import com.android.hoststubgen.HostStubGenInternalException -import com.android.hoststubgen.asm.CLASS_INITIALIZER_DESC -import com.android.hoststubgen.asm.CLASS_INITIALIZER_NAME -import com.android.hoststubgen.asm.ClassNodes -import com.android.hoststubgen.asm.isAnnotation -import com.android.hoststubgen.asm.isAnonymousInnerClass -import com.android.hoststubgen.asm.isAutoGeneratedEnumMember -import com.android.hoststubgen.asm.isEnum -import com.android.hoststubgen.asm.isSynthetic -import com.android.hoststubgen.log -import org.objectweb.asm.tree.ClassNode - -/** - * Filter implementing "implicit" rules, such as: - * - "keep all anonymous inner classes if the outer class is keep". - * (But anonymous inner classes should never be in "stub") - * - For classes in stub, make sure private parameterless constructors are also in stub, if any. - * - * TODO: Do we need a way to make anonymous class methods and lambdas "throw"? - */ -class ImplicitOutputFilter( - private val errors: HostStubGenErrors, - private val classes: ClassNodes, - fallback: OutputFilter -) : DelegatingFilter(fallback) { - private fun getClassImplicitPolicy(className: String, cn: ClassNode): FilterPolicyWithReason? { - if (isAnonymousInnerClass(cn)) { - log.forDebug { -// log.d(" anon-inner class: ${className} outer: ${cn.outerClass} ") - } - if (cn.outerClass == null) { - throw HostStubGenInternalException( - "outerClass is null for anonymous inner class") - } - // If the outer class needs to be in impl, it should be in impl too. - val outerPolicy = outermostFilter.getPolicyForClass(cn.outerClass) - if (outerPolicy.policy.needsInOutput) { - return FilterPolicy.KeepClass.withReason("anonymous-inner-class") - } - } - return null - } - - override fun getPolicyForClass(className: String): FilterPolicyWithReason { - val fallback = super.getPolicyForClass(className) - - val cn = classes.getClass(className) - - // Use the implicit policy, if any. - getClassImplicitPolicy(className, cn)?.let { return it } - - return fallback - } - - override fun getPolicyForMethod( - className: String, - methodName: String, - descriptor: String - ): FilterPolicyWithReason { - val fallback = super.getPolicyForMethod(className, methodName, descriptor) - val classPolicy = outermostFilter.getPolicyForClass(className) - - val cn = classes.getClass(className) - - // If we throw from the static initializer, the class would be useless, so we convert it - // "keep" instead. - // Unless it's an enum -- in that case, the below code would handle it. - if (!cn.isEnum() && - fallback.policy == FilterPolicy.Throw && - methodName == CLASS_INITIALIZER_NAME && descriptor == CLASS_INITIALIZER_DESC) { - // TODO Maybe show a warning?? But that'd be too noisy with --default-throw. - return FilterPolicy.Ignore.withReason( - "'throw' on static initializer is handled as 'ignore'" + - " [original throw reason: ${fallback.reason}]") - } - - log.d("Class ${cn.name} Class policy: $classPolicy") - if (classPolicy.policy.needsInOutput) { - // Do it only when the class needs to be kept... - - // Member policy should be "keep" or "stub". - val memberPolicy = classPolicy.policy.resolveClassWidePolicy() - - val mn = classes.findMethod(className, methodName, descriptor) - - // Keep (or stub) the generated enum members. - if (cn.isEnum()) { - mn?.let { mn -> - if (isAutoGeneratedEnumMember(mn)) { - return memberPolicy.withReason(classPolicy.reason).wrapReason("is-enum") - } - } - } - - // Keep (or stub) all members of annotations. - if (cn.isAnnotation()) { - return memberPolicy.withReason(classPolicy.reason).wrapReason("is-annotation") - } - - mn?.let { - if (mn.isSynthetic()) { - // For synthetic methods (such as lambdas), let's just inherit the class's - // policy. - return memberPolicy.withReason(classPolicy.reason).wrapReason( - "is-synthetic-method") - } - } - } - - return fallback - } - - override fun getPolicyForField( - className: String, - fieldName: String - ): FilterPolicyWithReason { - val fallback = super.getPolicyForField(className, fieldName) - - val cn = classes.getClass(className) - val classPolicy = outermostFilter.getPolicyForClass(className) - - log.d("Class ${cn.name} Class policy: $classPolicy") - if (classPolicy.policy.needsInOutput) { - // Do it only when the class needs to be kept... - - // Member policy should be "keep" or "stub". - val memberPolicy = classPolicy.policy.resolveClassWidePolicy() - - // Keep (or stub) the generated enum members. - if (cn.isEnum()) { - classes.findField(className, fieldName)?.let { fn -> - if (isAutoGeneratedEnumMember(fn)) { - return memberPolicy.withReason(classPolicy.reason).wrapReason("enum") - } - } - } - - // Keep (or stub) all members of annotations. - if (cn.isAnnotation()) { - return memberPolicy.withReason(classPolicy.reason).wrapReason("annotation") - } - } - - return fallback - } -} \ No newline at end of file diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/InMemoryOutputFilter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/InMemoryOutputFilter.kt deleted file mode 100644 index 59fa464a7212..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/InMemoryOutputFilter.kt +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -import com.android.hoststubgen.addNonNullElement -import com.android.hoststubgen.asm.ClassNodes -import com.android.hoststubgen.asm.toHumanReadableClassName -import com.android.hoststubgen.asm.toHumanReadableMethodName -import com.android.hoststubgen.asm.toJvmClassName -import com.android.hoststubgen.log - -// TODO: Validate all input names. - -class InMemoryOutputFilter( - private val classes: ClassNodes, - fallback: OutputFilter, -) : DelegatingFilter(fallback) { - private val mPolicies: MutableMap = mutableMapOf() - private val mRenames: MutableMap = mutableMapOf() - private val mRedirectionClasses: MutableMap = mutableMapOf() - private val mClassLoadHooks: MutableMap = mutableMapOf() - - private fun getClassKey(className: String): String { - return className.toHumanReadableClassName() - } - - private fun getFieldKey(className: String, fieldName: String): String { - return getClassKey(className) + "." + fieldName - } - - private fun getMethodKey(className: String, methodName: String, signature: String): String { - return getClassKey(className) + "." + methodName + ";" + signature - } - - override fun getPolicyForClass(className: String): FilterPolicyWithReason { - return mPolicies[getClassKey(className)] ?: super.getPolicyForClass(className) - } - - private fun checkClass(className: String) { - if (classes.findClass(className) == null) { - log.w("Unknown class $className") - } - } - - private fun checkField(className: String, fieldName: String) { - if (classes.findField(className, fieldName) == null) { - log.w("Unknown field $className.$fieldName") - } - } - - private fun checkMethod( - className: String, - methodName: String, - descriptor: String - ) { - if (classes.findMethod(className, methodName, descriptor) == null) { - log.w("Unknown method $className.$methodName$descriptor") - } - } - - fun setPolicyForClass(className: String, policy: FilterPolicyWithReason) { - checkClass(className) - mPolicies[getClassKey(className)] = policy - } - - override fun getPolicyForField(className: String, fieldName: String): FilterPolicyWithReason { - return mPolicies[getFieldKey(className, fieldName)] - ?: super.getPolicyForField(className, fieldName) - } - - fun setPolicyForField(className: String, fieldName: String, policy: FilterPolicyWithReason) { - checkField(className, fieldName) - mPolicies[getFieldKey(className, fieldName)] = policy - } - - override fun getPolicyForMethod( - className: String, - methodName: String, - descriptor: String, - ): FilterPolicyWithReason { - return mPolicies[getMethodKey(className, methodName, descriptor)] - ?: super.getPolicyForMethod(className, methodName, descriptor) - } - - fun setPolicyForMethod( - className: String, - methodName: String, - descriptor: String, - policy: FilterPolicyWithReason, - ) { - checkMethod(className, methodName, descriptor) - mPolicies[getMethodKey(className, methodName, descriptor)] = policy - } - - override fun getRenameTo(className: String, methodName: String, descriptor: String): String? { - return mRenames[getMethodKey(className, methodName, descriptor)] - ?: super.getRenameTo(className, methodName, descriptor) - } - - fun setRenameTo(className: String, methodName: String, descriptor: String, toName: String) { - checkMethod(className, methodName, descriptor) - checkMethod(className, toName, descriptor) - mRenames[getMethodKey(className, methodName, descriptor)] = toName - } - - override fun getRedirectionClass(className: String): String? { - return mRedirectionClasses[getClassKey(className)] - ?: super.getRedirectionClass(className) - } - - fun setRedirectionClass(from: String, to: String) { - checkClass(from) - - // Redirection classes may be provided from other jars, so we can't do this check. - // ensureClassExists(to) - mRedirectionClasses[getClassKey(from)] = to.toJvmClassName() - } - - override fun getClassLoadHooks(className: String): List { - return addNonNullElement(super.getClassLoadHooks(className), - mClassLoadHooks[getClassKey(className)]) - } - - fun setClassLoadHook(className: String, methodName: String) { - mClassLoadHooks[getClassKey(className)] = methodName.toHumanReadableMethodName() - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/KeepNativeFilter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/KeepNativeFilter.kt deleted file mode 100644 index 00e7d77fa6e7..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/KeepNativeFilter.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -import com.android.hoststubgen.asm.ClassNodes -import com.android.hoststubgen.asm.isNative - -/** - * For native methods that weren't handled by outer filters, we keep it so that - * native method registration will not crash at runtime. Ideally we shouldn't need - * this, but in practice unsupported native method registrations do occur. - */ -class KeepNativeFilter( - private val classes: ClassNodes, - fallback: OutputFilter -) : DelegatingFilter(fallback) { - override fun getPolicyForMethod( - className: String, - methodName: String, - descriptor: String, - ): FilterPolicyWithReason { - return classes.findMethod(className, methodName, descriptor)?.let { mn -> - if (mn.isNative()) { - FilterPolicy.Keep.withReason("native-preserve") - } else { - null - } - } ?: super.getPolicyForMethod(className, methodName, descriptor) - } -} \ No newline at end of file diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/OutputFilter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/OutputFilter.kt deleted file mode 100644 index f99ce906240a..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/OutputFilter.kt +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -/** - * Base class for "filters", which decides what APIs should go to the stub / impl jars. - */ -abstract class OutputFilter { - /** - * Filters are stacked over one another. This fields contains the "outermost" filter in a - * filter stack chain. - * - * Subclasses must use this filter to get a policy, when they need to infer a policy - * from the policy of another API. - * - * For example, [ClassWidePolicyPropagatingFilter] needs to check the policy of the enclosing - * class to propagate "class-wide" policies, but when it does so, it can't just use - * `this.getPolicyForClass()` because that wouldn't return policies decided by "outer" - * filters. Instead, it uses [outermostFilter.getPolicyForClass()]. - * - * Note, [outermostFilter] can be itself, so make sure not to cause infinity recursions when - * using it. - */ - open var outermostFilter: OutputFilter = this - - abstract fun getPolicyForClass(className: String): FilterPolicyWithReason - - abstract fun getPolicyForField(className: String, fieldName: String): FilterPolicyWithReason - - abstract fun getPolicyForMethod( - className: String, - methodName: String, - descriptor: String, - ): FilterPolicyWithReason - - /** - * If a given method is a substitute-from method, return the substitute-to method name. - * - * The substitute-to and from methods must have the same signature, in the same class. - */ - open fun getRenameTo(className: String, methodName: String, descriptor: String): String? { - return null - } - - /** - * Return a "redirection class" name for a given class. - * - * The result will be in a JVM internal form. (e.g. uses '/'s instead of '.'s) - * - * (which corresponds to @HostSideTestRedirectClass of the standard annotations.) - */ - open fun getRedirectionClass(className: String): String? { - return null - } - - /** - * Return a "class load hook" class name for a given class. - * - * (which corresponds to @HostSideTestClassLoadHook of the standard annotations.) - */ - open fun getClassLoadHooks(className: String): List { - return emptyList() - } - - /** - * Return the "method call hook" class name. - * - * The class has to have a function with the following signature: - * `public static void onMethodCalled(Class clazz, String name, String descriptor)`. - */ - open fun getMethodCallHooks(className: String, methodName: String, descriptor: String): - List { - return emptyList() - } - - /** - * Take a class (internal) name. If the class needs to be renamed, return the new name. - * This is used by [FilterRemapper]. - */ - open fun remapType(className: String): String? { - return null - } - - data class MethodReplaceTarget(val className: String, val methodName: String) - - /** - * Return if this filter may return non-null from [getMethodCallReplaceTo]. - * (Used for a small optimization) - */ - open fun hasAnyMethodCallReplace(): Boolean { - return false - } - - /** - * If a method call should be forwarded to another method, return the target's class / method. - */ - open fun getMethodCallReplaceTo( - callerClassName: String, - callerMethodName: String, - className: String, - methodName: String, - descriptor: String, - ): MethodReplaceTarget? { - return null - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/PackageFilter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/PackageFilter.kt deleted file mode 100644 index c67e6714d4c2..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/PackageFilter.kt +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -import com.android.hoststubgen.asm.toHumanReadableClassName -import com.android.hoststubgen.utils.Trie - -/** - * Filter to apply a policy to classes inside a package, either directly or indirectly. - */ -class PackageFilter( - fallback: OutputFilter -) : DelegatingFilter(fallback) { - - private val mPackagePolicies = PackagePolicyTrie() - - // We want to pick the most specific filter for a package name. - // Since any package with a matching prefix is a valid match, we can use a prefix tree - // to help us find the nearest matching filter. - private class PackagePolicyTrie : Trie() { - // Split package name into individual component - override fun splitToComponents(key: String): Iterator { - return key.split('.').iterator() - } - } - - private fun getPackageKey(packageName: String): String { - return packageName.toHumanReadableClassName() - } - - private fun getPackageKeyFromClass(className: String): String { - val clazz = className.toHumanReadableClassName() - val idx = clazz.lastIndexOf('.') - return if (idx >= 0) clazz.substring(0, idx) else "" - } - - /** - * Add a policy to all classes inside a package, either directly or indirectly. - */ - fun addPolicy(packageName: String, policy: FilterPolicyWithReason) { - mPackagePolicies[getPackageKey(packageName)] = policy - } - - override fun getPolicyForClass(className: String): FilterPolicyWithReason { - return mPackagePolicies[getPackageKeyFromClass(className)] - ?: super.getPolicyForClass(className) - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/SanitizationFilter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/SanitizationFilter.kt deleted file mode 100644 index 18a1e16bcf3a..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/SanitizationFilter.kt +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -import com.android.hoststubgen.HostStubGenErrors -import com.android.hoststubgen.asm.ClassNodes -import com.android.hoststubgen.asm.toHumanReadableClassName -import com.android.hoststubgen.log - -/** - * Check whether the policies in the inner layers make sense, and sanitize the results. - */ -class SanitizationFilter( - private val errors: HostStubGenErrors, - private val classes: ClassNodes, - fallback: OutputFilter -) : DelegatingFilter(fallback) { - override fun getPolicyForMethod( - className: String, - methodName: String, - descriptor: String - ): FilterPolicyWithReason { - val policy = super.getPolicyForMethod(className, methodName, descriptor) - if (policy.policy == FilterPolicy.Redirect) { - // Check whether the hosting class has a redirection class - if (getRedirectionClass(className) == null) { - errors.onErrorFound("Method $methodName$descriptor requires a redirection " + - "class set on ${className.toHumanReadableClassName()}") - } - } - return policy - } - - override fun getRedirectionClass(className: String): String? { - return super.getRedirectionClass(className)?.also { clazz -> - if (classes.findClass(clazz) == null) { - log.w("Redirection class $clazz not found. Class must be available at runtime.") - } else if (outermostFilter.getPolicyForClass(clazz).policy != FilterPolicy.KeepClass) { - // If the class exists, it must have a KeepClass policy. - errors.onErrorFound("Redirection class $clazz must have @KeepWholeClass.") - } - } - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/SubclassFilter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/SubclassFilter.kt deleted file mode 100644 index fd7474b55fa6..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/SubclassFilter.kt +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -import com.android.hoststubgen.asm.ClassNodes -import com.android.hoststubgen.asm.toJvmClassName - -/** - * Filter to apply a policy to classes extending or implementing a class, - * either directly or indirectly. - * - * The policy won't apply to the super class itself. - */ -class SubclassFilter( - private val classes: ClassNodes, - fallback: OutputFilter -) : DelegatingFilter(fallback) { - private val mPolicies: MutableMap = mutableMapOf() - - /** - * Add a policy to all classes extending or implementing a class, either directly or indirectly. - */ - fun addPolicy(superClassName: String, policy: FilterPolicyWithReason) { - mPolicies[superClassName.toJvmClassName()] = policy - } - - override fun getPolicyForClass(className: String): FilterPolicyWithReason { - return findPolicyForClass(className) ?: super.getPolicyForClass(className) - } - - /** - * Find a policy for a class. - */ - private fun findPolicyForClass(className: String): FilterPolicyWithReason? { - val cn = classes.findClass(className) ?: return null - - if (cn.superName == null) { - return null - } - // First, check the direct super class / interfaces. - mPolicies[cn.superName]?.let { policy -> - return policy - } - cn.interfaces?.forEach { iface -> - mPolicies[iface]?.let { policy -> - return policy - } - } - - // Then recurse. - cn.superName?.let { superName -> - findPolicyForClass(superName)?.let { policy -> - return policy - } - } - cn.interfaces?.forEach { iface -> - findPolicyForClass(iface)?.let { policy -> - return policy - } - } - return null - } -} \ No newline at end of file diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/TextFileFilterPolicyParser.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/TextFileFilterPolicyParser.kt deleted file mode 100644 index caf80ebec0c9..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/TextFileFilterPolicyParser.kt +++ /dev/null @@ -1,376 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -import com.android.hoststubgen.ParseException -import com.android.hoststubgen.asm.ClassNodes -import com.android.hoststubgen.asm.splitWithLastPeriod -import com.android.hoststubgen.asm.toHumanReadableClassName -import com.android.hoststubgen.asm.toJvmClassName -import com.android.hoststubgen.log -import com.android.hoststubgen.normalizeTextLine -import com.android.hoststubgen.whitespaceRegex -import java.io.File -import java.io.PrintWriter -import java.util.regex.Pattern -import org.objectweb.asm.tree.ClassNode - -/** - * Print a class node as a "keep" policy. - */ -fun printAsTextPolicy(pw: PrintWriter, cn: ClassNode) { - pw.printf("class %s %s\n", cn.name.toHumanReadableClassName(), "keep") - - cn.fields?.let { - for (f in it.sortedWith(compareBy({ it.name }))) { - pw.printf(" field %s %s\n", f.name, "keep") - } - } - cn.methods?.let { - for (m in it.sortedWith(compareBy({ it.name }, { it.desc }))) { - pw.printf(" method %s %s %s\n", m.name, m.desc, "keep") - } - } -} - -private const val FILTER_REASON = "file-override" - -private enum class SpecialClass { - NotSpecial, - Aidl, - FeatureFlags, - Sysprops, - RFile, -} - -class TextFileFilterPolicyParser( - private val classes: ClassNodes, - fallback: OutputFilter -) { - private val subclassFilter = SubclassFilter(classes, fallback) - private val packageFilter = PackageFilter(subclassFilter) - private val imf = InMemoryOutputFilter(classes, packageFilter) - private var aidlPolicy: FilterPolicyWithReason? = null - private var featureFlagsPolicy: FilterPolicyWithReason? = null - private var syspropsPolicy: FilterPolicyWithReason? = null - private var rFilePolicy: FilterPolicyWithReason? = null - private val typeRenameSpec = mutableListOf() - private val methodReplaceSpec = - mutableListOf() - - private lateinit var currentClassName: String - - /** - * Read a given "policy" file and return as an [OutputFilter] - */ - fun parse(file: String) { - log.i("Loading offloaded annotations from $file ...") - log.withIndent { - var lineNo = 0 - try { - File(file).forEachLine { - lineNo++ - val line = normalizeTextLine(it) - if (line.isEmpty()) { - return@forEachLine // skip empty lines. - } - parseLine(line) - } - } catch (e: ParseException) { - throw e.withSourceInfo(file, lineNo) - } - } - } - - fun createOutputFilter(): OutputFilter { - var ret: OutputFilter = imf - if (typeRenameSpec.isNotEmpty()) { - ret = TextFilePolicyRemapperFilter(typeRenameSpec, ret) - } - if (methodReplaceSpec.isNotEmpty()) { - ret = TextFilePolicyMethodReplaceFilter(methodReplaceSpec, classes, ret) - } - - // Wrap the in-memory-filter with AHF. - ret = AndroidHeuristicsFilter( - classes, aidlPolicy, featureFlagsPolicy, syspropsPolicy, rFilePolicy, ret - ) - - return ret - } - - private fun parseLine(line: String) { - val fields = line.split(whitespaceRegex).toTypedArray() - when (fields[0].lowercase()) { - "p", "package" -> parsePackage(fields) - "c", "class" -> parseClass(fields) - "f", "field" -> parseField(fields) - "m", "method" -> parseMethod(fields) - "r", "rename" -> parseRename(fields) - else -> throw ParseException("Unknown directive \"${fields[0]}\"") - } - } - - private fun resolveSpecialClass(className: String): SpecialClass { - if (!className.startsWith(":")) { - return SpecialClass.NotSpecial - } - when (className.lowercase()) { - ":aidl" -> return SpecialClass.Aidl - ":feature_flags" -> return SpecialClass.FeatureFlags - ":sysprops" -> return SpecialClass.Sysprops - ":r" -> return SpecialClass.RFile - } - throw ParseException("Invalid special class name \"$className\"") - } - - private fun resolveExtendingClass(className: String): String? { - if (!className.startsWith("*")) { - return null - } - return className.substring(1) - } - - private fun parsePolicy(s: String): FilterPolicy { - return when (s.lowercase()) { - "k", "keep" -> FilterPolicy.Keep - "t", "throw" -> FilterPolicy.Throw - "r", "remove" -> FilterPolicy.Remove - "kc", "keepclass" -> FilterPolicy.KeepClass - "i", "ignore" -> FilterPolicy.Ignore - "rdr", "redirect" -> FilterPolicy.Redirect - else -> { - if (s.startsWith("@")) { - FilterPolicy.Substitute - } else { - throw ParseException("Invalid policy \"$s\"") - } - } - } - } - - private fun parsePackage(fields: Array) { - if (fields.size < 3) { - throw ParseException("Package ('p') expects 2 fields.") - } - val name = fields[1] - val rawPolicy = fields[2] - if (resolveExtendingClass(name) != null) { - throw ParseException("Package can't be a super class type") - } - if (resolveSpecialClass(name) != SpecialClass.NotSpecial) { - throw ParseException("Package can't be a special class type") - } - if (rawPolicy.startsWith("!")) { - throw ParseException("Package can't have a substitution") - } - if (rawPolicy.startsWith("~")) { - throw ParseException("Package can't have a class load hook") - } - val policy = parsePolicy(rawPolicy) - if (!policy.isUsableWithClasses) { - throw ParseException("Package can't have policy '$policy'") - } - packageFilter.addPolicy(name, policy.withReason(FILTER_REASON)) - } - - private fun parseClass(fields: Array) { - if (fields.size < 3) { - throw ParseException("Class ('c') expects 2 fields.") - } - currentClassName = fields[1] - - // superClass is set when the class name starts with a "*". - val superClass = resolveExtendingClass(currentClassName) - - // :aidl, etc? - val classType = resolveSpecialClass(currentClassName) - - if (fields[2].startsWith("!")) { - if (classType != SpecialClass.NotSpecial) { - // We could support it, but not needed at least for now. - throw ParseException( - "Special class can't have a substitution" - ) - } - // It's a redirection class. - val toClass = fields[2].substring(1) - imf.setRedirectionClass(currentClassName, toClass) - } else if (fields[2].startsWith("~")) { - if (classType != SpecialClass.NotSpecial) { - // We could support it, but not needed at least for now. - throw ParseException( - "Special class can't have a class load hook" - ) - } - // It's a class-load hook - val callback = fields[2].substring(1) - imf.setClassLoadHook(currentClassName, callback) - } else { - val policy = parsePolicy(fields[2]) - if (!policy.isUsableWithClasses) { - throw ParseException("Class can't have policy '$policy'") - } - - when (classType) { - SpecialClass.NotSpecial -> { - // TODO: Duplicate check, etc - if (superClass == null) { - imf.setPolicyForClass( - currentClassName, policy.withReason(FILTER_REASON) - ) - } else { - subclassFilter.addPolicy( - superClass, - policy.withReason("extends $superClass") - ) - } - } - - SpecialClass.Aidl -> { - if (aidlPolicy != null) { - throw ParseException( - "Policy for AIDL classes already defined" - ) - } - aidlPolicy = policy.withReason( - "$FILTER_REASON (special-class AIDL)" - ) - } - - SpecialClass.FeatureFlags -> { - if (featureFlagsPolicy != null) { - throw ParseException( - "Policy for feature flags already defined" - ) - } - featureFlagsPolicy = policy.withReason( - "$FILTER_REASON (special-class feature flags)" - ) - } - - SpecialClass.Sysprops -> { - if (syspropsPolicy != null) { - throw ParseException( - "Policy for sysprops already defined" - ) - } - syspropsPolicy = policy.withReason( - "$FILTER_REASON (special-class sysprops)" - ) - } - - SpecialClass.RFile -> { - if (rFilePolicy != null) { - throw ParseException( - "Policy for R file already defined" - ) - } - rFilePolicy = policy.withReason( - "$FILTER_REASON (special-class R file)" - ) - } - } - } - } - - private fun parseField(fields: Array) { - if (fields.size < 3) { - throw ParseException("Field ('f') expects 2 fields.") - } - val name = fields[1] - val policy = parsePolicy(fields[2]) - if (!policy.isUsableWithFields) { - throw ParseException("Field can't have policy '$policy'") - } - require(this::currentClassName.isInitialized) - - // TODO: Duplicate check, etc - imf.setPolicyForField(currentClassName, name, policy.withReason(FILTER_REASON)) - } - - private fun parseMethod(fields: Array) { - if (fields.size < 4) { - throw ParseException("Method ('m') expects 3 fields.") - } - val name = fields[1] - val signature = fields[2] - val policy = parsePolicy(fields[3]) - - if (!policy.isUsableWithMethods) { - throw ParseException("Method can't have policy '$policy'") - } - - require(this::currentClassName.isInitialized) - - imf.setPolicyForMethod( - currentClassName, name, signature, - policy.withReason(FILTER_REASON) - ) - if (policy == FilterPolicy.Substitute) { - val fromName = fields[3].substring(1) - - if (fromName == name) { - throw ParseException( - "Substitution must have a different name" - ) - } - - // Set the policy for the "from" method. - imf.setPolicyForMethod( - currentClassName, fromName, signature, - FilterPolicy.Keep.withReason(FILTER_REASON) - ) - - val classAndMethod = splitWithLastPeriod(fromName) - if (classAndMethod != null) { - // If the substitution target contains a ".", then - // it's a method call redirect. - methodReplaceSpec.add( - TextFilePolicyMethodReplaceFilter.MethodCallReplaceSpec( - currentClassName.toJvmClassName(), - name, - signature, - classAndMethod.first.toJvmClassName(), - classAndMethod.second, - ) - ) - } else { - // It's an in-class replace. - // ("@RavenwoodReplace" equivalent) - imf.setRenameTo(currentClassName, fromName, signature, name) - } - } - } - - private fun parseRename(fields: Array) { - if (fields.size < 3) { - throw ParseException("Rename ('r') expects 2 fields.") - } - // Add ".*" to make it a prefix match. - val pattern = Pattern.compile(fields[1] + ".*") - - // Removing the leading /'s from the prefix. This allows - // using a single '/' as an empty suffix, which is useful to have a - // "negative" rename rule to avoid subsequent raname's from getting - // applied. (Which is needed for services.jar) - val prefix = fields[2].trimStart('/') - - typeRenameSpec += TextFilePolicyRemapperFilter.TypeRenameSpec( - pattern, prefix - ) - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/TextFilePolicyMethodReplaceFilter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/TextFilePolicyMethodReplaceFilter.kt deleted file mode 100644 index d45f41407a52..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/TextFilePolicyMethodReplaceFilter.kt +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -import com.android.hoststubgen.asm.ClassNodes - -/** - * Filter used by TextFileFilterPolicyParser for "method call relacement". - */ -class TextFilePolicyMethodReplaceFilter( - val spec: List, - val classes: ClassNodes, - val fallback: OutputFilter, -) : DelegatingFilter(fallback) { - - data class MethodCallReplaceSpec( - val fromClass: String, - val fromMethod: String, - val fromDescriptor: String, - val toClass: String, - val toMethod: String, - ) - - override fun hasAnyMethodCallReplace(): Boolean { - return true - } - - override fun getMethodCallReplaceTo( - callerClassName: String, - callerMethodName: String, - className: String, - methodName: String, - descriptor: String, - ): MethodReplaceTarget? { - // Maybe use 'Tri' if we end up having too many replacements. - spec.forEach { - if (className == it.fromClass && - methodName == it.fromMethod && - descriptor == it.fromDescriptor - ) { - return MethodReplaceTarget(it.toClass, it.toMethod) - } - } - return null - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/TextFilePolicyRemapperFilter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/TextFilePolicyRemapperFilter.kt deleted file mode 100644 index a78c6552b8d0..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/filters/TextFilePolicyRemapperFilter.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.filters - -import com.android.hoststubgen.log -import java.util.regex.Pattern - -/** - * A filter that provides a simple "jarjar" functionality via [mapType] - */ -class TextFilePolicyRemapperFilter( - val typeRenameSpecs: List, - fallback: OutputFilter, -) : DelegatingFilter(fallback) { - /** - * When a package name matches [typeInternalNamePattern], we prepend [typeInternalNamePrefix] - * to it. - */ - data class TypeRenameSpec( - val typeInternalNamePattern: Pattern, - val typeInternalNamePrefix: String, - ) - - private val cache = mutableMapOf() - - override fun remapType(className: String): String? { - var mapped: String = className - typeRenameSpecs.forEach { - if (it.typeInternalNamePattern.matcher(className).matches()) { - mapped = it.typeInternalNamePrefix + className - log.d("Renaming type $className to $mapped") - } - } - cache[className] = mapped - return mapped - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/utils/ClassFilter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/utils/ClassFilter.kt deleted file mode 100644 index d6aa7617fd59..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/utils/ClassFilter.kt +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.utils - -import com.android.hoststubgen.ParseException -import com.android.hoststubgen.asm.toHumanReadableClassName -import com.android.hoststubgen.asm.toJvmClassName -import com.android.hoststubgen.normalizeTextLine -import java.io.File - -/** - * General purpose filter for class names. - */ -class ClassFilter private constructor( - private val defaultResult: Boolean, -) { - private enum class MatchType { - Full, - Prefix, - Suffix, - } - - private class FilterElement( - val allowed: Boolean, - val internalName: String, - val matchType: MatchType, - ) { - fun matches(classInternalName: String): Boolean { - return when (matchType) { - MatchType.Full -> classInternalName == internalName - MatchType.Prefix -> classInternalName.startsWith(internalName) - MatchType.Suffix -> classInternalName.endsWith(internalName) - } - } - } - - private val elements: MutableList = mutableListOf() - - private val cache: MutableMap = mutableMapOf() - - /** - * Takes an internal class name (e.g. "com/android/hoststubgen/ClassName") and returns if - * matches the filter or not. - */ - fun matches(classInternalName: String): Boolean { - cache[classInternalName]?.let { - return it - } - - val testClasses = sequence { - // Yield itself and its outer class(es) one by one - var idx = classInternalName.length - while (idx > 0) { - yield(classInternalName.substring(0, idx)) - idx = classInternalName.lastIndexOf('$', idx - 1) - } - } - - val result = elements.find { testClasses.any(it::matches) }?.allowed ?: defaultResult - cache[classInternalName] = result - - return result - } - - fun getCacheSizeForTest(): Int { - return cache.size - } - - companion object { - /** - * Return a filter that alawys returns true or false. - */ - fun newNullFilter(defaultResult: Boolean): ClassFilter { - return ClassFilter(defaultResult) - } - - /** Build a filter from a file. */ - fun loadFromFile(filename: String, defaultResult: Boolean): ClassFilter { - return buildFromString(File(filename).readText(), defaultResult, filename) - } - - /** Build a filter from a string (for unit tests). */ - fun buildFromString( - filterString: String, - defaultResult: Boolean, - filenameForErrorMessage: String - ): ClassFilter { - val ret = ClassFilter(defaultResult) - - var lineNo = 0 - filterString.split('\n').forEach { s -> - lineNo++ - - var line = normalizeTextLine(s) - - if (line.isEmpty()) { - return@forEach // skip empty lines. - } - - line = line.toHumanReadableClassName() // Convert all the slashes to periods. - - var allow = true - if (line.startsWith("!")) { - allow = false - line = line.substring(1).trimStart() - } - - // Special case -- matches any class names. - if (line == "*") { - ret.elements.add(FilterElement(allow, "", MatchType.Prefix)) - return@forEach - } - - // Handle prefix match -- e.g. "package.name.*" - if (line.endsWith(".*")) { - ret.elements.add( - FilterElement( - allow, - line.substring(0, line.length - 2).toJvmClassName() + "/", - MatchType.Prefix - ) - ) - return@forEach - } - - // Handle suffix match -- e.g. "*.Flags" - if (line.startsWith("*.")) { - ret.elements.add( - FilterElement( - allow, - "/" + line.substring(2, line.length).toJvmClassName(), - MatchType.Suffix - ) - ) - return@forEach - } - - // Any other uses of "*" would be an error. - if (line.contains('*')) { - throw ParseException( - "Wildcard (*) can only show up as the last element", - filenameForErrorMessage, - lineNo - ) - } - ret.elements.add(FilterElement(allow, line.toJvmClassName(), MatchType.Suffix)) - } - - return ret - } - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/utils/Trie.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/utils/Trie.kt deleted file mode 100644 index 1b3d79cddb8e..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/utils/Trie.kt +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.utils - -abstract class Trie { - - private val root = TrieNode() - - abstract fun splitToComponents(key: Key): Iterator - - operator fun set(key: Key, value: Value) { - val node = root.getExactNode(splitToComponents(key)) - node.value = value - } - - operator fun get(key: Key): Value? { - return root.getNearestValue(null, splitToComponents(key)) - } - - private class TrieNode { - private val children = mutableMapOf>() - var value: Value? = null - - fun getExactNode(components: Iterator): TrieNode { - val n = components.next() - val child = children.getOrPut(n) { TrieNode() } - return if (components.hasNext()) { - child.getExactNode(components) - } else { - child - } - } - - fun getNearestValue(current: Value?, components: Iterator): Value? { - val n = components.next() - val child = children[n] ?: return current - val newValue = child.value ?: current - return if (components.hasNext()) { - child.getNearestValue(newValue, components) - } else { - newValue - } - } - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/BaseAdapter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/BaseAdapter.kt deleted file mode 100644 index 261ef59c45c7..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/BaseAdapter.kt +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.visitors - -import com.android.hoststubgen.HostStubGenErrors -import com.android.hoststubgen.HostStubGenStats -import com.android.hoststubgen.LogLevel -import com.android.hoststubgen.asm.ClassNodes -import com.android.hoststubgen.asm.UnifiedVisitor -import com.android.hoststubgen.asm.getPackageNameFromFullClassName -import com.android.hoststubgen.filters.FilterPolicy -import com.android.hoststubgen.filters.FilterPolicyWithReason -import com.android.hoststubgen.filters.OutputFilter -import com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -import com.android.hoststubgen.log -import java.io.PrintWriter -import org.objectweb.asm.ClassVisitor -import org.objectweb.asm.FieldVisitor -import org.objectweb.asm.MethodVisitor -import org.objectweb.asm.Opcodes -import org.objectweb.asm.commons.ClassRemapper -import org.objectweb.asm.util.TraceClassVisitor - -const val OPCODE_VERSION = Opcodes.ASM9 - -abstract class BaseAdapter( - protected val classes: ClassNodes, - nextVisitor: ClassVisitor, - protected val filter: OutputFilter, - protected val options: Options, -) : ClassVisitor(OPCODE_VERSION, nextVisitor) { - - /** - * Options to control the behavior. - */ - data class Options( - val errors: HostStubGenErrors, - val stats: HostStubGenStats?, - val enablePreTrace: Boolean, - val enablePostTrace: Boolean - ) - - protected lateinit var currentPackageName: String - protected lateinit var currentClassName: String - protected var redirectionClass: String? = null - protected lateinit var classPolicy: FilterPolicyWithReason - - override fun visit( - version: Int, - access: Int, - name: String, - signature: String?, - superName: String?, - interfaces: Array, - ) { - super.visit(version, access, name, signature, superName, interfaces) - currentClassName = name - currentPackageName = getPackageNameFromFullClassName(name) - classPolicy = filter.getPolicyForClass(currentClassName) - redirectionClass = filter.getRedirectionClass(currentClassName) - - log.d("[%s] visit: %s (package: %s)", this.javaClass.simpleName, name, currentPackageName) - log.indent() - log.v("Emitting class: %s", name) - log.indent() - - // Inject annotations to generated classes. - UnifiedVisitor.on(this).visitAnnotation(HostStubGenProcessedAsKeep.CLASS_DESCRIPTOR, true) - } - - override fun visitEnd() { - log.unindent() - log.unindent() - super.visitEnd() - } - - var skipMemberModificationNestCount = 0 - - /** - * This method allows writing class members without any modifications. - */ - protected inline fun writeRawMembers(callback: () -> Unit) { - skipMemberModificationNestCount++ - try { - callback() - } finally { - skipMemberModificationNestCount-- - } - } - - override fun visitField( - access: Int, - name: String, - descriptor: String, - signature: String?, - value: Any?, - ): FieldVisitor? { - if (skipMemberModificationNestCount > 0) { - return super.visitField(access, name, descriptor, signature, value) - } - val policy = filter.getPolicyForField(currentClassName, name) - log.d("visitField: %s %s [%x] Policy: %s", name, descriptor, access, policy) - - log.withIndent { - if (policy.policy == FilterPolicy.Remove) { - log.d("Removing %s %s", name, policy) - return null - } - - log.v("Emitting field: %s %s %s", name, descriptor, policy) - val ret = super.visitField(access, name, descriptor, signature, value) - - UnifiedVisitor.on(ret) - .visitAnnotation(HostStubGenProcessedAsKeep.CLASS_DESCRIPTOR, true) - - return ret - } - } - - override fun visitMethod( - access: Int, - name: String, - descriptor: String, - signature: String?, - exceptions: Array?, - ): MethodVisitor? { - if (skipMemberModificationNestCount > 0) { - return super.visitMethod(access, name, descriptor, signature, exceptions) - } - val p = filter.getPolicyForMethod(currentClassName, name, descriptor) - log.d("visitMethod: %s%s [%x] [%s] Policy: %s", name, descriptor, access, signature, p) - options.stats?.onVisitPolicyForMethod(currentClassName, name, descriptor, p, access) - - log.withIndent { - // If it's a substitute-from method, then skip (== remove). - // Instead of this method, we rename the substitute-to method with the original - // name, in the "Maybe rename the method" part below. - val policy = filter.getPolicyForMethod(currentClassName, name, descriptor) - if (policy.policy == FilterPolicy.Substitute) { - log.d("Skipping %s%s %s", name, descriptor, policy) - return null - } - if (p.policy == FilterPolicy.Remove) { - log.d("Removing %s%s %s", name, descriptor, policy) - return null - } - - var newAccess = access - - // Maybe rename the method. - val newName: String - val renameTo = filter.getRenameTo(currentClassName, name, descriptor) - if (renameTo != null) { - newName = renameTo - - // It's confusing, but here, `newName` is the original method name - // (the one with the @substitute/replace annotation). - // `name` is the name of the method we're currently visiting, so it's usually a - // "...$ravewnwood" name. - newAccess = checkSubstitutionMethodCompatibility( - classes, currentClassName, newName, name, descriptor, options.errors - ) - if (newAccess == NOT_COMPATIBLE) { - return null - } - - log.v( - "Emitting %s.%s%s as %s %s", currentClassName, name, descriptor, - newName, policy - ) - } else { - log.v("Emitting method: %s%s %s", name, descriptor, policy) - newName = name - } - - // Let subclass update the flag. - // But note, we only use it when calling the super's method, - // but not for visitMethodInner(), because when subclass wants to change access, - // it can do so inside visitMethodInner(). - newAccess = updateAccessFlags(newAccess, name, descriptor, policy.policy) - - val ret = visitMethodInner( - access, newName, descriptor, signature, exceptions, policy, - renameTo != null, - super.visitMethod(newAccess, newName, descriptor, signature, exceptions) - ) - - ret?.let { - UnifiedVisitor.on(ret) - .visitAnnotation(HostStubGenProcessedAsKeep.CLASS_DESCRIPTOR, true) - } - - return ret - } - } - - open fun updateAccessFlags( - access: Int, - name: String, - descriptor: String, - policy: FilterPolicy, - ): Int { - return access - } - - abstract fun visitMethodInner( - access: Int, - name: String, - descriptor: String, - signature: String?, - exceptions: Array?, - policy: FilterPolicyWithReason, - substituted: Boolean, - superVisitor: MethodVisitor?, - ): MethodVisitor? - - companion object { - fun getVisitor( - classInternalName: String, - classes: ClassNodes, - nextVisitor: ClassVisitor, - filter: OutputFilter, - packageRedirector: PackageRedirectRemapper, - options: Options, - ): ClassVisitor { - var next = nextVisitor - - val verbosePrinter = PrintWriter(log.getWriter(LogLevel.Verbose)) - - // Inject TraceClassVisitor for debugging. - if (options.enablePostTrace) { - next = TraceClassVisitor(next, verbosePrinter) - } - - // Handle --package-redirect - if (!packageRedirector.isEmpty) { - // Don't apply the remapper on redirect-from classes. - // Otherwise, if the target jar actually contains the "from" classes (which - // may or may not be the case) they'd be renamed. - // But we update all references in other places, so, a method call to a "from" class - // would be replaced with the "to" class. All type references (e.g. variable types) - // will be updated too. - if (!packageRedirector.isTarget(classInternalName)) { - next = ClassRemapper(next, packageRedirector) - } else { - log.v( - "Class $classInternalName is a redirect-from class, not applying" + - " --package-redirect" - ) - } - } - - next = ImplGeneratingAdapter(classes, next, filter, options) - - // Inject TraceClassVisitor for debugging. - if (options.enablePreTrace) { - next = TraceClassVisitor(next, verbosePrinter) - } - return next - } - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/BodyReplacingMethodVisitor.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/BodyReplacingMethodVisitor.kt deleted file mode 100644 index 55d0c0e555f1..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/BodyReplacingMethodVisitor.kt +++ /dev/null @@ -1,324 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.visitors - -import org.objectweb.asm.AnnotationVisitor -import org.objectweb.asm.Attribute -import org.objectweb.asm.Handle -import org.objectweb.asm.Label -import org.objectweb.asm.MethodVisitor -import org.objectweb.asm.TypePath - -/** - * A method visitor that creates or replaces a method body. - * - * Override [emitNewCode] to build the method body. - */ -abstract class BodyReplacingMethodVisitor( - private val createBody: Boolean, - next: MethodVisitor? -) : MethodVisitor(OPCODE_VERSION, next) { - - // Following methods are for things that we need to keep. - // Since they're all calling the super method, we can just remove them, but we keep them - // just to clarify what we're keeping. - - final override fun visitParameter(name: String?, access: Int) { - super.visitParameter(name, access) - } - - final override fun visitAnnotationDefault(): AnnotationVisitor? { - return super.visitAnnotationDefault() - } - - final override fun visitAnnotation(descriptor: String?, visible: Boolean): AnnotationVisitor? { - return super.visitAnnotation(descriptor, visible) - } - - final override fun visitTypeAnnotation( - typeRef: Int, - typePath: TypePath?, - descriptor: String?, - visible: Boolean - ): AnnotationVisitor? { - return super.visitTypeAnnotation(typeRef, typePath, descriptor, visible) - } - - final override fun visitAnnotableParameterCount(parameterCount: Int, visible: Boolean) { - super.visitAnnotableParameterCount(parameterCount, visible) - } - - final override fun visitParameterAnnotation( - parameter: Int, - descriptor: String?, - visible: Boolean - ): AnnotationVisitor? { - return super.visitParameterAnnotation(parameter, descriptor, visible) - } - - final override fun visitAttribute(attribute: Attribute?) { - super.visitAttribute(attribute) - } - - /** - * Control when to emit the code. We use this to ignore all visitXxx method calls caused by - * the original method, so we'll remove all the original code. - * - * Only when visitXxx methods are called from [emitNewCode], we pass-through to the base class, - * so the body will be generated. - * - * (See also https://asm.ow2.io/asm4-guide.pdf section 3.2.1 about the MethovVisitor - * call order.) - */ - private var emitCode = false - - /** - * This value will be set as true when [visitCode] is called. In [visitEnd], if this value - * is still false, this means that the original method does not have a body. - * - * We want to forcefully inject a method body in [visitEnd] if [createBody] is true. - */ - private var visitedCode = false - - final override fun visitCode() { - visitedCode = true - super.visitCode() - - try { - emitCode = true - - emitNewCode() - } finally { - emitCode = false - } - } - - final override fun visitEnd() { - if (!visitedCode && createBody) { - visitCode() - } - super.visitEnd() - } - - /** - * Subclass must implement it and emit code, and call [visitMaxs] at the end. - */ - abstract fun emitNewCode() - - final override fun visitMaxs(maxStack: Int, maxLocals: Int) { - if (emitCode) { - super.visitMaxs(maxStack, maxLocals) - } - } - - // Following methods are called inside a method body, and we don't want to - // emit any of them, so they are all no-op. - - final override fun visitFrame( - type: Int, - numLocal: Int, - local: Array?, - numStack: Int, - stack: Array? - ) { - if (emitCode) { - super.visitFrame(type, numLocal, local, numStack, stack) - } - } - - final override fun visitInsn(opcode: Int) { - if (emitCode) { - super.visitInsn(opcode) - } - } - - final override fun visitIntInsn(opcode: Int, operand: Int) { - if (emitCode) { - super.visitIntInsn(opcode, operand) - } - } - - final override fun visitVarInsn(opcode: Int, varIndex: Int) { - if (emitCode) { - super.visitVarInsn(opcode, varIndex) - } - } - - final override fun visitTypeInsn(opcode: Int, type: String?) { - if (emitCode) { - super.visitTypeInsn(opcode, type) - } - } - - final override fun visitFieldInsn( - opcode: Int, - owner: String?, - name: String?, - descriptor: String? - ) { - if (emitCode) { - super.visitFieldInsn(opcode, owner, name, descriptor) - } - } - - final override fun visitMethodInsn( - opcode: Int, - owner: String?, - name: String?, - descriptor: String?, - isInterface: Boolean - ) { - if (emitCode) { - super.visitMethodInsn(opcode, owner, name, descriptor, isInterface) - } - } - - final override fun visitInvokeDynamicInsn( - name: String?, - descriptor: String?, - bootstrapMethodHandle: Handle?, - vararg bootstrapMethodArguments: Any? - ) { - if (emitCode) { - super.visitInvokeDynamicInsn( - name, descriptor, bootstrapMethodHandle, - *bootstrapMethodArguments - ) - } - } - - final override fun visitJumpInsn(opcode: Int, label: Label?) { - if (emitCode) { - super.visitJumpInsn(opcode, label) - } - } - - final override fun visitLabel(label: Label?) { - if (emitCode) { - super.visitLabel(label) - } - } - - final override fun visitLdcInsn(value: Any?) { - if (emitCode) { - super.visitLdcInsn(value) - } - } - - final override fun visitIincInsn(varIndex: Int, increment: Int) { - if (emitCode) { - super.visitIincInsn(varIndex, increment) - } - } - - final override fun visitTableSwitchInsn( - min: Int, - max: Int, - dflt: Label?, - vararg labels: Label? - ) { - if (emitCode) { - super.visitTableSwitchInsn(min, max, dflt, *labels) - } - } - - final override fun visitLookupSwitchInsn( - dflt: Label?, - keys: IntArray?, - labels: Array? - ) { - if (emitCode) { - super.visitLookupSwitchInsn(dflt, keys, labels) - } - } - - final override fun visitMultiANewArrayInsn(descriptor: String?, numDimensions: Int) { - if (emitCode) { - super.visitMultiANewArrayInsn(descriptor, numDimensions) - } - } - - final override fun visitInsnAnnotation( - typeRef: Int, - typePath: TypePath?, - descriptor: String?, - visible: Boolean - ): AnnotationVisitor? { - if (emitCode) { - return super.visitInsnAnnotation(typeRef, typePath, descriptor, visible) - } - return null - } - - final override fun visitTryCatchBlock( - start: Label?, - end: Label?, - handler: Label?, - type: String? - ) { - if (emitCode) { - super.visitTryCatchBlock(start, end, handler, type) - } - } - - final override fun visitTryCatchAnnotation( - typeRef: Int, - typePath: TypePath?, - descriptor: String?, - visible: Boolean - ): AnnotationVisitor? { - if (emitCode) { - return super.visitTryCatchAnnotation(typeRef, typePath, descriptor, visible) - } - return null - } - - final override fun visitLocalVariable( - name: String?, - descriptor: String?, - signature: String?, - start: Label?, - end: Label?, - index: Int - ) { - if (emitCode) { - super.visitLocalVariable(name, descriptor, signature, start, end, index) - } - } - - final override fun visitLocalVariableAnnotation( - typeRef: Int, - typePath: TypePath?, - start: Array?, - end: Array?, - index: IntArray?, - descriptor: String?, - visible: Boolean - ): AnnotationVisitor? { - if (emitCode) { - return super.visitLocalVariableAnnotation( - typeRef, typePath, start, end, index, descriptor, visible - ) - } - return null - } - - final override fun visitLineNumber(line: Int, start: Label?) { - if (emitCode) { - super.visitLineNumber(line, start) - } - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/Helper.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/Helper.kt deleted file mode 100644 index dc4f26bdda34..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/Helper.kt +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.visitors - -import com.android.hoststubgen.HostStubGenErrors -import com.android.hoststubgen.asm.ClassNodes -import com.android.hoststubgen.asm.clearVisibility -import com.android.hoststubgen.asm.getVisibility -import com.android.hoststubgen.asm.isStatic - -const val NOT_COMPATIBLE: Int = -1 - -/** - * Make sure substitution from and to methods have matching definition. - * (static-ness, etc) - * - * If the methods are compatible, return the "merged" [access] of the new method. - * - * If they are not compatible, returns [NOT_COMPATIBLE] - */ -fun checkSubstitutionMethodCompatibility( - classes: ClassNodes, - className: String, - fromMethodName: String, // the one with the annotation - toMethodName: String, // the one with either a "_host" or "$ravenwood" prefix. (typically) - descriptor: String, - errors: HostStubGenErrors, -): Int { - val from = classes.findMethod(className, fromMethodName, descriptor) - if (from == null) { - errors.onErrorFound( - "Substitution-from method not found: $className.$fromMethodName$descriptor" - ) - return NOT_COMPATIBLE - } - val to = classes.findMethod(className, toMethodName, descriptor) - if (to == null) { - // This shouldn't happen, because the visitor visited this method... - errors.onErrorFound( - "Substitution-to method not found: $className.$toMethodName$descriptor" - ) - return NOT_COMPATIBLE - } - - if (from.isStatic() != to.isStatic()) { - errors.onErrorFound( - "Substitution method must have matching static-ness: " + - "$className.$fromMethodName$descriptor" - ) - return NOT_COMPATIBLE - } - - // Return the substitution's access flag but with the original method's visibility. - return clearVisibility (to.access) or getVisibility(from.access) -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/ImplGeneratingAdapter.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/ImplGeneratingAdapter.kt deleted file mode 100644 index 567a69e43b58..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/ImplGeneratingAdapter.kt +++ /dev/null @@ -1,427 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.visitors - -import com.android.hoststubgen.asm.CLASS_INITIALIZER_DESC -import com.android.hoststubgen.asm.CLASS_INITIALIZER_NAME -import com.android.hoststubgen.asm.ClassNodes -import com.android.hoststubgen.asm.prependArgTypeToMethodDescriptor -import com.android.hoststubgen.asm.writeByteCodeToPushArguments -import com.android.hoststubgen.asm.writeByteCodeToReturn -import com.android.hoststubgen.filters.FilterPolicy -import com.android.hoststubgen.filters.FilterPolicyWithReason -import com.android.hoststubgen.filters.OutputFilter -import com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore -import com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute -import com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow -import com.android.hoststubgen.hosthelper.HostTestUtils -import com.android.hoststubgen.log -import org.objectweb.asm.ClassVisitor -import org.objectweb.asm.MethodVisitor -import org.objectweb.asm.Opcodes -import org.objectweb.asm.Opcodes.INVOKEINTERFACE -import org.objectweb.asm.Opcodes.INVOKESTATIC -import org.objectweb.asm.Opcodes.INVOKEVIRTUAL -import org.objectweb.asm.Type - -/** - * An adapter that generates the "impl" class file from an input class file. - */ -class ImplGeneratingAdapter( - classes: ClassNodes, - nextVisitor: ClassVisitor, - filter: OutputFilter, - options: Options, -) : BaseAdapter(classes, nextVisitor, filter, options) { - - private var classLoadHooks: List = emptyList() - - override fun visit( - version: Int, - access: Int, - name: String, - signature: String?, - superName: String?, - interfaces: Array - ) { - super.visit(version, access, name, signature, superName, interfaces) - - classLoadHooks = filter.getClassLoadHooks(currentClassName) - - // classLoadHookMethod is non-null, then we need to inject code to call it - // in the class initializer. - // If the target class already has a class initializer, then we need to inject code to it. - // Otherwise, we need to create one. - - if (classLoadHooks.isNotEmpty()) { - log.d(" ClassLoadHooks: $classLoadHooks") - if (!classes.hasClassInitializer(currentClassName)) { - injectClassLoadHook() - } - } - } - - private fun injectClassLoadHook() { - writeRawMembers { - // Create a class initializer to call onClassLoaded(). - // Each class can only have at most one class initializer, but the base class - // StaticInitMerger will merge it with the existing one, if any. - visitMethod( - Opcodes.ACC_PRIVATE or Opcodes.ACC_STATIC, - CLASS_INITIALIZER_NAME, - "()V", - null, - null - )!!.let { mv -> - // Method prologue - mv.visitCode() - - writeClassLoadHookCalls(mv) - mv.visitInsn(Opcodes.RETURN) - - // Method epilogue - mv.visitMaxs(0, 0) - mv.visitEnd() - } - } - } - - private fun writeClassLoadHookCalls(mv: MethodVisitor) { - classLoadHooks.forEach { classLoadHook -> - // First argument: the class type. - mv.visitLdcInsn(Type.getType("L$currentClassName;")) - - // Second argument: method name - mv.visitLdcInsn(classLoadHook) - - // Call HostTestUtils.onClassLoaded(). - mv.visitMethodInsn( - INVOKESTATIC, - HostTestUtils.CLASS_INTERNAL_NAME, - "onClassLoaded", - "(Ljava/lang/Class;Ljava/lang/String;)V", - false - ) - } - } - - override fun updateAccessFlags( - access: Int, - name: String, - descriptor: String, - policy: FilterPolicy, - ): Int { - if (policy.isMethodRewriteBody) { - // If we are rewriting the entire method body, we need - // to convert native methods to non-native - return access and Opcodes.ACC_NATIVE.inv() - } - return access - } - - override fun visitMethodInner( - access: Int, - name: String, - descriptor: String, - signature: String?, - exceptions: Array?, - policy: FilterPolicyWithReason, - substituted: Boolean, - superVisitor: MethodVisitor?, - ): MethodVisitor? { - var innerVisitor = superVisitor - - // If method logging is enabled, inject call to the logging method. - val methodCallHooks = filter.getMethodCallHooks(currentClassName, name, descriptor) - if (methodCallHooks.isNotEmpty()) { - innerVisitor = MethodCallHookInjectingAdapter( - name, - descriptor, - methodCallHooks, - innerVisitor, - ) - } - - // If this class already has a class initializer and a class load hook is needed, then - // we inject code. - if (classLoadHooks.isNotEmpty() && - name == CLASS_INITIALIZER_NAME && - descriptor == CLASS_INITIALIZER_DESC - ) { - innerVisitor = ClassLoadHookInjectingMethodAdapter(innerVisitor) - } - - fun MethodVisitor.withAnnotation(descriptor: String): MethodVisitor { - this.visitAnnotation(descriptor, true) - return this - } - - log.withIndent { - // When we encounter native methods, we want to forcefully - // inject a method body. Also see [updateAccessFlags]. - val forceCreateBody = (access and Opcodes.ACC_NATIVE) != 0 - when (policy.policy) { - FilterPolicy.Throw -> { - log.v("Making method throw...") - return ThrowingMethodAdapter(forceCreateBody, innerVisitor) - .withAnnotation(HostStubGenProcessedAsThrow.CLASS_DESCRIPTOR) - } - FilterPolicy.Ignore -> { - log.v("Making method ignored...") - return IgnoreMethodAdapter(descriptor, forceCreateBody, innerVisitor) - .withAnnotation(HostStubGenProcessedAsIgnore.CLASS_DESCRIPTOR) - } - FilterPolicy.Redirect -> { - log.v("Redirecting method...") - return RedirectMethodAdapter( - access, name, descriptor, - forceCreateBody, innerVisitor - ) - .withAnnotation(HostStubGenProcessedAsSubstitute.CLASS_DESCRIPTOR) - } - else -> {} - } - } - - if (filter.hasAnyMethodCallReplace()) { - innerVisitor = MethodCallReplacingAdapter(name, innerVisitor) - } - if (substituted) { - innerVisitor?.withAnnotation(HostStubGenProcessedAsSubstitute.CLASS_DESCRIPTOR) - } - - return innerVisitor - } - - /** - * A method adapter that replaces the method body with a HostTestUtils.onThrowMethodCalled() - * call. - */ - private inner class ThrowingMethodAdapter( - createBody: Boolean, - next: MethodVisitor? - ) : BodyReplacingMethodVisitor(createBody, next) { - override fun emitNewCode() { - visitMethodInsn( - INVOKESTATIC, - HostTestUtils.CLASS_INTERNAL_NAME, - "onThrowMethodCalled", - "()V", - false - ) - - // We still need a RETURN opcode for the return type. - // For now, let's just inject a `throw`. - visitTypeInsn(Opcodes.NEW, "java/lang/RuntimeException") - visitInsn(Opcodes.DUP) - visitLdcInsn("Unreachable") - visitMethodInsn( - Opcodes.INVOKESPECIAL, "java/lang/RuntimeException", - "", "(Ljava/lang/String;)V", false - ) - visitInsn(Opcodes.ATHROW) - - // visitMaxs(3, if (isStatic) 0 else 1) - visitMaxs(0, 0) // We let ASM figure them out. - } - } - - /** - * A method adapter that replaces the method body with a no-op return. - */ - private inner class IgnoreMethodAdapter( - val descriptor: String, - createBody: Boolean, - next: MethodVisitor? - ) : BodyReplacingMethodVisitor(createBody, next) { - override fun emitNewCode() { - when (Type.getReturnType(descriptor)) { - Type.VOID_TYPE -> visitInsn(Opcodes.RETURN) - Type.BOOLEAN_TYPE, Type.BYTE_TYPE, Type.CHAR_TYPE, Type.SHORT_TYPE, - Type.INT_TYPE -> { - visitInsn(Opcodes.ICONST_0) - visitInsn(Opcodes.IRETURN) - } - Type.LONG_TYPE -> { - visitInsn(Opcodes.LCONST_0) - visitInsn(Opcodes.LRETURN) - } - Type.FLOAT_TYPE -> { - visitInsn(Opcodes.FCONST_0) - visitInsn(Opcodes.FRETURN) - } - Type.DOUBLE_TYPE -> { - visitInsn(Opcodes.DCONST_0) - visitInsn(Opcodes.DRETURN) - } - else -> { - visitInsn(Opcodes.ACONST_NULL) - visitInsn(Opcodes.ARETURN) - } - } - visitMaxs(0, 0) // We let ASM figure them out. - } - } - - /** - * A method adapter that rewrite a method body with a - * call to a method in the redirection class. - */ - private inner class RedirectMethodAdapter( - access: Int, - private val name: String, - private val descriptor: String, - createBody: Boolean, - next: MethodVisitor? - ) : BodyReplacingMethodVisitor(createBody, next) { - - private val isStatic = (access and Opcodes.ACC_STATIC) != 0 - - override fun emitNewCode() { - var targetDescriptor = descriptor - var argOffset = 0 - - // For non-static method, we need to tweak it a bit. - if (!isStatic) { - // Push `this` as the first argument. - this.visitVarInsn(Opcodes.ALOAD, 0) - - // Update the descriptor -- add this class's type as the first argument - // to the method descriptor. - targetDescriptor = prependArgTypeToMethodDescriptor( - descriptor, - currentClassName, - ) - - // Shift the original arguments by one. - argOffset = 1 - } - - writeByteCodeToPushArguments(descriptor, this, argOffset) - - visitMethodInsn( - INVOKESTATIC, - redirectionClass, - name, - targetDescriptor, - false - ) - - writeByteCodeToReturn(descriptor, this) - - visitMaxs(99, 0) // We let ASM figure them out. - } - } - - /** - * Inject calls to the method call hooks. - * - * Note, when the target method is a constructor, it may contain calls to `super(...)` or - * `this(...)`. The logging code will be injected *before* such calls. - */ - private inner class MethodCallHookInjectingAdapter( - val name: String, - val descriptor: String, - val hooks: List, - next: MethodVisitor?, - ) : MethodVisitor(OPCODE_VERSION, next) { - override fun visitCode() { - super.visitCode() - - hooks.forEach { hook -> - mv.visitLdcInsn(Type.getType("L$currentClassName;")) - visitLdcInsn(name) - visitLdcInsn(descriptor) - visitLdcInsn(hook) - - visitMethodInsn( - INVOKESTATIC, - HostTestUtils.CLASS_INTERNAL_NAME, - "callMethodCallHook", - "(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", - false - ) - } - } - } - - /** - * Inject a class load hook call. - */ - private inner class ClassLoadHookInjectingMethodAdapter( - next: MethodVisitor? - ) : MethodVisitor(OPCODE_VERSION, next) { - override fun visitCode() { - super.visitCode() - - writeClassLoadHookCalls(this) - } - } - - private inner class MethodCallReplacingAdapter( - val callerMethodName: String, - next: MethodVisitor?, - ) : MethodVisitor(OPCODE_VERSION, next) { - override fun visitMethodInsn( - opcode: Int, - owner: String?, - name: String?, - descriptor: String?, - isInterface: Boolean, - ) { - when (opcode) { - INVOKESTATIC, INVOKEVIRTUAL, INVOKEINTERFACE -> {} - else -> { - // Don't touch other opcodes. - super.visitMethodInsn(opcode, owner, name, descriptor, isInterface) - return - } - } - val to = filter.getMethodCallReplaceTo( - currentClassName, callerMethodName, owner!!, name!!, descriptor!! - ) - - if (to == null - // Don't replace if the target is the callsite. - || (to.className == currentClassName && to.methodName == callerMethodName) - ) { - super.visitMethodInsn(opcode, owner, name, descriptor, isInterface) - return - } - - // Replace the method call with a (static) call to the target method. - // If it's a non-static call, the target method's first argument will receive "this". - // (Because of that, we don't need to manipulate the stack. Just replace the - // method call.) - - val toDesc = if (opcode == INVOKESTATIC) { - // Static call to static call, no need to change the desc. - descriptor - } else { - // Need to prepend the "this" type to the descriptor. - prependArgTypeToMethodDescriptor(descriptor, owner) - } - - mv.visitMethodInsn( - INVOKESTATIC, - to.className, - to.methodName, - toDesc, - false - ) - } - } -} diff --git a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/PackageRedirectRemapper.kt b/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/PackageRedirectRemapper.kt deleted file mode 100644 index e90ecd7ef678..000000000000 --- a/tools/hoststubgen/hoststubgen/src/com/android/hoststubgen/visitors/PackageRedirectRemapper.kt +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.visitors - -import com.android.hoststubgen.asm.toJvmClassName -import org.objectweb.asm.commons.Remapper - -/** - * A [Remapper] for `--package-redirect` - * - * This is a feature to update all calls to specific packages to another package, which allows - * implementing a class in a different package, when the original package isn't allowed to modify. - * - * For example, using this, we can implement `dalvik.*` APIs in a separate package, and update - * all calls to the `dalvik` package to a different package. - * - * For this purpose, we don't expect the "renamed-from" classes to be in the target jar, - * so we don't apply the remapper to them. (The exclusion happens at the callsite of this class) - * - * TODO: Currently it's not used. Maybe remove, or just unify with the other remapper feature - * with TextFileFilterPolicyParser.kt. - */ -class PackageRedirectRemapper( - packageRedirects: List>, - ) : Remapper() { - - /** - * Example: `dalvik/` -> `com/android/hostsubgen/substitution/dalvik/` - */ - private val packageRedirectsWithSlash: List> = packageRedirects.map { - p -> Pair(p.first.toJvmClassName() + "/", p.second.toJvmClassName() + "/") - } - - /** - * Cache. - * If a class is a redirect-from class, then the "to" class name will be stored as the value. - * Otherwise, "" will be stored. - */ - private val cache = mutableMapOf() - - /** - * Return whether any redirect is defined. - */ - val isEmpty get() = packageRedirectsWithSlash.isEmpty() - - override fun map(internalName: String?): String? { - if (internalName == null) { - return null - } - val to = mapInner(internalName) - return to ?: internalName - } - - /** - * Internal "map" function. Unlike [map(String)], this method will return null - * if a class is not a redirect-from class. - */ - private fun mapInner(internalName: String): String? { - cache[internalName]?.let { - return if (it.isEmpty()) null else it - } - - var ret = "" - packageRedirectsWithSlash.forEach { fromTo -> - if (internalName.startsWith(fromTo.first)) { - ret = fromTo.second + internalName.substring(fromTo.first.length) - } - } - cache.set(internalName, ret) - - return if (ret.isEmpty()) null else ret - } - - /** - * Return true if a class is a redirect-from class. - */ - fun isTarget(internalName: String): Boolean { - return mapInner(internalName) != null - } -} - diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/Android.bp b/tools/hoststubgen/hoststubgen/test-tiny-framework/Android.bp deleted file mode 100644 index ba2c869adfe8..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/Android.bp +++ /dev/null @@ -1,166 +0,0 @@ -package { - // See: http://go/android-license-faq - // A large-scale-change added 'default_applicable_licenses' to import - // all of the 'license_kinds' from "frameworks_base_license" - // to get the below license kinds: - // SPDX-license-identifier-Apache-2.0 - default_applicable_licenses: ["frameworks_base_license"], -} - -// A library that simulates framework-all.jar -java_library { - name: "hoststubgen-test-tiny-framework", - installable: true, - host_supported: true, - srcs: ["tiny-framework/src/**/*.java"], - static_libs: [ - "hoststubgen-annotations", - ], - visibility: ["//frameworks/base/tools/hoststubgen:__subpackages__"], -} - -// Create stub/impl jars from "hoststubgen-test-tiny-framework", using the following 3 rules. -java_genrule_host { - name: "hoststubgen-test-tiny-framework-host-base", - defaults: ["hoststubgen-command-defaults"], - cmd: hoststubgen_common_options + - "--in-jar $(location :hoststubgen-test-tiny-framework) " + - "--policy-override-file $(location policy-override-tiny-framework.txt) " + - "--package-redirect com.unsupported:com.supported ", - srcs: [ - ":hoststubgen-test-tiny-framework", - "policy-override-tiny-framework.txt", - ], - visibility: ["//visibility:private"], -} - -java_genrule_host { - name: "hoststubgen-test-tiny-framework-host", - cmd: "cp $(in) $(out)", - srcs: [ - ":hoststubgen-test-tiny-framework-host-base{host.jar}", - ], - out: [ - "host.jar", - ], - visibility: ["//visibility:private"], -} - -// Same as "hoststubgen-test-tiny-framework-host", but with more options, to test more hoststubgen -// features. -java_genrule_host { - name: "hoststubgen-test-tiny-framework-host-ext-base", - defaults: ["hoststubgen-command-defaults"], - cmd: hoststubgen_common_options + - "--in-jar $(location :hoststubgen-test-tiny-framework) " + - "--policy-override-file $(location policy-override-tiny-framework.txt) " + - "--package-redirect com.unsupported:com.supported " + - - // More options. - "--default-method-call-hook com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall " + - "--default-class-load-hook com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded ", - srcs: [ - ":hoststubgen-test-tiny-framework", - "policy-override-tiny-framework.txt", - ], - visibility: ["//visibility:private"], -} - -java_genrule_host { - name: "hoststubgen-test-tiny-framework-host-ext", - cmd: "cp $(in) $(out)", - srcs: [ - ":hoststubgen-test-tiny-framework-host-ext-base{host.jar}", - ], - out: [ - "host.jar", - ], - visibility: ["//visibility:private"], -} - -// Compile the test jar, using 2 rules. -// 1. Build the test against the original framework. -java_library_host { - name: "hoststubgen-test-tiny-test-lib", - srcs: ["tiny-test/src/**/*.java"], - - libs: [ - "hoststubgen-test-tiny-framework", - ], - static_libs: [ - "junit", - "truth", - - // http://cs/h/googleplex-android/platform/superproject/main/+/main:platform_testing/libraries/annotations/src/android/platform/test/annotations/ - "platform-test-annotations", - ], - visibility: ["//visibility:private"], -} - -// 2. Link "hoststubgen-test-tiny-test-lib" with necessary runtime dependencies, so it can be -// executed stand-alone. -java_test_host { - name: "hoststubgen-test-tiny-test", - test_config: "AndroidTest-host.xml", - static_libs: [ - "hoststubgen-test-tiny-test-lib", - "hoststubgen-helper-runtime", - "hoststubgen-test-tiny-framework-host", - ], - test_suites: ["general-tests"], -} - -// Dump the original, stub and impl jars as text files. -// We use them in test-and-update-golden.sh. -java_genrule_host { - name: "hoststubgen-test-tiny-framework-orig-dump", - defaults: ["hoststubgen-jar-dump-defaults"], - srcs: [ - ":hoststubgen-test-tiny-framework", - ], - out: [ - "01-hoststubgen-test-tiny-framework-orig-dump.txt", - ], - visibility: ["//visibility:private"], -} - -java_genrule_host { - name: "hoststubgen-test-tiny-framework-host-dump", - defaults: ["hoststubgen-jar-dump-defaults"], - srcs: [ - ":hoststubgen-test-tiny-framework-host", - ], - out: [ - "03-hoststubgen-test-tiny-framework-host-dump.txt", - ], - visibility: ["//visibility:private"], -} - -java_genrule_host { - name: "hoststubgen-test-tiny-framework-host-ext-dump", - defaults: ["hoststubgen-jar-dump-defaults"], - srcs: [ - ":hoststubgen-test-tiny-framework-host-ext", - ], - out: [ - "13-hoststubgen-test-tiny-framework-host-ext-dump.txt", - ], - visibility: ["//visibility:private"], -} - -// Run it with `atest`. Compare the dump of the jar files to the golden output. -python_test_host { - name: "tiny-framework-dump-test", - srcs: [ - "tiny-framework-dump-test.py", - ], - data: [ - "golden-output/*.txt", - ], - java_data: [ - "hoststubgen-test-tiny-framework-orig-dump", - "hoststubgen-test-tiny-framework-host-dump", - "hoststubgen-test-tiny-framework-host-ext-dump", - ], - test_suites: ["general-tests"], -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/AndroidTest-host.xml b/tools/hoststubgen/hoststubgen/test-tiny-framework/AndroidTest-host.xml deleted file mode 100644 index 84aad69c33bc..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/AndroidTest-host.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/README.md b/tools/hoststubgen/hoststubgen/test-tiny-framework/README.md deleted file mode 100644 index 344b4e953b23..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# HostStubGen: tiny-framework test - -This directory contains a small classes that "simulates" framework.jar, and tests against it. - -This test is agnostic to Android, and it doesn't use any android framework code or knowledge. - -## How to run - -- With `atest`. This is the proper way to run it, but `atest` has known problems that may - affect the result. If you see weird problems, try the next `run-ravenwood-test` command. - -``` -$ atest hoststubgen-test-tiny-test -``` - -- `run-test-manually.sh` also run the test, but it builds the stub/impl jars and the test without - using the build system. This is useful for debugging the tool. - -``` -$ ./run-test-manually.sh -``` \ No newline at end of file diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/annotation-allowed-classes-tiny-framework.txt b/tools/hoststubgen/hoststubgen/test-tiny-framework/annotation-allowed-classes-tiny-framework.txt deleted file mode 100644 index de4cb0c536c1..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/annotation-allowed-classes-tiny-framework.txt +++ /dev/null @@ -1,29 +0,0 @@ -# Only classes listed here can use the hoststubgen annotations. - -# For each class, we check each item in this file, and when a match is found, we -# either allow it if the line doesn't have a !, or disallow if the line has a !. -# All the lines after the matching line will be ignored. - - -# To allow a specific class to use annotations: -# com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations - -# To disallow a specific class to use annotations: -# !com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations - -# To allow a specific package to use annotations: -# com.android.hoststubgen.test.* - -# To disallow a specific package to use annotations: -# !com.android.hoststubgen.test.* - - -com.android.hoststubgen.test.tinyframework.* -com.supported.* -com.unsupported.* - -# Use this to allow all packages -# * - -# Use this to allow all packages -# !* \ No newline at end of file diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/diff-and-update-golden.sh b/tools/hoststubgen/hoststubgen/test-tiny-framework/diff-and-update-golden.sh deleted file mode 100755 index 3726ca972564..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/diff-and-update-golden.sh +++ /dev/null @@ -1,134 +0,0 @@ -#!/bin/bash -# Copyright (C) 2023 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -help() { - cat <<'EOF' - - diff-and-update-golden.sh [OPTIONS] - - Compare the generated jar files from tiny-framework to the "golden" files. - - OPTIONS: - -u: Update the golden files. - - -3: Run `meld` to compare original, stub and impl jar files in 3-way diff. - This is useful to visualize the exact differences between 3 jar files. - - -2: Run `meld` to compare original <-> impl, and impl <-> stub as two different diffs. -EOF -} - -source "${0%/*}"/../../common.sh - -SCRIPT_NAME="${0##*/}" - -GOLDEN_DIR=golden-output -mkdir -p $GOLDEN_DIR - -DIFF_CMD=${DIFF:-diff -u --ignore-blank-lines --ignore-space-change} - -update=0 -three_way=0 -two_way=0 -while getopts "u32" opt; do -case "$opt" in - u) - update=1 - ;; - 3) - three_way=1 - ;; - 2) - two_way=1 - ;; - '?') - help - exit 1 - ;; -esac -done -shift $(($OPTIND - 1)) - - -# Build the dump files, which are the input of this test. -run m dump-jar tiny-framework-dump-test - - -# Get the path to the generate text files. (not the golden files.) -# We get them from $OUT/module-info.json - -files=( -$(python3 -c ' -import sys -import os -import json - -with open(sys.argv[1], "r") as f: - data = json.load(f) - - # Equivalent to: jq -r '.["tiny-framework-dump-test"]["installed"][]' - for path in data["tiny-framework-dump-test"]["installed"]: - - if "golden-output" in path: - continue - if path.endswith(".txt"): - print(os.getenv("ANDROID_BUILD_TOP") + "/" + path) -' $OUT/module-info.json) -) - -# Next, compare each file and update them in $GOLDEN_DIR - -any_file_changed=0 - -for file in ${files[*]} ; do - name=$(basename $file) - echo "# Checking $name ..." - - file_changed=0 - if run $DIFF_CMD $GOLDEN_DIR/$name $file; then - : # No diff - else - file_changed=1 - any_file_changed=1 - fi - - if (( $update && $file_changed )) ; then - echo "# Updating $name ..." - run cp $file $GOLDEN_DIR/$name - fi -done - -if (( $three_way )) ; then - echo "# Running 3-way diff with meld..." - run meld ${files[0]} ${files[1]} ${files[2]} & -fi - -if (( $two_way )) ; then - echo "# Running meld..." - run meld --diff ${files[0]} ${files[1]} --diff ${files[1]} ${files[2]} --diff ${files[0]} ${files[2]} -fi - -if (( $any_file_changed == 0 )) ; then - echo "$SCRIPT_NAME: Success: no changes detected." - exit 0 -else - if (( $update )) ; then - echo "$SCRIPT_NAME: Warning: golden files have been updated." - exit 2 - else - echo "$SCRIPT_NAME: Failure: changes detected. See above diff for the details." - exit 3 - fi -fi diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/golden-output/01-hoststubgen-test-tiny-framework-orig-dump.txt b/tools/hoststubgen/hoststubgen/test-tiny-framework/golden-output/01-hoststubgen-test-tiny-framework-orig-dump.txt deleted file mode 100644 index 103e152c7e39..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/golden-output/01-hoststubgen-test-tiny-framework-orig-dump.txt +++ /dev/null @@ -1,3718 +0,0 @@ -## Class: android/hosttest/annotation/HostSideTestClassLoadHook.class - Compiled from "HostSideTestClassLoadHook.java" -public interface android.hosttest.annotation.HostSideTestClassLoadHook extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestClassLoadHook - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 2 - public abstract java.lang.String value(); - descriptor: ()Ljava/lang/String; - flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT -} -SourceFile: "HostSideTestClassLoadHook.java" -RuntimeVisibleAnnotations: - x: #x(#x=[e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestIgnore.class - Compiled from "HostSideTestIgnore.java" -public interface android.hosttest.annotation.HostSideTestIgnore extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestIgnore - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "HostSideTestIgnore.java" -RuntimeVisibleAnnotations: - x: #x(#x=[e#x.#x,e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestKeep.class - Compiled from "HostSideTestKeep.java" -public interface android.hosttest.annotation.HostSideTestKeep extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestKeep - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "HostSideTestKeep.java" -RuntimeVisibleAnnotations: - x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestRedirect.class - Compiled from "HostSideTestRedirect.java" -public interface android.hosttest.annotation.HostSideTestRedirect extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestRedirect - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "HostSideTestRedirect.java" -RuntimeVisibleAnnotations: - x: #x(#x=[e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.METHOD] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestRedirectionClass.class - Compiled from "HostSideTestRedirectionClass.java" -public interface android.hosttest.annotation.HostSideTestRedirectionClass extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestRedirectionClass - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 2 - public abstract java.lang.String value(); - descriptor: ()Ljava/lang/String; - flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT -} -SourceFile: "HostSideTestRedirectionClass.java" -RuntimeVisibleAnnotations: - x: #x(#x=[e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestRemove.class - Compiled from "HostSideTestRemove.java" -public interface android.hosttest.annotation.HostSideTestRemove extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestRemove - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "HostSideTestRemove.java" -RuntimeVisibleAnnotations: - x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestStaticInitializerKeep.class - Compiled from "HostSideTestStaticInitializerKeep.java" -public interface android.hosttest.annotation.HostSideTestStaticInitializerKeep extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestStaticInitializerKeep - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "HostSideTestStaticInitializerKeep.java" -RuntimeVisibleAnnotations: - x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestSubstitute.class - Compiled from "HostSideTestSubstitute.java" -public interface android.hosttest.annotation.HostSideTestSubstitute extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestSubstitute - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 2 - public abstract java.lang.String suffix(); - descriptor: ()Ljava/lang/String; - flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT -} -SourceFile: "HostSideTestSubstitute.java" -RuntimeVisibleAnnotations: - x: #x(#x=[e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.METHOD] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestThrow.class - Compiled from "HostSideTestThrow.java" -public interface android.hosttest.annotation.HostSideTestThrow extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestThrow - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "HostSideTestThrow.java" -RuntimeVisibleAnnotations: - x: #x(#x=[e#x.#x,e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestWholeClassKeep.class - Compiled from "HostSideTestWholeClassKeep.java" -public interface android.hosttest.annotation.HostSideTestWholeClassKeep extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestWholeClassKeep - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "HostSideTestWholeClassKeep.java" -RuntimeVisibleAnnotations: - x: #x(#x=[e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/tests/HostSideTestSuppress.class - Compiled from "HostSideTestSuppress.java" -public interface android.hosttest.annotation.tests.HostSideTestSuppress extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/tests/HostSideTestSuppress - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "HostSideTestSuppress.java" -RuntimeVisibleAnnotations: - x: #x(#x=[e#x.#x,e#x.#x,e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD] - ) -## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy.class - Compiled from "IPretendingAidl.java" -public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Proxy - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 2, attributes: 3 - public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Proxy(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy; - - public static int addTwo(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: iload_0 - x: iconst_2 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 a I -} -SourceFile: "IPretendingAidl.java" -NestHost: class com/android/hoststubgen/test/tinyframework/IPretendingAidl -InnerClasses: - public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl - public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub -## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub.class - Compiled from "IPretendingAidl.java" -public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 2, attributes: 3 - public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub; - - public static int addOne(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: iload_0 - x: iconst_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 a I -} -SourceFile: "IPretendingAidl.java" -NestHost: class com/android/hoststubgen/test/tinyframework/IPretendingAidl -InnerClasses: - public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl - public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub -## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl.class - Compiled from "IPretendingAidl.java" -public interface com.android.hoststubgen.test.tinyframework.IPretendingAidl - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 0, attributes: 3 -} -SourceFile: "IPretendingAidl.java" -NestMembers: - com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub - com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy -InnerClasses: - public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl - public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub -## Class: com/android/hoststubgen/test/tinyframework/R$Nested.class - Compiled from "R.java" -public class com.android.hoststubgen.test.tinyframework.R$Nested - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/R$Nested - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 2, attributes: 3 - public static int[] ARRAY; - descriptor: [I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - - public com.android.hoststubgen.test.tinyframework.R$Nested(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/R$Nested; - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: iconst_1 - x: newarray int - x: dup - x: iconst_0 - x: iconst_1 - x: iastore - x: putstatic #x // Field ARRAY:[I - x: return - LineNumberTable: -} -SourceFile: "R.java" -NestHost: class com/android/hoststubgen/test/tinyframework/R -InnerClasses: - public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/R$Nested of class com/android/hoststubgen/test/tinyframework/R -## Class: com/android/hoststubgen/test/tinyframework/R.class - Compiled from "R.java" -public class com.android.hoststubgen.test.tinyframework.R - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/R - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 3 - public com.android.hoststubgen.test.tinyframework.R(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/R; -} -SourceFile: "R.java" -NestMembers: - com/android/hoststubgen/test/tinyframework/R$Nested -InnerClasses: - public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/R$Nested of class com/android/hoststubgen/test/tinyframework/R -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.class - Compiled from "TinyFrameworkAnnotations.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 9, attributes: 2 - public int keep; - descriptor: I - flags: (0x0001) ACC_PUBLIC - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public int remove; - descriptor: I - flags: (0x0001) ACC_PUBLIC - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iconst_1 - x: putfield #x // Field keep:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public int addOne(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: iload_1 - x: iconst_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; - 0 4 1 value I - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public void toBeRemoved(java.lang.String); - descriptor: (Ljava/lang/String;)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: new #x // class java/lang/RuntimeException - x: dup - x: invokespecial #x // Method java/lang/RuntimeException."":()V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; - 0 8 1 foo Ljava/lang/String; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRemove - - public int addTwo(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=3, locals=2, args_size=2 - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String not supported on host side - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; - 0 10 1 value I - RuntimeInvisibleAnnotations: - x: #x(#x=s#x) - android.hosttest.annotation.HostSideTestSubstitute( - suffix="_host" - ) - - public int addTwo_host(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: iload_1 - x: iconst_2 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; - 0 4 1 value I - - public static native int nativeAddThree(int); - descriptor: (I)I - flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE - RuntimeInvisibleAnnotations: - x: #x(#x=s#x) - android.hosttest.annotation.HostSideTestSubstitute( - suffix="_host" - ) - - private static int nativeAddThree_host(int); - descriptor: (I)I - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: iload_0 - x: iconst_3 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 value I - - public java.lang.String unsupportedMethod(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: ldc #x // String This value shouldn\'t be seen on the host side. - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 3 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestThrow - - public int toBeIgnored(); - descriptor: ()I - flags: (0x0001) ACC_PUBLIC - Code: - stack=3, locals=1, args_size=1 - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String not supported on host side - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestIgnore -} -SourceFile: "TinyFrameworkAnnotations.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - x: #x(#x=s#x) - android.hosttest.annotation.HostSideTestClassLoadHook( - value="com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded" - ) -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook.class - Compiled from "TinyFrameworkClassLoadHook.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 3, attributes: 2 - public static final java.util.Set> sLoadedClasses; - descriptor: Ljava/util/Set; - flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL - Signature: #x // Ljava/util/Set;>; - - private com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook(); - descriptor: ()V - flags: (0x0002) ACC_PRIVATE - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook; - - public static void onClassLoaded(java.lang.Class); - descriptor: (Ljava/lang/Class;)V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: getstatic #x // Field sLoadedClasses:Ljava/util/Set; - x: aload_0 - x: invokeinterface #x, 2 // InterfaceMethod java/util/Set.add:(Ljava/lang/Object;)Z - x: pop - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 11 0 clazz Ljava/lang/Class; - LocalVariableTypeTable: - Start Length Slot Name Signature - 0 11 0 clazz Ljava/lang/Class<*>; - Signature: #x // (Ljava/lang/Class<*>;)V - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: new #x // class java/util/HashSet - x: dup - x: invokespecial #x // Method java/util/HashSet."":()V - x: putstatic #x // Field sLoadedClasses:Ljava/util/Set; - x: return - LineNumberTable: -} -SourceFile: "TinyFrameworkClassLoadHook.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations.class - Compiled from "TinyFrameworkClassWideAnnotations.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWideAnnotations - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 6, attributes: 2 - public int keep; - descriptor: I - flags: (0x0001) ACC_PUBLIC - - public int remove; - descriptor: I - flags: (0x0001) ACC_PUBLIC - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRemove - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWideAnnotations(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iconst_1 - x: putfield #x // Field keep:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; - - public int addOne(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: iload_1 - x: iconst_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; - 0 4 1 value I - - public int addTwo(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=3, locals=2, args_size=2 - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String not supported on host side - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; - 0 10 1 value I - RuntimeInvisibleAnnotations: - x: #x(#x=s#x) - android.hosttest.annotation.HostSideTestSubstitute( - suffix="_host" - ) - - public int addTwo_host(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: iload_1 - x: iconst_2 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; - 0 4 1 value I - - public void toBeRemoved(java.lang.String); - descriptor: (Ljava/lang/String;)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: new #x // class java/lang/RuntimeException - x: dup - x: invokespecial #x // Method java/lang/RuntimeException."":()V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; - 0 8 1 foo Ljava/lang/String; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRemove - - public java.lang.String unsupportedMethod(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: ldc #x // String This value shouldn\'t be seen on the host side. - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 3 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestThrow -} -SourceFile: "TinyFrameworkClassWideAnnotations.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault.class - Compiled from "TinyFrameworkClassWithInitializerDefault.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithInitializerDefault - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 2, attributes: 2 - public static boolean sInitialized; - descriptor: Z - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static java.lang.Object sObject; - descriptor: Ljava/lang/Object; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithInitializerDefault(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault; - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: iconst_1 - x: putstatic #x // Field sInitialized:Z - x: new #x // class java/lang/Object - x: dup - x: invokespecial #x // Method java/lang/Object."":()V - x: putstatic #x // Field sObject:Ljava/lang/Object; - x: return - LineNumberTable: -} -SourceFile: "TinyFrameworkClassWithInitializerDefault.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub.class - Compiled from "TinyFrameworkClassWithInitializerStub.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithInitializerStub - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 2, attributes: 2 - public static boolean sInitialized; - descriptor: Z - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static java.lang.Object sObject; - descriptor: Ljava/lang/Object; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithInitializerStub(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub; - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: iconst_1 - x: putstatic #x // Field sInitialized:Z - x: new #x // class java/lang/Object - x: dup - x: invokespecial #x // Method java/lang/Object."":()V - x: putstatic #x // Field sObject:Ljava/lang/Object; - x: return - LineNumberTable: -} -SourceFile: "TinyFrameworkClassWithInitializerStub.java" -RuntimeInvisibleAnnotations: - x: #x(#x=s#x) - android.hosttest.annotation.HostSideTestClassLoadHook( - value="com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded" - ) - x: #x() - android.hosttest.annotation.HostSideTestKeep - x: #x() - android.hosttest.annotation.HostSideTestStaticInitializerKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex.class - Compiled from "TinyFrameworkEnumComplex.java" -public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex extends java.lang.Enum - minor version: 0 - major version: 61 - flags: (0x4031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_ENUM - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - super_class: #x // java/lang/Enum - interfaces: 0, fields: 6, methods: 7, attributes: 3 - public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex RED; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex GREEN; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex BLUE; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private final java.lang.String mLongName; - descriptor: Ljava/lang/String; - flags: (0x0012) ACC_PRIVATE, ACC_FINAL - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private final java.lang.String mShortName; - descriptor: Ljava/lang/String; - flags: (0x0012) ACC_PRIVATE, ACC_FINAL - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] $VALUES; - descriptor: [Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x101a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC - - public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] values(); - descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=1, locals=0, args_size=0 - x: getstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: invokevirtual #x // Method "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;".clone:()Ljava/lang/Object; - x: checkcast #x // class "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;" - x: areturn - LineNumberTable: - - public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex valueOf(java.lang.String); - descriptor: (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: aload_0 - x: invokestatic #x // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; - x: checkcast #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 name Ljava/lang/String; - MethodParameters: - Name Flags - mandated - - private com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex(java.lang.String, java.lang.String); - descriptor: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V - flags: (0x0002) ACC_PRIVATE - Code: - stack=3, locals=5, args_size=5 - x: aload_0 - x: aload_1 - x: iload_2 - x: invokespecial #x // Method java/lang/Enum."":(Ljava/lang/String;I)V - x: aload_0 - x: aload_3 - x: putfield #x // Field mLongName:Ljava/lang/String; - x: aload_0 - x: aload 4 - x: putfield #x // Field mShortName:Ljava/lang/String; - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 18 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - 0 18 3 longName Ljava/lang/String; - 0 18 4 shortName Ljava/lang/String; - MethodParameters: - Name Flags - synthetic - synthetic - - - Signature: #x // (Ljava/lang/String;Ljava/lang/String;)V - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public java.lang.String getLongName(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: getfield #x // Field mLongName:Ljava/lang/String; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public java.lang.String getShortName(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: getfield #x // Field mShortName:Ljava/lang/String; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] $values(); - descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=4, locals=0, args_size=0 - x: iconst_3 - x: anewarray #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: dup - x: iconst_0 - x: getstatic #x // Field RED:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: aastore - x: dup - x: iconst_1 - x: getstatic #x // Field GREEN:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: aastore - x: dup - x: iconst_2 - x: getstatic #x // Field BLUE:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: aastore - x: areturn - LineNumberTable: - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=6, locals=0, args_size=0 - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: dup - x: ldc #x // String RED - x: iconst_0 - x: ldc #x // String Red - x: ldc #x // String R - x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V - x: putstatic #x // Field RED:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: dup - x: ldc #x // String GREEN - x: iconst_1 - x: ldc #x // String Green - x: ldc #x // String G - x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V - x: putstatic #x // Field GREEN:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: dup - x: ldc #x // String BLUE - x: iconst_2 - x: ldc #x // String Blue - x: ldc #x // String B - x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V - x: putstatic #x // Field BLUE:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: invokestatic #x // Method $values:()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: putstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: return - LineNumberTable: -} -Signature: #x // Ljava/lang/Enum; -SourceFile: "TinyFrameworkEnumComplex.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple.class - Compiled from "TinyFrameworkEnumSimple.java" -public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple extends java.lang.Enum - minor version: 0 - major version: 61 - flags: (0x4031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_ENUM - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - super_class: #x // java/lang/Enum - interfaces: 0, fields: 3, methods: 5, attributes: 3 - public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple CAT; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple DOG; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] $VALUES; - descriptor: [Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x101a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC - - public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] values(); - descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=1, locals=0, args_size=0 - x: getstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: invokevirtual #x // Method "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;".clone:()Ljava/lang/Object; - x: checkcast #x // class "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;" - x: areturn - LineNumberTable: - - public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple valueOf(java.lang.String); - descriptor: (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: aload_0 - x: invokestatic #x // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; - x: checkcast #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 name Ljava/lang/String; - MethodParameters: - Name Flags - mandated - - private com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple(); - descriptor: (Ljava/lang/String;I)V - flags: (0x0002) ACC_PRIVATE - Code: - stack=3, locals=3, args_size=3 - x: aload_0 - x: aload_1 - x: iload_2 - x: invokespecial #x // Method java/lang/Enum."":(Ljava/lang/String;I)V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 7 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - MethodParameters: - Name Flags - synthetic - synthetic - Signature: #x // ()V - - private static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] $values(); - descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=4, locals=0, args_size=0 - x: iconst_2 - x: anewarray #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: dup - x: iconst_0 - x: getstatic #x // Field CAT:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: aastore - x: dup - x: iconst_1 - x: getstatic #x // Field DOG:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: aastore - x: areturn - LineNumberTable: - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: dup - x: ldc #x // String CAT - x: iconst_0 - x: invokespecial #x // Method "":(Ljava/lang/String;I)V - x: putstatic #x // Field CAT:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: dup - x: ldc #x // String DOG - x: iconst_1 - x: invokespecial #x // Method "":(Ljava/lang/String;I)V - x: putstatic #x // Field DOG:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: invokestatic #x // Method $values:()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: putstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: return - LineNumberTable: -} -Signature: #x // Ljava/lang/Enum; -SourceFile: "TinyFrameworkEnumSimple.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester.class - Compiled from "TinyFrameworkExceptionTester.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTester - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 2, attributes: 2 - public com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTester(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester; - - public static int testException(); - descriptor: ()I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=1, args_size=0 - x: new #x // class java/lang/IllegalStateException - x: dup - x: ldc #x // String Inner exception - x: invokespecial #x // Method java/lang/IllegalStateException."":(Ljava/lang/String;)V - x: athrow - x: astore_0 - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String Outer exception - x: aload_0 - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;Ljava/lang/Throwable;)V - x: athrow - Exception table: - from to target type - 0 10 10 Class java/lang/Exception - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 11 0 e Ljava/lang/Exception; - StackMapTable: number_of_entries = 1 - frame_type = 74 /* same_locals_1_stack_item */ - stack = [ class java/lang/Exception ] -} -SourceFile: "TinyFrameworkExceptionTester.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy.class - Compiled from "TinyFrameworkForTextPolicy.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPolicy - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 17, attributes: 1 - public int stub; - descriptor: I - flags: (0x0001) ACC_PUBLIC - - public int remove; - descriptor: I - flags: (0x0001) ACC_PUBLIC - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPolicy(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iconst_1 - x: putfield #x // Field stub:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - - public int addOne(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: iload_1 - x: iconst_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - 0 4 1 value I - - public void toBeRemoved(java.lang.String); - descriptor: (Ljava/lang/String;)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: new #x // class java/lang/RuntimeException - x: dup - x: invokespecial #x // Method java/lang/RuntimeException."":()V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - 0 8 1 foo Ljava/lang/String; - - public java.lang.String toBeIgnoredObj(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: new #x // class java/lang/RuntimeException - x: dup - x: invokespecial #x // Method java/lang/RuntimeException."":()V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - - public void toBeIgnoredV(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: new #x // class java/lang/RuntimeException - x: dup - x: invokespecial #x // Method java/lang/RuntimeException."":()V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - - public boolean toBeIgnoredZ(); - descriptor: ()Z - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: new #x // class java/lang/RuntimeException - x: dup - x: invokespecial #x // Method java/lang/RuntimeException."":()V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - - public byte toBeIgnoredB(); - descriptor: ()B - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: new #x // class java/lang/RuntimeException - x: dup - x: invokespecial #x // Method java/lang/RuntimeException."":()V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - - public char toBeIgnoredC(); - descriptor: ()C - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: new #x // class java/lang/RuntimeException - x: dup - x: invokespecial #x // Method java/lang/RuntimeException."":()V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - - public short toBeIgnoredS(); - descriptor: ()S - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: new #x // class java/lang/RuntimeException - x: dup - x: invokespecial #x // Method java/lang/RuntimeException."":()V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - - public int toBeIgnoredI(); - descriptor: ()I - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: new #x // class java/lang/RuntimeException - x: dup - x: invokespecial #x // Method java/lang/RuntimeException."":()V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - - public float toBeIgnoredF(); - descriptor: ()F - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: new #x // class java/lang/RuntimeException - x: dup - x: invokespecial #x // Method java/lang/RuntimeException."":()V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - - public double toBeIgnoredD(); - descriptor: ()D - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: new #x // class java/lang/RuntimeException - x: dup - x: invokespecial #x // Method java/lang/RuntimeException."":()V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - - public int addTwo(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=3, locals=2, args_size=2 - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String not supported on host side - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - 0 10 1 value I - - public int addTwo_host(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: iload_1 - x: iconst_2 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - 0 4 1 value I - - public static native int nativeAddThree(int); - descriptor: (I)I - flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE - - public static int addThree_host(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: iload_0 - x: iconst_3 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 value I - - public java.lang.String unsupportedMethod(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: ldc #x // String This value shouldn\'t be seen on the host side. - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 3 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; -} -SourceFile: "TinyFrameworkForTextPolicy.java" -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.class - Compiled from "TinyFrameworkLambdas.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas$Nested - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 8, attributes: 5 - public final java.util.function.Supplier mSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0011) ACC_PUBLIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static final java.util.function.Supplier sSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas$Nested(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 14 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public java.util.function.Supplier getSupplier(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested; - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static java.util.function.Supplier getSupplier_static(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=1, locals=0, args_size=0 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: areturn - LineNumberTable: - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private static java.lang.Integer lambda$getSupplier_static$3(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=1, locals=0, args_size=0 - x: bipush 8 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - - private static java.lang.Integer lambda$getSupplier$2(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=1, locals=0, args_size=0 - x: bipush 7 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - - private static java.lang.Integer lambda$static$1(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=1, locals=0, args_size=0 - x: bipush 6 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - - private static java.lang.Integer lambda$new$0(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=1, locals=0, args_size=0 - x: iconst_5 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=1, locals=0, args_size=0 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: -} -SourceFile: "TinyFrameworkLambdas.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - x: #x() - android.hosttest.annotation.HostSideTestStaticInitializerKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas -BootstrapMethods: - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$new$0:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$getSupplier$2:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$getSupplier_static$3:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$static$1:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; -InnerClasses: - public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested of class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.class - Compiled from "TinyFrameworkLambdas.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 8, attributes: 5 - public final java.util.function.Supplier mSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0011) ACC_PUBLIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static final java.util.function.Supplier sSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 14 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public java.util.function.Supplier getSupplier(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas; - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static java.util.function.Supplier getSupplier_static(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=1, locals=0, args_size=0 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: areturn - LineNumberTable: - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private static java.lang.Integer lambda$getSupplier_static$3(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=1, locals=0, args_size=0 - x: iconst_4 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - - private static java.lang.Integer lambda$getSupplier$2(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=1, locals=0, args_size=0 - x: iconst_3 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - - private static java.lang.Integer lambda$static$1(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=1, locals=0, args_size=0 - x: iconst_2 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - - private static java.lang.Integer lambda$new$0(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=1, locals=0, args_size=0 - x: iconst_1 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=1, locals=0, args_size=0 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: -} -SourceFile: "TinyFrameworkLambdas.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - x: #x() - android.hosttest.annotation.HostSideTestStaticInitializerKeep -NestMembers: - com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested -BootstrapMethods: - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$new$0:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$getSupplier$2:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$getSupplier_static$3:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$static$1:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; -InnerClasses: - public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested of class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo.class - Compiled from "TinyFrameworkMethodCallReplace.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 3, attributes: 3 - public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo; - - public static void startThread(java.lang.Thread); - descriptor: (Ljava/lang/Thread;)V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: iconst_1 - x: invokevirtual #x // Method java/lang/Thread.setDaemon:(Z)V - x: aload_0 - x: invokevirtual #x // Method java/lang/Thread.start:()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 thread Ljava/lang/Thread; - - public static int add(int, int); - descriptor: (II)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=2, args_size=2 - x: iload_0 - x: iload_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 a I - 0 4 1 b I -} -SourceFile: "TinyFrameworkMethodCallReplace.java" -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace -InnerClasses: - public static #x= #x of #x; // ReplaceTo=class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo of class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.class - Compiled from "TinyFrameworkMethodCallReplace.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 5, attributes: 5 - public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace; - - public static boolean nonStaticMethodCallReplaceTester() throws java.lang.Exception; - descriptor: ()Z - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=3, locals=2, args_size=0 - x: new #x // class java/util/concurrent/atomic/AtomicBoolean - x: dup - x: iconst_0 - x: invokespecial #x // Method java/util/concurrent/atomic/AtomicBoolean."":(Z)V - x: astore_0 - x: new #x // class java/lang/Thread - x: dup - x: aload_0 - x: invokedynamic #x, 0 // InvokeDynamic #x:run:(Ljava/util/concurrent/atomic/AtomicBoolean;)Ljava/lang/Runnable; - x: invokespecial #x // Method java/lang/Thread."":(Ljava/lang/Runnable;)V - x: astore_1 - x: aload_1 - x: invokevirtual #x // Method java/lang/Thread.start:()V - x: aload_1 - x: invokevirtual #x // Method java/lang/Thread.join:()V - x: aload_0 - x: invokevirtual #x // Method java/util/concurrent/atomic/AtomicBoolean.get:()Z - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 9 27 0 ab Ljava/util/concurrent/atomic/AtomicBoolean; - 23 13 1 th Ljava/lang/Thread; - Exceptions: - throws java.lang.Exception - - public static int staticMethodCallReplaceTester(); - descriptor: ()I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: iconst_1 - x: iconst_2 - x: invokestatic #x // Method originalAdd:(II)I - x: ireturn - LineNumberTable: - - private static int originalAdd(int, int); - descriptor: (II)I - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=2, args_size=2 - x: iload_0 - x: iload_1 - x: iadd - x: iconst_1 - x: isub - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 6 0 a I - 0 6 1 b I - - private static void lambda$nonStaticMethodCallReplaceTester$0(java.util.concurrent.atomic.AtomicBoolean); - descriptor: (Ljava/util/concurrent/atomic/AtomicBoolean;)V - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: invokestatic #x // Method java/lang/Thread.currentThread:()Ljava/lang/Thread; - x: invokevirtual #x // Method java/lang/Thread.isDaemon:()Z - x: invokevirtual #x // Method java/util/concurrent/atomic/AtomicBoolean.set:(Z)V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 11 0 ab Ljava/util/concurrent/atomic/AtomicBoolean; -} -SourceFile: "TinyFrameworkMethodCallReplace.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -NestMembers: - com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo -BootstrapMethods: - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()V - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.lambda$nonStaticMethodCallReplaceTester$0:(Ljava/util/concurrent/atomic/AtomicBoolean;)V - #x ()V -InnerClasses: - public static #x= #x of #x; // ReplaceTo=class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo of class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace - public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.class - Compiled from "TinyFrameworkNative.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 14, attributes: 2 - int value; - descriptor: I - flags: (0x0000) - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNative(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; - - public static native int nativeAddTwo(int); - descriptor: (I)I - flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect - - public static int nativeAddTwo_should_be_like_this(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=1, locals=1, args_size=1 - x: iload_0 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeAddTwo:(I)I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 arg I - - public static native long nativeLongPlus(long, long); - descriptor: (JJ)J - flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect - - public static long nativeLongPlus_should_be_like_this(long, long); - descriptor: (JJ)J - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=4, args_size=2 - x: lload_0 - x: lload_2 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeLongPlus:(JJ)J - x: lreturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 6 0 arg1 J - 0 6 2 arg2 J - - public void setValue(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: iload_1 - x: putfield #x // Field value:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; - 0 6 1 v I - - public native int nativeNonStaticAddToValue(int); - descriptor: (I)I - flags: (0x0101) ACC_PUBLIC, ACC_NATIVE - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect - - public int nativeNonStaticAddToValue_should_be_like_this(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: iload_1 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeNonStaticAddToValue:(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; - 0 6 1 arg I - - public static native void nativeStillNotSupported(); - descriptor: ()V - flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestThrow - - public static native void nativeStillKeep(); - descriptor: ()V - flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE - - public static void nativeStillNotSupported_should_be_like_this(); - descriptor: ()V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: new #x // class java/lang/RuntimeException - x: dup - x: invokespecial #x // Method java/lang/RuntimeException."":()V - x: athrow - LineNumberTable: - - public static native byte nativeBytePlus(byte, byte); - descriptor: (BB)B - flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect - - public void notNativeRedirected(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: new #x // class java/lang/RuntimeException - x: dup - x: invokespecial #x // Method java/lang/RuntimeException."":()V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 8 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect - - public static void notNativeStaticRedirected(); - descriptor: ()V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: new #x // class java/lang/RuntimeException - x: dup - x: invokespecial #x // Method java/lang/RuntimeException."":()V - x: athrow - LineNumberTable: - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect -} -SourceFile: "TinyFrameworkNative.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep - x: #x(#x=s#x) - android.hosttest.annotation.HostSideTestRedirectionClass( - value="TinyFrameworkNative_host" - ) -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.class - Compiled from "TinyFrameworkNative_host.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 7, attributes: 2 - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host; - - public static int nativeAddTwo(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: iload_0 - x: iconst_2 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 arg I - - public static long nativeLongPlus(long, long); - descriptor: (JJ)J - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=4, args_size=2 - x: lload_0 - x: lload_2 - x: ladd - x: lreturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 arg1 J - 0 4 2 arg2 J - - public static int nativeNonStaticAddToValue(com.android.hoststubgen.test.tinyframework.TinyFrameworkNative, int); - descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: getfield #x // Field com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.value:I - x: iload_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 7 0 source Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; - 0 7 1 arg I - - public static byte nativeBytePlus(byte, byte); - descriptor: (BB)B - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=2, args_size=2 - x: iload_0 - x: iload_1 - x: iadd - x: i2b - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 arg1 B - 0 5 1 arg2 B - - public static void notNativeRedirected(com.android.hoststubgen.test.tinyframework.TinyFrameworkNative); - descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;)V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=0, locals=1, args_size=1 - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 1 0 source Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; - - public static void notNativeStaticRedirected(); - descriptor: ()V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=0, locals=0, args_size=0 - x: return - LineNumberTable: -} -SourceFile: "TinyFrameworkNative_host.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1.class - Compiled from "TinyFrameworkNestedClasses.java" -class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$1 extends java.lang.Object implements java.util.function.Supplier - minor version: 0 - major version: 61 - flags: (0x0020) ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 - super_class: #x // java/lang/Object - interfaces: 1, fields: 1, methods: 3, attributes: 5 - final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC - - com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$1(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); - descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - flags: (0x0000) - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: aload_1 - x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; - 0 10 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - MethodParameters: - Name Flags - final mandated - - public java.lang.Integer get(); - descriptor: ()Ljava/lang/Integer; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: iconst_1 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; - - public java.lang.Object get(); - descriptor: ()Ljava/lang/Object; - flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokevirtual #x // Method get:()Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; -} -Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; -SourceFile: "TinyFrameworkNestedClasses.java" -EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -InnerClasses: - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2.class - Compiled from "TinyFrameworkNestedClasses.java" -class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2 extends java.lang.Object implements java.util.function.Supplier - minor version: 0 - major version: 61 - flags: (0x0020) ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 3, attributes: 5 - com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2(); - descriptor: ()V - flags: (0x0000) - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; - - public java.lang.Integer get(); - descriptor: ()Ljava/lang/Integer; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: iconst_2 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; - - public java.lang.Object get(); - descriptor: ()Ljava/lang/Object; - flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokevirtual #x // Method get:()Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; -} -Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; -SourceFile: "TinyFrameworkNestedClasses.java" -EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -InnerClasses: - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3.class - Compiled from "TinyFrameworkNestedClasses.java" -class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$3 extends java.lang.Object implements java.util.function.Supplier - minor version: 0 - major version: 61 - flags: (0x0020) ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 - super_class: #x // java/lang/Object - interfaces: 1, fields: 1, methods: 3, attributes: 5 - final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC - - com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$3(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); - descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - flags: (0x0000) - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: aload_1 - x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; - 0 10 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - MethodParameters: - Name Flags - final mandated - - public java.lang.Integer get(); - descriptor: ()Ljava/lang/Integer; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: iconst_3 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; - - public java.lang.Object get(); - descriptor: ()Ljava/lang/Object; - flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokevirtual #x // Method get:()Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; -} -Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; -SourceFile: "TinyFrameworkNestedClasses.java" -EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses.getSupplier -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -InnerClasses: - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4.class - Compiled from "TinyFrameworkNestedClasses.java" -class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4 extends java.lang.Object implements java.util.function.Supplier - minor version: 0 - major version: 61 - flags: (0x0020) ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 3, attributes: 5 - com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4(); - descriptor: ()V - flags: (0x0000) - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; - - public java.lang.Integer get(); - descriptor: ()Ljava/lang/Integer; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: iconst_4 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; - - public java.lang.Object get(); - descriptor: ()Ljava/lang/Object; - flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokevirtual #x // Method get:()Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; -} -Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; -SourceFile: "TinyFrameworkNestedClasses.java" -EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses.getSupplier_static -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -InnerClasses: - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 1, attributes: 3 - public int value; - descriptor: I - flags: (0x0001) ACC_PUBLIC - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iload_1 - x: putfield #x // Field value:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass; - 0 10 1 x I -} -SourceFile: "TinyFrameworkNestedClasses.java" -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -InnerClasses: - public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$InnerClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 1, attributes: 3 - public int value; - descriptor: I - flags: (0x0001) ACC_PUBLIC - - final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$InnerClass(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); - descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: aload_1 - x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iconst_5 - x: putfield #x // Field value:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 15 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass; - 0 15 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - MethodParameters: - Name Flags - final mandated -} -SourceFile: "TinyFrameworkNestedClasses.java" -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -InnerClasses: - public #x= #x of #x; // InnerClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1.class - Compiled from "TinyFrameworkNestedClasses.java" -class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$1 extends java.lang.Object implements java.util.function.Supplier - minor version: 0 - major version: 61 - flags: (0x0020) ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 3, attributes: 5 - com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$1(); - descriptor: ()V - flags: (0x0000) - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; - - public java.lang.Integer get(); - descriptor: ()Ljava/lang/Integer; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: bipush 7 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; - - public java.lang.Object get(); - descriptor: ()Ljava/lang/Object; - flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokevirtual #x // Method get:()Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; -} -Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; -SourceFile: "TinyFrameworkNestedClasses.java" -EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass.getSupplier_static -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -InnerClasses: - public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 1, attributes: 3 - public int value; - descriptor: I - flags: (0x0001) ACC_PUBLIC - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: bipush 8 - x: putfield #x // Field value:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 11 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass; -} -SourceFile: "TinyFrameworkNestedClasses.java" -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -InnerClasses: - public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 2, attributes: 3 - public int value; - descriptor: I - flags: (0x0001) ACC_PUBLIC - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: bipush 6 - x: putfield #x // Field value:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 11 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass; - - public static java.util.function.Supplier getSupplier_static(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 - x: dup - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1."":()V - x: areturn - LineNumberTable: - Signature: #x // ()Ljava/util/function/Supplier; -} -SourceFile: "TinyFrameworkNestedClasses.java" -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -InnerClasses: - public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 - public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$SubClass extends com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass - super_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass - interfaces: 0, fields: 0, methods: 1, attributes: 3 - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$SubClass(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: iload_1 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass."":(I)V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass; - 0 6 1 x I -} -SourceFile: "TinyFrameworkNestedClasses.java" -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -InnerClasses: - public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public static #x= #x of #x; // SubClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 4, attributes: 4 - public final java.util.function.Supplier mSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0011) ACC_PUBLIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - - public static final java.util.function.Supplier sSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 - x: dup - x: aload_0 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1."":(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 17 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - - public java.util.function.Supplier getSupplier(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0001) ACC_PUBLIC - Code: - stack=3, locals=1, args_size=1 - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 - x: dup - x: aload_0 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3."":(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 9 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - Signature: #x // ()Ljava/util/function/Supplier; - - public static java.util.function.Supplier getSupplier_static(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 - x: dup - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4."":()V - x: areturn - LineNumberTable: - Signature: #x // ()Ljava/util/function/Supplier; - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 - x: dup - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2."":()V - x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: -} -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -NestMembers: - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 -InnerClasses: - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 - public static #x= #x of #x; // SubClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public #x= #x of #x; // InnerClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect.class - Compiled from "TinyFrameworkPackageRedirect.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedirect - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 2, attributes: 2 - public com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedirect(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect; - - public static int foo(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=3, locals=1, args_size=1 - x: new #x // class com/unsupported/UnsupportedClass - x: dup - x: iload_0 - x: invokespecial #x // Method com/unsupported/UnsupportedClass."":(I)V - x: invokevirtual #x // Method com/unsupported/UnsupportedClass.getValue:()I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 12 0 value I -} -SourceFile: "TinyFrameworkPackageRedirect.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.class - Compiled from "TinyFrameworkRenamedClassCaller.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 2, attributes: 2 - public com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller; - - public static int foo(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=3, locals=1, args_size=1 - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed - x: dup - x: iload_0 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed."":(I)V - x: invokevirtual #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.getValue:()I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 12 0 value I -} -SourceFile: "TinyFrameworkRenamedClassCaller.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.class - Compiled from "TinyFrameworkToBeRenamed.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkToBeRenamed - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 2, attributes: 2 - private final int mValue; - descriptor: I - flags: (0x0012) ACC_PRIVATE, ACC_FINAL - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkToBeRenamed(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iload_1 - x: putfield #x // Field mValue:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed; - 0 10 1 value I - - public int getValue(); - descriptor: ()I - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: getfield #x // Field mValue:I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed; -} -SourceFile: "TinyFrameworkToBeRenamed.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/packagetest/A.class - Compiled from "A.java" -public class com.android.hoststubgen.test.tinyframework.packagetest.A - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/A - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.packagetest.A(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/packagetest/A; -} -SourceFile: "A.java" -## Class: com/android/hoststubgen/test/tinyframework/packagetest/B.class - Compiled from "B.java" -public class com.android.hoststubgen.test.tinyframework.packagetest.B - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/B - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.packagetest.B(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/packagetest/B; -} -SourceFile: "B.java" -## Class: com/android/hoststubgen/test/tinyframework/packagetest/sub/A.class - Compiled from "A.java" -public class com.android.hoststubgen.test.tinyframework.packagetest.sub.A - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/sub/A - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.packagetest.sub.A(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/packagetest/sub/A; -} -SourceFile: "A.java" -## Class: com/android/hoststubgen/test/tinyframework/packagetest/sub/B.class - Compiled from "B.java" -public class com.android.hoststubgen.test.tinyframework.packagetest.sub.B - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/sub/B - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.packagetest.sub.B(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/packagetest/sub/B; -} -SourceFile: "B.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C1.class - Compiled from "C1.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.C1 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.C1(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/C1; -} -SourceFile: "C1.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C2.class - Compiled from "C2.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.C2 extends com.android.hoststubgen.test.tinyframework.subclasstest.C1 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 - interfaces: 0, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.C2(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/subclasstest/C1."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/C2; -} -SourceFile: "C2.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C3.class - Compiled from "C3.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.C3 extends com.android.hoststubgen.test.tinyframework.subclasstest.C2 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3 - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 - interfaces: 0, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.C3(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/subclasstest/C2."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/C3; -} -SourceFile: "C3.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/CA.class - Compiled from "CA.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.CA - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CA - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.CA(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/CA; -} -SourceFile: "CA.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/CB.class - Compiled from "CB.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.CB - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CB - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.CB(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/CB; -} -SourceFile: "CB.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1.class - Compiled from "Class_C1.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C1 extends com.android.hoststubgen.test.tinyframework.subclasstest.C1 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1 - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 - interfaces: 0, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.Class_C1(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/subclasstest/C1."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_C1; -} -SourceFile: "Class_C1.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2.class - Compiled from "Class_C2.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C2 extends com.android.hoststubgen.test.tinyframework.subclasstest.C2 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2 - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 - interfaces: 0, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.Class_C2(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/subclasstest/C2."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_C2; -} -SourceFile: "Class_C2.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3.class - Compiled from "Class_C3.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C3 extends com.android.hoststubgen.test.tinyframework.subclasstest.C3 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3 - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3 - interfaces: 0, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.Class_C3(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/subclasstest/C3."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_C3; -} -SourceFile: "Class_C3.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_CA.class - Compiled from "Class_CA.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_CA extends com.android.hoststubgen.test.tinyframework.subclasstest.CA - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_CA - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CA - interfaces: 0, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.Class_CA(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/subclasstest/CA."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_CA; -} -SourceFile: "Class_CA.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB.class - Compiled from "Class_CB.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_CB extends com.android.hoststubgen.test.tinyframework.subclasstest.CB - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CB - interfaces: 0, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.Class_CB(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/subclasstest/CB."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_CB; -} -SourceFile: "Class_CB.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB_IA.class - Compiled from "Class_CB_IA.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_CB_IA extends com.android.hoststubgen.test.tinyframework.subclasstest.CB implements com.android.hoststubgen.test.tinyframework.subclasstest.IA - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB_IA - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CB - interfaces: 1, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.Class_CB_IA(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/subclasstest/CB."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_CB_IA; -} -SourceFile: "Class_CB_IA.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1.class - Compiled from "Class_I1.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1 implements com.android.hoststubgen.test.tinyframework.subclasstest.I1 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_I1; -} -SourceFile: "Class_I1.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA.class - Compiled from "Class_I1_IA.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1_IA implements com.android.hoststubgen.test.tinyframework.subclasstest.I1,com.android.hoststubgen.test.tinyframework.subclasstest.IA - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA - super_class: #x // java/lang/Object - interfaces: 2, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1_IA(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA; -} -SourceFile: "Class_I1_IA.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2.class - Compiled from "Class_I2.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I2 implements com.android.hoststubgen.test.tinyframework.subclasstest.I2 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I2(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_I2; -} -SourceFile: "Class_I2.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3.class - Compiled from "Class_I3.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3 implements com.android.hoststubgen.test.tinyframework.subclasstest.I3 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_I3; -} -SourceFile: "Class_I3.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3_IA.class - Compiled from "Class_I3_IA.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3_IA implements com.android.hoststubgen.test.tinyframework.subclasstest.I3,com.android.hoststubgen.test.tinyframework.subclasstest.IA - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3_IA - super_class: #x // java/lang/Object - interfaces: 2, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3_IA(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_I3_IA; -} -SourceFile: "Class_I3_IA.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA.class - Compiled from "Class_IA.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA implements com.android.hoststubgen.test.tinyframework.subclasstest.IA - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_IA; -} -SourceFile: "Class_IA.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I1.class - Compiled from "Class_IA_I1.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA_I1 implements com.android.hoststubgen.test.tinyframework.subclasstest.IA,com.android.hoststubgen.test.tinyframework.subclasstest.I1 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I1 - super_class: #x // java/lang/Object - interfaces: 2, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA_I1(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I1; -} -SourceFile: "Class_IA_I1.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I3.class - Compiled from "Class_IA_I3.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA_I3 implements com.android.hoststubgen.test.tinyframework.subclasstest.IA,com.android.hoststubgen.test.tinyframework.subclasstest.I3 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I3 - super_class: #x // java/lang/Object - interfaces: 2, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IA_I3(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I3; -} -SourceFile: "Class_IA_I3.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB.class - Compiled from "Class_IB.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_IB implements com.android.hoststubgen.test.tinyframework.subclasstest.IB - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IB(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_IB; -} -SourceFile: "Class_IB.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB_IA.class - Compiled from "Class_IB_IA.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_IB_IA implements com.android.hoststubgen.test.tinyframework.subclasstest.IB,com.android.hoststubgen.test.tinyframework.subclasstest.IA - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB_IA - super_class: #x // java/lang/Object - interfaces: 2, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.Class_IB_IA(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_IB_IA; -} -SourceFile: "Class_IB_IA.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_None.class - Compiled from "Class_None.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_None - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_None - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 1 - public com.android.hoststubgen.test.tinyframework.subclasstest.Class_None(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/subclasstest/Class_None; -} -SourceFile: "Class_None.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I1.class - Compiled from "I1.java" -public interface com.android.hoststubgen.test.tinyframework.subclasstest.I1 - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I1 - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 0, attributes: 1 -} -SourceFile: "I1.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I2.class - Compiled from "I2.java" -public interface com.android.hoststubgen.test.tinyframework.subclasstest.I2 extends com.android.hoststubgen.test.tinyframework.subclasstest.I1 - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I2 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 1 -} -SourceFile: "I2.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I3.class - Compiled from "I3.java" -public interface com.android.hoststubgen.test.tinyframework.subclasstest.I3 extends com.android.hoststubgen.test.tinyframework.subclasstest.I2 - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I3 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 1 -} -SourceFile: "I3.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/IA.class - Compiled from "IA.java" -public interface com.android.hoststubgen.test.tinyframework.subclasstest.IA - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IA - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 0, attributes: 1 -} -SourceFile: "IA.java" -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/IB.class - Compiled from "IB.java" -public interface com.android.hoststubgen.test.tinyframework.subclasstest.IB - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IB - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 0, attributes: 1 -} -SourceFile: "IB.java" -## Class: com/supported/UnsupportedClass.class - Compiled from "UnsupportedClass.java" -public class com.supported.UnsupportedClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/supported/UnsupportedClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 2, attributes: 2 - private final int mValue; - descriptor: I - flags: (0x0012) ACC_PRIVATE, ACC_FINAL - - public com.supported.UnsupportedClass(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iload_1 - x: putfield #x // Field mValue:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/supported/UnsupportedClass; - 0 10 1 value I - - public int getValue(); - descriptor: ()I - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: getfield #x // Field mValue:I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/supported/UnsupportedClass; -} -SourceFile: "UnsupportedClass.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/unsupported/UnsupportedClass.class - Compiled from "UnsupportedClass.java" -public class com.unsupported.UnsupportedClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/unsupported/UnsupportedClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 2, attributes: 2 - public com.unsupported.UnsupportedClass(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=3, locals=2, args_size=2 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String This class is not supported - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 14 0 this Lcom/unsupported/UnsupportedClass; - 0 14 1 value I - - public int getValue(); - descriptor: ()I - flags: (0x0001) ACC_PUBLIC - Code: - stack=3, locals=1, args_size=1 - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String This class is not supported - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/unsupported/UnsupportedClass; -} -SourceFile: "UnsupportedClass.java" -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/golden-output/03-hoststubgen-test-tiny-framework-host-dump.txt b/tools/hoststubgen/hoststubgen/test-tiny-framework/golden-output/03-hoststubgen-test-tiny-framework-host-dump.txt deleted file mode 100644 index eeec554e954c..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/golden-output/03-hoststubgen-test-tiny-framework-host-dump.txt +++ /dev/null @@ -1,3757 +0,0 @@ -## Class: android/hosttest/annotation/HostSideTestClassLoadHook.class - Compiled from "HostSideTestClassLoadHook.java" -public interface android.hosttest.annotation.HostSideTestClassLoadHook extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestClassLoadHook - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 2 - public abstract java.lang.String value(); - descriptor: ()Ljava/lang/String; - flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "HostSideTestClassLoadHook.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestKeep.class - Compiled from "HostSideTestKeep.java" -public interface android.hosttest.annotation.HostSideTestKeep extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestKeep - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "HostSideTestKeep.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestRedirect.class - Compiled from "HostSideTestRedirect.java" -public interface android.hosttest.annotation.HostSideTestRedirect extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestRedirect - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "HostSideTestRedirect.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.METHOD] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestRedirectionClass.class - Compiled from "HostSideTestRedirectionClass.java" -public interface android.hosttest.annotation.HostSideTestRedirectionClass extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestRedirectionClass - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 2 - public abstract java.lang.String value(); - descriptor: ()Ljava/lang/String; - flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "HostSideTestRedirectionClass.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestRemove.class - Compiled from "HostSideTestRemove.java" -public interface android.hosttest.annotation.HostSideTestRemove extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestRemove - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "HostSideTestRemove.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestStaticInitializerKeep.class - Compiled from "HostSideTestStaticInitializerKeep.java" -public interface android.hosttest.annotation.HostSideTestStaticInitializerKeep extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestStaticInitializerKeep - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "HostSideTestStaticInitializerKeep.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestSubstitute.class - Compiled from "HostSideTestSubstitute.java" -public interface android.hosttest.annotation.HostSideTestSubstitute extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestSubstitute - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 2 - public abstract java.lang.String suffix(); - descriptor: ()Ljava/lang/String; - flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "HostSideTestSubstitute.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.METHOD] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestThrow.class - Compiled from "HostSideTestThrow.java" -public interface android.hosttest.annotation.HostSideTestThrow extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestThrow - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "HostSideTestThrow.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x,e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestWholeClassKeep.class - Compiled from "HostSideTestWholeClassKeep.java" -public interface android.hosttest.annotation.HostSideTestWholeClassKeep extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestWholeClassKeep - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "HostSideTestWholeClassKeep.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy.class - Compiled from "IPretendingAidl.java" -public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Proxy - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 2, attributes: 4 - public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Proxy(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int addTwo(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: iload_0 - x: iconst_2 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 a I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl - public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub -SourceFile: "IPretendingAidl.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/IPretendingAidl -## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub.class - Compiled from "IPretendingAidl.java" -public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 2, attributes: 4 - public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int addOne(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: iload_0 - x: iconst_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 a I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl - public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub -SourceFile: "IPretendingAidl.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/IPretendingAidl -## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl.class - Compiled from "IPretendingAidl.java" -public interface com.android.hoststubgen.test.tinyframework.IPretendingAidl - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 0, attributes: 4 -} -InnerClasses: - public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl - public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub -SourceFile: "IPretendingAidl.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestMembers: - com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub - com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy -## Class: com/android/hoststubgen/test/tinyframework/R$Nested.class - Compiled from "R.java" -public class com.android.hoststubgen.test.tinyframework.R$Nested - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/R$Nested - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 2, attributes: 4 - public static int[] ARRAY; - descriptor: [I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public com.android.hoststubgen.test.tinyframework.R$Nested(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/R$Nested; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: iconst_1 - x: newarray int - x: dup - x: iconst_0 - x: iconst_1 - x: iastore - x: putstatic #x // Field ARRAY:[I - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/R$Nested of class com/android/hoststubgen/test/tinyframework/R -SourceFile: "R.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/R -## Class: com/android/hoststubgen/test/tinyframework/R.class - Compiled from "R.java" -public class com.android.hoststubgen.test.tinyframework.R - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/R - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 4 - public com.android.hoststubgen.test.tinyframework.R(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/R; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/R$Nested of class com/android/hoststubgen/test/tinyframework/R -SourceFile: "R.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestMembers: - com/android/hoststubgen/test/tinyframework/R$Nested -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.class - Compiled from "TinyFrameworkAnnotations.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 7, attributes: 3 - public int keep; - descriptor: I - flags: (0x0001) ACC_PUBLIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations - x: ldc #x // String com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iconst_1 - x: putfield #x // Field keep:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public int addOne(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: iload_1 - x: iconst_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; - 0 4 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public int addTwo(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: iload_1 - x: iconst_2 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; - 0 4 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int nativeAddThree(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: iload_0 - x: iconst_3 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.String unsupportedMethod(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=3, locals=1, args_size=1 - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onThrowMethodCalled:()V - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String Unreachable - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestThrow - - public int toBeIgnored(); - descriptor: ()I - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: iconst_0 - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestIgnore -} -SourceFile: "TinyFrameworkAnnotations.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - x: #x(#x=s#x) - android.hosttest.annotation.HostSideTestClassLoadHook( - value="com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded" - ) -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook.class - Compiled from "TinyFrameworkClassLoadHook.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 3, attributes: 3 - public static final java.util.Set> sLoadedClasses; - descriptor: Ljava/util/Set; - flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL - Signature: #x // Ljava/util/Set;>; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook(); - descriptor: ()V - flags: (0x0002) ACC_PRIVATE - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static void onClassLoaded(java.lang.Class); - descriptor: (Ljava/lang/Class;)V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: getstatic #x // Field sLoadedClasses:Ljava/util/Set; - x: aload_0 - x: invokeinterface #x, 2 // InterfaceMethod java/util/Set.add:(Ljava/lang/Object;)Z - x: pop - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 11 0 clazz Ljava/lang/Class; - LocalVariableTypeTable: - Start Length Slot Name Signature - 0 11 0 clazz Ljava/lang/Class<*>; - Signature: #x // (Ljava/lang/Class<*>;)V - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: new #x // class java/util/HashSet - x: dup - x: invokespecial #x // Method java/util/HashSet."":()V - x: putstatic #x // Field sLoadedClasses:Ljava/util/Set; - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "TinyFrameworkClassLoadHook.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations.class - Compiled from "TinyFrameworkClassWideAnnotations.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWideAnnotations - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 4, attributes: 3 - public int keep; - descriptor: I - flags: (0x0001) ACC_PUBLIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWideAnnotations(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iconst_1 - x: putfield #x // Field keep:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int addOne(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: iload_1 - x: iconst_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; - 0 4 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int addTwo(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: iload_1 - x: iconst_2 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; - 0 4 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.String unsupportedMethod(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=3, locals=1, args_size=1 - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onThrowMethodCalled:()V - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String Unreachable - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestThrow -} -SourceFile: "TinyFrameworkClassWideAnnotations.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault.class - Compiled from "TinyFrameworkClassWithInitializerDefault.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithInitializerDefault - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 0, attributes: 3 - public static boolean sInitialized; - descriptor: Z - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static java.lang.Object sObject; - descriptor: Ljava/lang/Object; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - -} -SourceFile: "TinyFrameworkClassWithInitializerDefault.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub.class - Compiled from "TinyFrameworkClassWithInitializerStub.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithInitializerStub - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 1, attributes: 3 - public static boolean sInitialized; - descriptor: Z - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static java.lang.Object sObject; - descriptor: Ljava/lang/Object; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub - x: ldc #x // String com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: iconst_1 - x: putstatic #x // Field sInitialized:Z - x: new #x // class java/lang/Object - x: dup - x: invokespecial #x // Method java/lang/Object."":()V - x: putstatic #x // Field sObject:Ljava/lang/Object; - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "TinyFrameworkClassWithInitializerStub.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x(#x=s#x) - android.hosttest.annotation.HostSideTestClassLoadHook( - value="com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded" - ) - x: #x() - android.hosttest.annotation.HostSideTestKeep - x: #x() - android.hosttest.annotation.HostSideTestStaticInitializerKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex.class - Compiled from "TinyFrameworkEnumComplex.java" -public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex extends java.lang.Enum - minor version: 0 - major version: 61 - flags: (0x4031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_ENUM - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - super_class: #x // java/lang/Enum - interfaces: 0, fields: 6, methods: 7, attributes: 4 - public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex RED; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex GREEN; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex BLUE; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private final java.lang.String mLongName; - descriptor: Ljava/lang/String; - flags: (0x0012) ACC_PRIVATE, ACC_FINAL - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private final java.lang.String mShortName; - descriptor: Ljava/lang/String; - flags: (0x0012) ACC_PRIVATE, ACC_FINAL - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] $VALUES; - descriptor: [Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x101a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] values(); - descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=1, locals=0, args_size=0 - x: getstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: invokevirtual #x // Method "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;".clone:()Ljava/lang/Object; - x: checkcast #x // class "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;" - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex valueOf(java.lang.String); - descriptor: (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: aload_0 - x: invokestatic #x // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; - x: checkcast #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 name Ljava/lang/String; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - MethodParameters: - Name Flags - mandated - - private com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex(java.lang.String, java.lang.String); - descriptor: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V - flags: (0x0002) ACC_PRIVATE - Code: - stack=3, locals=5, args_size=5 - x: aload_0 - x: aload_1 - x: iload_2 - x: invokespecial #x // Method java/lang/Enum."":(Ljava/lang/String;I)V - x: aload_0 - x: aload_3 - x: putfield #x // Field mLongName:Ljava/lang/String; - x: aload_0 - x: aload 4 - x: putfield #x // Field mShortName:Ljava/lang/String; - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 18 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - 0 18 3 longName Ljava/lang/String; - 0 18 4 shortName Ljava/lang/String; - Signature: #x // (Ljava/lang/String;Ljava/lang/String;)V - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - MethodParameters: - Name Flags - synthetic - synthetic - - - - public java.lang.String getLongName(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: getfield #x // Field mLongName:Ljava/lang/String; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public java.lang.String getShortName(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: getfield #x // Field mShortName:Ljava/lang/String; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] $values(); - descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=4, locals=0, args_size=0 - x: iconst_3 - x: anewarray #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: dup - x: iconst_0 - x: getstatic #x // Field RED:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: aastore - x: dup - x: iconst_1 - x: getstatic #x // Field GREEN:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: aastore - x: dup - x: iconst_2 - x: getstatic #x // Field BLUE:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: aastore - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=6, locals=0, args_size=0 - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: dup - x: ldc #x // String RED - x: iconst_0 - x: ldc #x // String Red - x: ldc #x // String R - x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V - x: putstatic #x // Field RED:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: dup - x: ldc #x // String GREEN - x: iconst_1 - x: ldc #x // String Green - x: ldc #x // String G - x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V - x: putstatic #x // Field GREEN:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: dup - x: ldc #x // String BLUE - x: iconst_2 - x: ldc #x // String Blue - x: ldc #x // String B - x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V - x: putstatic #x // Field BLUE:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: invokestatic #x // Method $values:()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: putstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -Signature: #x // Ljava/lang/Enum; -SourceFile: "TinyFrameworkEnumComplex.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple.class - Compiled from "TinyFrameworkEnumSimple.java" -public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple extends java.lang.Enum - minor version: 0 - major version: 61 - flags: (0x4031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_ENUM - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - super_class: #x // java/lang/Enum - interfaces: 0, fields: 3, methods: 5, attributes: 4 - public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple CAT; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple DOG; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] $VALUES; - descriptor: [Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x101a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] values(); - descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=1, locals=0, args_size=0 - x: getstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: invokevirtual #x // Method "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;".clone:()Ljava/lang/Object; - x: checkcast #x // class "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;" - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple valueOf(java.lang.String); - descriptor: (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: aload_0 - x: invokestatic #x // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; - x: checkcast #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 name Ljava/lang/String; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - MethodParameters: - Name Flags - mandated - - private com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple(); - descriptor: (Ljava/lang/String;I)V - flags: (0x0002) ACC_PRIVATE - Code: - stack=3, locals=3, args_size=3 - x: aload_0 - x: aload_1 - x: iload_2 - x: invokespecial #x // Method java/lang/Enum."":(Ljava/lang/String;I)V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 7 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - Signature: #x // ()V - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - MethodParameters: - Name Flags - synthetic - synthetic - - private static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] $values(); - descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=4, locals=0, args_size=0 - x: iconst_2 - x: anewarray #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: dup - x: iconst_0 - x: getstatic #x // Field CAT:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: aastore - x: dup - x: iconst_1 - x: getstatic #x // Field DOG:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: aastore - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: dup - x: ldc #x // String CAT - x: iconst_0 - x: invokespecial #x // Method "":(Ljava/lang/String;I)V - x: putstatic #x // Field CAT:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: dup - x: ldc #x // String DOG - x: iconst_1 - x: invokespecial #x // Method "":(Ljava/lang/String;I)V - x: putstatic #x // Field DOG:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: invokestatic #x // Method $values:()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: putstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -Signature: #x // Ljava/lang/Enum; -SourceFile: "TinyFrameworkEnumSimple.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester.class - Compiled from "TinyFrameworkExceptionTester.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTester - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 2, attributes: 3 - public com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTester(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int testException(); - descriptor: ()I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=1, args_size=0 - x: new #x // class java/lang/IllegalStateException - x: dup - x: ldc #x // String Inner exception - x: invokespecial #x // Method java/lang/IllegalStateException."":(Ljava/lang/String;)V - x: athrow - x: astore_0 - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String Outer exception - x: aload_0 - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;Ljava/lang/Throwable;)V - x: athrow - Exception table: - from to target type - 0 10 10 Class java/lang/Exception - StackMapTable: number_of_entries = 1 - frame_type = 74 /* same_locals_1_stack_item */ - stack = [ class java/lang/Exception ] - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 11 0 e Ljava/lang/Exception; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "TinyFrameworkExceptionTester.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy.class - Compiled from "TinyFrameworkForTextPolicy.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPolicy - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 15, attributes: 2 - public int stub; - descriptor: I - flags: (0x0001) ACC_PUBLIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - x: ldc #x // String com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPolicy(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iconst_1 - x: putfield #x // Field stub:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int addOne(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: iload_1 - x: iconst_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - 0 4 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.String toBeIgnoredObj(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aconst_null - x: areturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public void toBeIgnoredV(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=0, locals=1, args_size=1 - x: return - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public boolean toBeIgnoredZ(); - descriptor: ()Z - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: iconst_0 - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public byte toBeIgnoredB(); - descriptor: ()B - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: iconst_0 - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public char toBeIgnoredC(); - descriptor: ()C - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: iconst_0 - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public short toBeIgnoredS(); - descriptor: ()S - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: iconst_0 - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int toBeIgnoredI(); - descriptor: ()I - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: iconst_0 - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public float toBeIgnoredF(); - descriptor: ()F - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: fconst_0 - x: freturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public double toBeIgnoredD(); - descriptor: ()D - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: dconst_0 - x: dreturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int addTwo(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: iload_1 - x: iconst_2 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - 0 4 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int nativeAddThree(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: iload_0 - x: iconst_3 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.String unsupportedMethod(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=3, locals=1, args_size=1 - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onThrowMethodCalled:()V - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String Unreachable - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "TinyFrameworkForTextPolicy.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.class - Compiled from "TinyFrameworkLambdas.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas$Nested - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 8, attributes: 6 - public final java.util.function.Supplier mSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0011) ACC_PUBLIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static final java.util.function.Supplier sSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas$Nested(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 14 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public java.util.function.Supplier getSupplier(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested; - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static java.util.function.Supplier getSupplier_static(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=1, locals=0, args_size=0 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: areturn - LineNumberTable: - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private static java.lang.Integer lambda$getSupplier_static$3(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=1, locals=0, args_size=0 - x: bipush 8 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static java.lang.Integer lambda$getSupplier$2(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=1, locals=0, args_size=0 - x: bipush 7 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static java.lang.Integer lambda$static$1(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=1, locals=0, args_size=0 - x: bipush 6 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static java.lang.Integer lambda$new$0(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=1, locals=0, args_size=0 - x: iconst_5 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=1, locals=0, args_size=0 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested of class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles -SourceFile: "TinyFrameworkLambdas.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - x: #x() - android.hosttest.annotation.HostSideTestStaticInitializerKeep -BootstrapMethods: - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$new$0:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$getSupplier$2:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$getSupplier_static$3:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$static$1:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.class - Compiled from "TinyFrameworkLambdas.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 8, attributes: 6 - public final java.util.function.Supplier mSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0011) ACC_PUBLIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static final java.util.function.Supplier sSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 14 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public java.util.function.Supplier getSupplier(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas; - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static java.util.function.Supplier getSupplier_static(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=1, locals=0, args_size=0 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: areturn - LineNumberTable: - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private static java.lang.Integer lambda$getSupplier_static$3(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=1, locals=0, args_size=0 - x: iconst_4 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static java.lang.Integer lambda$getSupplier$2(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=1, locals=0, args_size=0 - x: iconst_3 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static java.lang.Integer lambda$static$1(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=1, locals=0, args_size=0 - x: iconst_2 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static java.lang.Integer lambda$new$0(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=1, locals=0, args_size=0 - x: iconst_1 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=1, locals=0, args_size=0 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested of class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles -SourceFile: "TinyFrameworkLambdas.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - x: #x() - android.hosttest.annotation.HostSideTestStaticInitializerKeep -BootstrapMethods: - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$new$0:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$getSupplier$2:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$getSupplier_static$3:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$static$1:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; -NestMembers: - com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo.class - Compiled from "TinyFrameworkMethodCallReplace.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 3, attributes: 4 - public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static void startThread(java.lang.Thread); - descriptor: (Ljava/lang/Thread;)V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: iconst_1 - x: invokevirtual #x // Method java/lang/Thread.setDaemon:(Z)V - x: aload_0 - x: invokevirtual #x // Method java/lang/Thread.start:()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 thread Ljava/lang/Thread; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int add(int, int); - descriptor: (II)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=2, args_size=2 - x: iload_0 - x: iload_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 a I - 0 4 1 b I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // ReplaceTo=class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo of class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace -SourceFile: "TinyFrameworkMethodCallReplace.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.class - Compiled from "TinyFrameworkMethodCallReplace.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 4, attributes: 6 - public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static boolean nonStaticMethodCallReplaceTester() throws java.lang.Exception; - descriptor: ()Z - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=3, locals=2, args_size=0 - x: new #x // class java/util/concurrent/atomic/AtomicBoolean - x: dup - x: iconst_0 - x: invokespecial #x // Method java/util/concurrent/atomic/AtomicBoolean."":(Z)V - x: astore_0 - x: new #x // class java/lang/Thread - x: dup - x: aload_0 - x: invokedynamic #x, 0 // InvokeDynamic #x:run:(Ljava/util/concurrent/atomic/AtomicBoolean;)Ljava/lang/Runnable; - x: invokespecial #x // Method java/lang/Thread."":(Ljava/lang/Runnable;)V - x: astore_1 - x: aload_1 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo.startThread:(Ljava/lang/Thread;)V - x: aload_1 - x: invokevirtual #x // Method java/lang/Thread.join:()V - x: aload_0 - x: invokevirtual #x // Method java/util/concurrent/atomic/AtomicBoolean.get:()Z - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 9 27 0 ab Ljava/util/concurrent/atomic/AtomicBoolean; - 23 13 1 th Ljava/lang/Thread; - Exceptions: - throws java.lang.Exception - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int staticMethodCallReplaceTester(); - descriptor: ()I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: iconst_1 - x: iconst_2 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo.add:(II)I - x: ireturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static void lambda$nonStaticMethodCallReplaceTester$0(java.util.concurrent.atomic.AtomicBoolean); - descriptor: (Ljava/util/concurrent/atomic/AtomicBoolean;)V - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: invokestatic #x // Method java/lang/Thread.currentThread:()Ljava/lang/Thread; - x: invokevirtual #x // Method java/lang/Thread.isDaemon:()Z - x: invokevirtual #x // Method java/util/concurrent/atomic/AtomicBoolean.set:(Z)V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 11 0 ab Ljava/util/concurrent/atomic/AtomicBoolean; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // ReplaceTo=class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo of class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace - public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles -SourceFile: "TinyFrameworkMethodCallReplace.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -BootstrapMethods: - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()V - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.lambda$nonStaticMethodCallReplaceTester$0:(Ljava/util/concurrent/atomic/AtomicBoolean;)V - #x ()V -NestMembers: - com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.class - Compiled from "TinyFrameworkNative.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 14, attributes: 3 - int value; - descriptor: I - flags: (0x0000) - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNative(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int nativeAddTwo(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=1, locals=1, args_size=1 - x: iload_0 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeAddTwo:(I)I - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect - - public static int nativeAddTwo_should_be_like_this(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=1, locals=1, args_size=1 - x: iload_0 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeAddTwo:(I)I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 arg I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static long nativeLongPlus(long, long); - descriptor: (JJ)J - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=4, args_size=2 - x: lload_0 - x: lload_2 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeLongPlus:(JJ)J - x: lreturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect - - public static long nativeLongPlus_should_be_like_this(long, long); - descriptor: (JJ)J - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=4, args_size=2 - x: lload_0 - x: lload_2 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeLongPlus:(JJ)J - x: lreturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 6 0 arg1 J - 0 6 2 arg2 J - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public void setValue(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: iload_1 - x: putfield #x // Field value:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; - 0 6 1 v I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int nativeNonStaticAddToValue(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: iload_1 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeNonStaticAddToValue:(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect - - public int nativeNonStaticAddToValue_should_be_like_this(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: iload_1 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeNonStaticAddToValue:(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; - 0 6 1 arg I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static void nativeStillNotSupported(); - descriptor: ()V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=3, locals=0, args_size=0 - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onThrowMethodCalled:()V - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String Unreachable - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestThrow - - public static native void nativeStillKeep(); - descriptor: ()V - flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static void nativeStillNotSupported_should_be_like_this(); - descriptor: ()V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: new #x // class java/lang/RuntimeException - x: dup - x: invokespecial #x // Method java/lang/RuntimeException."":()V - x: athrow - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static byte nativeBytePlus(byte, byte); - descriptor: (BB)B - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=2, args_size=2 - x: iload_0 - x: iload_1 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeBytePlus:(BB)B - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect - - public void notNativeRedirected(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.notNativeRedirected:(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;)V - x: return - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect - - public static void notNativeStaticRedirected(); - descriptor: ()V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=0, locals=0, args_size=0 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.notNativeStaticRedirected:()V - x: return - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect -} -SourceFile: "TinyFrameworkNative.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep - x: #x(#x=s#x) - android.hosttest.annotation.HostSideTestRedirectionClass( - value="TinyFrameworkNative_host" - ) -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.class - Compiled from "TinyFrameworkNative_host.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 7, attributes: 3 - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int nativeAddTwo(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=1, args_size=1 - x: iload_0 - x: iconst_2 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 arg I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static long nativeLongPlus(long, long); - descriptor: (JJ)J - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=4, args_size=2 - x: lload_0 - x: lload_2 - x: ladd - x: lreturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 4 0 arg1 J - 0 4 2 arg2 J - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int nativeNonStaticAddToValue(com.android.hoststubgen.test.tinyframework.TinyFrameworkNative, int); - descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: getfield #x // Field com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.value:I - x: iload_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 7 0 source Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; - 0 7 1 arg I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static byte nativeBytePlus(byte, byte); - descriptor: (BB)B - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=2, args_size=2 - x: iload_0 - x: iload_1 - x: iadd - x: i2b - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 arg1 B - 0 5 1 arg2 B - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static void notNativeRedirected(com.android.hoststubgen.test.tinyframework.TinyFrameworkNative); - descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;)V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=0, locals=1, args_size=1 - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 1 0 source Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static void notNativeStaticRedirected(); - descriptor: ()V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=0, locals=0, args_size=0 - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "TinyFrameworkNative_host.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1.class - Compiled from "TinyFrameworkNestedClasses.java" -class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$1 extends java.lang.Object implements java.util.function.Supplier - minor version: 0 - major version: 61 - flags: (0x0020) ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 - super_class: #x // java/lang/Object - interfaces: 1, fields: 1, methods: 3, attributes: 6 - final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$1(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); - descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - flags: (0x0000) - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: aload_1 - x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; - 0 10 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - MethodParameters: - Name Flags - final mandated - - public java.lang.Integer get(); - descriptor: ()Ljava/lang/Integer; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: iconst_1 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.Object get(); - descriptor: ()Ljava/lang/Object; - flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokevirtual #x // Method get:()Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 -EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses -Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2.class - Compiled from "TinyFrameworkNestedClasses.java" -class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2 extends java.lang.Object implements java.util.function.Supplier - minor version: 0 - major version: 61 - flags: (0x0020) ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 3, attributes: 6 - com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2(); - descriptor: ()V - flags: (0x0000) - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.Integer get(); - descriptor: ()Ljava/lang/Integer; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: iconst_2 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.Object get(); - descriptor: ()Ljava/lang/Object; - flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokevirtual #x // Method get:()Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 -EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses -Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3.class - Compiled from "TinyFrameworkNestedClasses.java" -class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$3 extends java.lang.Object implements java.util.function.Supplier - minor version: 0 - major version: 61 - flags: (0x0020) ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 - super_class: #x // java/lang/Object - interfaces: 1, fields: 1, methods: 3, attributes: 6 - final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$3(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); - descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - flags: (0x0000) - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: aload_1 - x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; - 0 10 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - MethodParameters: - Name Flags - final mandated - - public java.lang.Integer get(); - descriptor: ()Ljava/lang/Integer; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: iconst_3 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.Object get(); - descriptor: ()Ljava/lang/Object; - flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokevirtual #x // Method get:()Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 -EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses.getSupplier -Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4.class - Compiled from "TinyFrameworkNestedClasses.java" -class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4 extends java.lang.Object implements java.util.function.Supplier - minor version: 0 - major version: 61 - flags: (0x0020) ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 3, attributes: 6 - com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4(); - descriptor: ()V - flags: (0x0000) - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.Integer get(); - descriptor: ()Ljava/lang/Integer; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: iconst_4 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.Object get(); - descriptor: ()Ljava/lang/Object; - flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokevirtual #x // Method get:()Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 -EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses.getSupplier_static -Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 1, attributes: 4 - public int value; - descriptor: I - flags: (0x0001) ACC_PUBLIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iload_1 - x: putfield #x // Field value:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass; - 0 10 1 x I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$InnerClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 1, attributes: 4 - public int value; - descriptor: I - flags: (0x0001) ACC_PUBLIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$InnerClass(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); - descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: aload_1 - x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iconst_5 - x: putfield #x // Field value:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 15 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass; - 0 15 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - MethodParameters: - Name Flags - final mandated -} -InnerClasses: - public #x= #x of #x; // InnerClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1.class - Compiled from "TinyFrameworkNestedClasses.java" -class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$1 extends java.lang.Object implements java.util.function.Supplier - minor version: 0 - major version: 61 - flags: (0x0020) ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 3, attributes: 6 - com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$1(); - descriptor: ()V - flags: (0x0000) - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.Integer get(); - descriptor: ()Ljava/lang/Integer; - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: bipush 7 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.Object get(); - descriptor: ()Ljava/lang/Object; - flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokevirtual #x // Method get:()Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 -EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass.getSupplier_static -Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 1, attributes: 4 - public int value; - descriptor: I - flags: (0x0001) ACC_PUBLIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: bipush 8 - x: putfield #x // Field value:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 11 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 2, attributes: 4 - public int value; - descriptor: I - flags: (0x0001) ACC_PUBLIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: bipush 6 - x: putfield #x // Field value:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 11 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static java.util.function.Supplier getSupplier_static(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 - x: dup - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1."":()V - x: areturn - LineNumberTable: - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 - public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$SubClass extends com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass - super_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass - interfaces: 0, fields: 0, methods: 1, attributes: 4 - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$SubClass(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: iload_1 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass."":(I)V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass; - 0 6 1 x I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public static #x= #x of #x; // SubClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 4, attributes: 5 - public final java.util.function.Supplier mSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0011) ACC_PUBLIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static final java.util.function.Supplier sSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 - x: dup - x: aload_0 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1."":(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 17 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.util.function.Supplier getSupplier(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0001) ACC_PUBLIC - Code: - stack=3, locals=1, args_size=1 - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 - x: dup - x: aload_0 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3."":(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 9 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static java.util.function.Supplier getSupplier_static(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 - x: dup - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4."":()V - x: areturn - LineNumberTable: - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 - x: dup - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2."":()V - x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 - public static #x= #x of #x; // SubClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public #x= #x of #x; // InnerClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -NestMembers: - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect.class - Compiled from "TinyFrameworkPackageRedirect.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedirect - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 2, attributes: 3 - public com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedirect(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int foo(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=3, locals=1, args_size=1 - x: new #x // class com/supported/UnsupportedClass - x: dup - x: iload_0 - x: invokespecial #x // Method com/supported/UnsupportedClass."":(I)V - x: invokevirtual #x // Method com/supported/UnsupportedClass.getValue:()I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 12 0 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "TinyFrameworkPackageRedirect.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.class - Compiled from "TinyFrameworkRenamedClassCaller.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 2, attributes: 3 - public com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int foo(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=3, locals=1, args_size=1 - x: new #x // class rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed - x: dup - x: iload_0 - x: invokespecial #x // Method rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed."":(I)V - x: invokevirtual #x // Method rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.getValue:()I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 12 0 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "TinyFrameworkRenamedClassCaller.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/packagetest/A.class - Compiled from "A.java" -public class com.android.hoststubgen.test.tinyframework.packagetest.A - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/A - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "A.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/packagetest/sub/A.class - Compiled from "A.java" -public class com.android.hoststubgen.test.tinyframework.packagetest.sub.A - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/sub/A - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "A.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C1.class - Compiled from "C1.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.C1 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "C1.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C2.class - Compiled from "C2.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.C2 extends com.android.hoststubgen.test.tinyframework.subclasstest.C1 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 - interfaces: 0, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "C2.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C3.class - Compiled from "C3.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.C3 extends com.android.hoststubgen.test.tinyframework.subclasstest.C2 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3 - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 - interfaces: 0, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "C3.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/CA.class - Compiled from "CA.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.CA - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CA - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "CA.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/CB.class - Compiled from "CB.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.CB - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CB - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "CB.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1.class - Compiled from "Class_C1.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C1 extends com.android.hoststubgen.test.tinyframework.subclasstest.C1 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1 - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 - interfaces: 0, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "Class_C1.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2.class - Compiled from "Class_C2.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C2 extends com.android.hoststubgen.test.tinyframework.subclasstest.C2 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2 - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 - interfaces: 0, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "Class_C2.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3.class - Compiled from "Class_C3.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C3 extends com.android.hoststubgen.test.tinyframework.subclasstest.C3 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3 - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3 - interfaces: 0, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "Class_C3.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1.class - Compiled from "Class_I1.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1 implements com.android.hoststubgen.test.tinyframework.subclasstest.I1 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "Class_I1.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA.class - Compiled from "Class_I1_IA.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1_IA implements com.android.hoststubgen.test.tinyframework.subclasstest.I1,com.android.hoststubgen.test.tinyframework.subclasstest.IA - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA - super_class: #x // java/lang/Object - interfaces: 2, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "Class_I1_IA.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2.class - Compiled from "Class_I2.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I2 implements com.android.hoststubgen.test.tinyframework.subclasstest.I2 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "Class_I2.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3.class - Compiled from "Class_I3.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3 implements com.android.hoststubgen.test.tinyframework.subclasstest.I3 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "Class_I3.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I1.class - Compiled from "I1.java" -public interface com.android.hoststubgen.test.tinyframework.subclasstest.I1 - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I1 - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "I1.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I2.class - Compiled from "I2.java" -public interface com.android.hoststubgen.test.tinyframework.subclasstest.I2 extends com.android.hoststubgen.test.tinyframework.subclasstest.I1 - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I2 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "I2.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I3.class - Compiled from "I3.java" -public interface com.android.hoststubgen.test.tinyframework.subclasstest.I3 extends com.android.hoststubgen.test.tinyframework.subclasstest.I2 - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I3 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "I3.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/IA.class - Compiled from "IA.java" -public interface com.android.hoststubgen.test.tinyframework.subclasstest.IA - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IA - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "IA.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/IB.class - Compiled from "IB.java" -public interface com.android.hoststubgen.test.tinyframework.subclasstest.IB - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IB - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 0, attributes: 2 -} -SourceFile: "IB.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/supported/UnsupportedClass.class - Compiled from "UnsupportedClass.java" -public class com.supported.UnsupportedClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/supported/UnsupportedClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 2, attributes: 3 - private final int mValue; - descriptor: I - flags: (0x0012) ACC_PRIVATE, ACC_FINAL - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public com.supported.UnsupportedClass(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iload_1 - x: putfield #x // Field mValue:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/supported/UnsupportedClass; - 0 10 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int getValue(); - descriptor: ()I - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: getfield #x // Field mValue:I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/supported/UnsupportedClass; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "UnsupportedClass.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/unsupported/UnsupportedClass.class - Compiled from "UnsupportedClass.java" -public class com.unsupported.UnsupportedClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/unsupported/UnsupportedClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 2, attributes: 3 - public com.unsupported.UnsupportedClass(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=3, locals=2, args_size=2 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String This class is not supported - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 14 0 this Lcom/unsupported/UnsupportedClass; - 0 14 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int getValue(); - descriptor: ()I - flags: (0x0001) ACC_PUBLIC - Code: - stack=3, locals=1, args_size=1 - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String This class is not supported - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/unsupported/UnsupportedClass; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "UnsupportedClass.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.class - Compiled from "TinyFrameworkToBeRenamed.java" -public class rename_prefix.com.android.hoststubgen.test.tinyframework.TinyFrameworkToBeRenamed - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 2, attributes: 3 - private final int mValue; - descriptor: I - flags: (0x0012) ACC_PRIVATE, ACC_FINAL - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public rename_prefix.com.android.hoststubgen.test.tinyframework.TinyFrameworkToBeRenamed(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=2, locals=2, args_size=2 - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iload_1 - x: putfield #x // Field mValue:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed; - 0 10 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int getValue(); - descriptor: ()I - flags: (0x0001) ACC_PUBLIC - Code: - stack=1, locals=1, args_size=1 - x: aload_0 - x: getfield #x // Field mValue:I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 0 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "TinyFrameworkToBeRenamed.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/golden-output/13-hoststubgen-test-tiny-framework-host-ext-dump.txt b/tools/hoststubgen/hoststubgen/test-tiny-framework/golden-output/13-hoststubgen-test-tiny-framework-host-ext-dump.txt deleted file mode 100644 index 0f8af92dc486..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/golden-output/13-hoststubgen-test-tiny-framework-host-ext-dump.txt +++ /dev/null @@ -1,4926 +0,0 @@ -## Class: android/hosttest/annotation/HostSideTestClassLoadHook.class - Compiled from "HostSideTestClassLoadHook.java" -public interface android.hosttest.annotation.HostSideTestClassLoadHook extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestClassLoadHook - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 2, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class android/hosttest/annotation/HostSideTestClassLoadHook - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public abstract java.lang.String value(); - descriptor: ()Ljava/lang/String; - flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "HostSideTestClassLoadHook.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestKeep.class - Compiled from "HostSideTestKeep.java" -public interface android.hosttest.annotation.HostSideTestKeep extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestKeep - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class android/hosttest/annotation/HostSideTestKeep - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "HostSideTestKeep.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestRedirect.class - Compiled from "HostSideTestRedirect.java" -public interface android.hosttest.annotation.HostSideTestRedirect extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestRedirect - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class android/hosttest/annotation/HostSideTestRedirect - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "HostSideTestRedirect.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.METHOD] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestRedirectionClass.class - Compiled from "HostSideTestRedirectionClass.java" -public interface android.hosttest.annotation.HostSideTestRedirectionClass extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestRedirectionClass - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 2, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class android/hosttest/annotation/HostSideTestRedirectionClass - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public abstract java.lang.String value(); - descriptor: ()Ljava/lang/String; - flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "HostSideTestRedirectionClass.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestRemove.class - Compiled from "HostSideTestRemove.java" -public interface android.hosttest.annotation.HostSideTestRemove extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestRemove - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class android/hosttest/annotation/HostSideTestRemove - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "HostSideTestRemove.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestStaticInitializerKeep.class - Compiled from "HostSideTestStaticInitializerKeep.java" -public interface android.hosttest.annotation.HostSideTestStaticInitializerKeep extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestStaticInitializerKeep - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class android/hosttest/annotation/HostSideTestStaticInitializerKeep - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "HostSideTestStaticInitializerKeep.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x,e#x.#x,e#x.#x,e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.FIELD,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestSubstitute.class - Compiled from "HostSideTestSubstitute.java" -public interface android.hosttest.annotation.HostSideTestSubstitute extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestSubstitute - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 2, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class android/hosttest/annotation/HostSideTestSubstitute - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public abstract java.lang.String suffix(); - descriptor: ()Ljava/lang/String; - flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "HostSideTestSubstitute.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.METHOD] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestThrow.class - Compiled from "HostSideTestThrow.java" -public interface android.hosttest.annotation.HostSideTestThrow extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestThrow - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class android/hosttest/annotation/HostSideTestThrow - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "HostSideTestThrow.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x,e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.CONSTRUCTOR] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: android/hosttest/annotation/HostSideTestWholeClassKeep.class - Compiled from "HostSideTestWholeClassKeep.java" -public interface android.hosttest.annotation.HostSideTestWholeClassKeep extends java.lang.annotation.Annotation - minor version: 0 - major version: 61 - flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION - this_class: #x // android/hosttest/annotation/HostSideTestWholeClassKeep - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class android/hosttest/annotation/HostSideTestWholeClassKeep - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "HostSideTestWholeClassKeep.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - x: #x(#x=[e#x.#x]) - java.lang.annotation.Target( - value=[Ljava/lang/annotation/ElementType;.TYPE] - ) - x: #x(#x=e#x.#x) - java.lang.annotation.Retention( - value=Ljava/lang/annotation/RetentionPolicy;.CLASS - ) -## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy.class - Compiled from "IPretendingAidl.java" -public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Proxy - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 3, attributes: 4 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub$Proxy(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int addTwo(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy - x: ldc #x // String addTwo - x: ldc #x // String (I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iload_0 - x: iconst_2 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 4 0 a I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl - public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub -SourceFile: "IPretendingAidl.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/IPretendingAidl -## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub.class - Compiled from "IPretendingAidl.java" -public class com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 3, attributes: 4 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.IPretendingAidl$Stub(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int addOne(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub - x: ldc #x // String addOne - x: ldc #x // String (I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iload_0 - x: iconst_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 4 0 a I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl - public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub -SourceFile: "IPretendingAidl.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/IPretendingAidl -## Class: com/android/hoststubgen/test/tinyframework/IPretendingAidl.class - Compiled from "IPretendingAidl.java" -public interface com.android.hoststubgen.test.tinyframework.IPretendingAidl - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/IPretendingAidl - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 4 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/IPretendingAidl - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -InnerClasses: - public static #x= #x of #x; // Stub=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub of class com/android/hoststubgen/test/tinyframework/IPretendingAidl - public static #x= #x of #x; // Proxy=class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy of class com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub -SourceFile: "IPretendingAidl.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestMembers: - com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub - com/android/hoststubgen/test/tinyframework/IPretendingAidl$Stub$Proxy -## Class: com/android/hoststubgen/test/tinyframework/R$Nested.class - Compiled from "R.java" -public class com.android.hoststubgen.test.tinyframework.R$Nested - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/R$Nested - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 2, attributes: 4 - public static int[] ARRAY; - descriptor: [I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public com.android.hoststubgen.test.tinyframework.R$Nested(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/R$Nested - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/R$Nested; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/R$Nested - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: ldc #x // class com/android/hoststubgen/test/tinyframework/R$Nested - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: iconst_1 - x: newarray int - x: dup - x: iconst_0 - x: iconst_1 - x: iastore - x: putstatic #x // Field ARRAY:[I - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/R$Nested of class com/android/hoststubgen/test/tinyframework/R -SourceFile: "R.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/R -## Class: com/android/hoststubgen/test/tinyframework/R.class - Compiled from "R.java" -public class com.android.hoststubgen.test.tinyframework.R - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/R - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 2, attributes: 4 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/R - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.R(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/R - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/R; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/R$Nested of class com/android/hoststubgen/test/tinyframework/R -SourceFile: "R.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestMembers: - com/android/hoststubgen/test/tinyframework/R$Nested -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.class - Compiled from "TinyFrameworkAnnotations.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 7, attributes: 3 - public int keep; - descriptor: I - flags: (0x0001) ACC_PUBLIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations - x: ldc #x // String com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkAnnotations(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iconst_1 - x: putfield #x // Field keep:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public int addOne(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations - x: ldc #x // String addOne - x: ldc #x // String (I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iload_1 - x: iconst_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; - 11 4 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public int addTwo(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations - x: ldc #x // String addTwo - x: ldc #x // String (I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iload_1 - x: iconst_2 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations; - 11 4 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int nativeAddThree(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations - x: ldc #x // String nativeAddThree - x: ldc #x // String (I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iload_0 - x: iconst_3 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 4 0 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.String unsupportedMethod(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations - x: ldc #x // String unsupportedMethod - x: ldc #x // String ()Ljava/lang/String; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onThrowMethodCalled:()V - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String Unreachable - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestThrow - - public int toBeIgnored(); - descriptor: ()I - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations - x: ldc #x // String toBeIgnored - x: ldc #x // String ()I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_0 - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestIgnore -} -SourceFile: "TinyFrameworkAnnotations.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - x: #x(#x=s#x) - android.hosttest.annotation.HostSideTestClassLoadHook( - value="com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded" - ) -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook.class - Compiled from "TinyFrameworkClassLoadHook.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 3, attributes: 3 - public static final java.util.Set> sLoadedClasses; - descriptor: Ljava/util/Set; - flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL - Signature: #x // Ljava/util/Set;>; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook(); - descriptor: ()V - flags: (0x0002) ACC_PRIVATE - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static void onClassLoaded(java.lang.Class); - descriptor: (Ljava/lang/Class;)V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook - x: ldc #x // String onClassLoaded - x: ldc #x // String (Ljava/lang/Class;)V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: getstatic #x // Field sLoadedClasses:Ljava/util/Set; - x: aload_0 - x: invokeinterface #x, 2 // InterfaceMethod java/util/Set.add:(Ljava/lang/Object;)Z - x: pop - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 11 0 clazz Ljava/lang/Class; - LocalVariableTypeTable: - Start Length Slot Name Signature - 11 11 0 clazz Ljava/lang/Class<*>; - Signature: #x // (Ljava/lang/Class<*>;)V - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: new #x // class java/util/HashSet - x: dup - x: invokespecial #x // Method java/util/HashSet."":()V - x: putstatic #x // Field sLoadedClasses:Ljava/util/Set; - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "TinyFrameworkClassLoadHook.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations.class - Compiled from "TinyFrameworkClassWideAnnotations.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWideAnnotations - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 5, attributes: 3 - public int keep; - descriptor: I - flags: (0x0001) ACC_PUBLIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWideAnnotations(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iconst_1 - x: putfield #x // Field keep:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int addOne(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations - x: ldc #x // String addOne - x: ldc #x // String (I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iload_1 - x: iconst_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; - 11 4 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int addTwo(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations - x: ldc #x // String addTwo - x: ldc #x // String (I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iload_1 - x: iconst_2 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations; - 11 4 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.String unsupportedMethod(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations - x: ldc #x // String unsupportedMethod - x: ldc #x // String ()Ljava/lang/String; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onThrowMethodCalled:()V - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String Unreachable - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestThrow -} -SourceFile: "TinyFrameworkClassWideAnnotations.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault.class - Compiled from "TinyFrameworkClassWithInitializerDefault.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithInitializerDefault - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 0, attributes: 3 - public static boolean sInitialized; - descriptor: Z - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static java.lang.Object sObject; - descriptor: Ljava/lang/Object; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - -} -SourceFile: "TinyFrameworkClassWithInitializerDefault.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub.class - Compiled from "TinyFrameworkClassWithInitializerStub.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkClassWithInitializerStub - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 1, attributes: 3 - public static boolean sInitialized; - descriptor: Z - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static java.lang.Object sObject; - descriptor: Ljava/lang/Object; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub - x: ldc #x // String com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: iconst_1 - x: putstatic #x // Field sInitialized:Z - x: new #x // class java/lang/Object - x: dup - x: invokespecial #x // Method java/lang/Object."":()V - x: putstatic #x // Field sObject:Ljava/lang/Object; - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "TinyFrameworkClassWithInitializerStub.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x(#x=s#x) - android.hosttest.annotation.HostSideTestClassLoadHook( - value="com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded" - ) - x: #x() - android.hosttest.annotation.HostSideTestKeep - x: #x() - android.hosttest.annotation.HostSideTestStaticInitializerKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex.class - Compiled from "TinyFrameworkEnumComplex.java" -public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex extends java.lang.Enum - minor version: 0 - major version: 61 - flags: (0x4031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_ENUM - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - super_class: #x // java/lang/Enum - interfaces: 0, fields: 6, methods: 7, attributes: 4 - public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex RED; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex GREEN; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex BLUE; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private final java.lang.String mLongName; - descriptor: Ljava/lang/String; - flags: (0x0012) ACC_PRIVATE, ACC_FINAL - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private final java.lang.String mShortName; - descriptor: Ljava/lang/String; - flags: (0x0012) ACC_PRIVATE, ACC_FINAL - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] $VALUES; - descriptor: [Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x101a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] values(); - descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: ldc #x // String values - x: ldc #x // String ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: getstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: invokevirtual #x // Method "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;".clone:()Ljava/lang/Object; - x: checkcast #x // class "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;" - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex valueOf(java.lang.String); - descriptor: (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: ldc #x // String valueOf - x: ldc #x // String (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: aload_0 - x: invokestatic #x // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; - x: checkcast #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 10 0 name Ljava/lang/String; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - MethodParameters: - Name Flags - mandated - - private com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex(java.lang.String, java.lang.String); - descriptor: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V - flags: (0x0002) ACC_PRIVATE - Code: - stack=4, locals=5, args_size=5 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: ldc #x // String - x: ldc #x // String (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: aload_1 - x: iload_2 - x: invokespecial #x // Method java/lang/Enum."":(Ljava/lang/String;I)V - x: aload_0 - x: aload_3 - x: putfield #x // Field mLongName:Ljava/lang/String; - x: aload_0 - x: aload 4 - x: putfield #x // Field mShortName:Ljava/lang/String; - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 18 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - 11 18 3 longName Ljava/lang/String; - 11 18 4 shortName Ljava/lang/String; - Signature: #x // (Ljava/lang/String;Ljava/lang/String;)V - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - MethodParameters: - Name Flags - synthetic - synthetic - - - - public java.lang.String getLongName(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: ldc #x // String getLongName - x: ldc #x // String ()Ljava/lang/String; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: getfield #x // Field mLongName:Ljava/lang/String; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public java.lang.String getShortName(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: ldc #x // String getShortName - x: ldc #x // String ()Ljava/lang/String; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: getfield #x // Field mShortName:Ljava/lang/String; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] $values(); - descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: ldc #x // String $values - x: ldc #x // String ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_3 - x: anewarray #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: dup - x: iconst_0 - x: getstatic #x // Field RED:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: aastore - x: dup - x: iconst_1 - x: getstatic #x // Field GREEN:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: aastore - x: dup - x: iconst_2 - x: getstatic #x // Field BLUE:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: aastore - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=6, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: dup - x: ldc #x // String RED - x: iconst_0 - x: ldc #x // String Red - x: ldc #x // String R - x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V - x: putstatic #x // Field RED:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: dup - x: ldc #x // String GREEN - x: iconst_1 - x: ldc #x // String Green - x: ldc #x // String G - x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V - x: putstatic #x // Field GREEN:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex - x: dup - x: ldc #x // String BLUE - x: iconst_2 - x: ldc #x // String Blue - x: ldc #x // String B - x: invokespecial #x // Method "":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V - x: putstatic #x // Field BLUE:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: invokestatic #x // Method $values:()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: putstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex; - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -Signature: #x // Ljava/lang/Enum; -SourceFile: "TinyFrameworkEnumComplex.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple.class - Compiled from "TinyFrameworkEnumSimple.java" -public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple extends java.lang.Enum - minor version: 0 - major version: 61 - flags: (0x4031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_ENUM - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - super_class: #x // java/lang/Enum - interfaces: 0, fields: 3, methods: 5, attributes: 4 - public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple CAT; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple DOG; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] $VALUES; - descriptor: [Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x101a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] values(); - descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: ldc #x // String values - x: ldc #x // String ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: getstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: invokevirtual #x // Method "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;".clone:()Ljava/lang/Object; - x: checkcast #x // class "[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;" - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple valueOf(java.lang.String); - descriptor: (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: ldc #x // String valueOf - x: ldc #x // String (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: aload_0 - x: invokestatic #x // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; - x: checkcast #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 10 0 name Ljava/lang/String; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - MethodParameters: - Name Flags - mandated - - private com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple(); - descriptor: (Ljava/lang/String;I)V - flags: (0x0002) ACC_PRIVATE - Code: - stack=4, locals=3, args_size=3 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: ldc #x // String - x: ldc #x // String (Ljava/lang/String;I)V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: aload_1 - x: iload_2 - x: invokespecial #x // Method java/lang/Enum."":(Ljava/lang/String;I)V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 7 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - Signature: #x // ()V - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - MethodParameters: - Name Flags - synthetic - synthetic - - private static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] $values(); - descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: ldc #x // String $values - x: ldc #x // String ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_2 - x: anewarray #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: dup - x: iconst_0 - x: getstatic #x // Field CAT:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: aastore - x: dup - x: iconst_1 - x: getstatic #x // Field DOG:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: aastore - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: dup - x: ldc #x // String CAT - x: iconst_0 - x: invokespecial #x // Method "":(Ljava/lang/String;I)V - x: putstatic #x // Field CAT:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple - x: dup - x: ldc #x // String DOG - x: iconst_1 - x: invokespecial #x // Method "":(Ljava/lang/String;I)V - x: putstatic #x // Field DOG:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: invokestatic #x // Method $values:()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: putstatic #x // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple; - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -Signature: #x // Ljava/lang/Enum; -SourceFile: "TinyFrameworkEnumSimple.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester.class - Compiled from "TinyFrameworkExceptionTester.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTester - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 3, attributes: 3 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTester(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int testException(); - descriptor: ()I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=1, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester - x: ldc #x // String testException - x: ldc #x // String ()I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: new #x // class java/lang/IllegalStateException - x: dup - x: ldc #x // String Inner exception - x: invokespecial #x // Method java/lang/IllegalStateException."":(Ljava/lang/String;)V - x: athrow - x: astore_0 - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String Outer exception - x: aload_0 - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;Ljava/lang/Throwable;)V - x: athrow - Exception table: - from to target type - 11 21 21 Class java/lang/Exception - StackMapTable: number_of_entries = 1 - frame_type = 85 /* same_locals_1_stack_item */ - stack = [ class java/lang/Exception ] - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 22 11 0 e Ljava/lang/Exception; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "TinyFrameworkExceptionTester.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy.class - Compiled from "TinyFrameworkForTextPolicy.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPolicy - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 15, attributes: 2 - public int stub; - descriptor: I - flags: (0x0001) ACC_PUBLIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - x: ldc #x // String com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkForTextPolicy(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iconst_1 - x: putfield #x // Field stub:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int addOne(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - x: ldc #x // String addOne - x: ldc #x // String (I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iload_1 - x: iconst_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - 11 4 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.String toBeIgnoredObj(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - x: ldc #x // String toBeIgnoredObj - x: ldc #x // String ()Ljava/lang/String; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aconst_null - x: areturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public void toBeIgnoredV(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - x: ldc #x // String toBeIgnoredV - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: return - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public boolean toBeIgnoredZ(); - descriptor: ()Z - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - x: ldc #x // String toBeIgnoredZ - x: ldc #x // String ()Z - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_0 - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public byte toBeIgnoredB(); - descriptor: ()B - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - x: ldc #x // String toBeIgnoredB - x: ldc #x // String ()B - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_0 - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public char toBeIgnoredC(); - descriptor: ()C - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - x: ldc #x // String toBeIgnoredC - x: ldc #x // String ()C - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_0 - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public short toBeIgnoredS(); - descriptor: ()S - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - x: ldc #x // String toBeIgnoredS - x: ldc #x // String ()S - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_0 - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int toBeIgnoredI(); - descriptor: ()I - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - x: ldc #x // String toBeIgnoredI - x: ldc #x // String ()I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_0 - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public float toBeIgnoredF(); - descriptor: ()F - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - x: ldc #x // String toBeIgnoredF - x: ldc #x // String ()F - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: fconst_0 - x: freturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public double toBeIgnoredD(); - descriptor: ()D - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - x: ldc #x // String toBeIgnoredD - x: ldc #x // String ()D - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: dconst_0 - x: dreturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsIgnore - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int addTwo(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - x: ldc #x // String addTwo - x: ldc #x // String (I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iload_1 - x: iconst_2 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 4 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy; - 11 4 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int nativeAddThree(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - x: ldc #x // String nativeAddThree - x: ldc #x // String (I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iload_0 - x: iconst_3 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 4 0 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.String unsupportedMethod(); - descriptor: ()Ljava/lang/String; - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy - x: ldc #x // String unsupportedMethod - x: ldc #x // String ()Ljava/lang/String; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onThrowMethodCalled:()V - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String Unreachable - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "TinyFrameworkForTextPolicy.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.class - Compiled from "TinyFrameworkLambdas.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas$Nested - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 8, attributes: 6 - public final java.util.function.Supplier mSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0011) ACC_PUBLIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static final java.util.function.Supplier sSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas$Nested(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 14 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public java.util.function.Supplier getSupplier(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested - x: ldc #x // String getSupplier - x: ldc #x // String ()Ljava/util/function/Supplier; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested; - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static java.util.function.Supplier getSupplier_static(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested - x: ldc #x // String getSupplier_static - x: ldc #x // String ()Ljava/util/function/Supplier; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: areturn - LineNumberTable: - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private static java.lang.Integer lambda$getSupplier_static$3(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested - x: ldc #x // String lambda$getSupplier_static$3 - x: ldc #x // String ()Ljava/lang/Integer; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: bipush 8 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static java.lang.Integer lambda$getSupplier$2(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested - x: ldc #x // String lambda$getSupplier$2 - x: ldc #x // String ()Ljava/lang/Integer; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: bipush 7 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static java.lang.Integer lambda$static$1(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested - x: ldc #x // String lambda$static$1 - x: ldc #x // String ()Ljava/lang/Integer; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: bipush 6 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static java.lang.Integer lambda$new$0(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested - x: ldc #x // String lambda$new$0 - x: ldc #x // String ()Ljava/lang/Integer; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_5 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested of class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles -SourceFile: "TinyFrameworkLambdas.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - x: #x() - android.hosttest.annotation.HostSideTestStaticInitializerKeep -BootstrapMethods: - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$new$0:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$getSupplier$2:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$getSupplier_static$3:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested.lambda$static$1:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.class - Compiled from "TinyFrameworkLambdas.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 8, attributes: 6 - public final java.util.function.Supplier mSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0011) ACC_PUBLIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static final java.util.function.Supplier sSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkLambdas(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 14 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public java.util.function.Supplier getSupplier(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - x: ldc #x // String getSupplier - x: ldc #x // String ()Ljava/util/function/Supplier; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas; - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - public static java.util.function.Supplier getSupplier_static(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - x: ldc #x // String getSupplier_static - x: ldc #x // String ()Ljava/util/function/Supplier; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: areturn - LineNumberTable: - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - - private static java.lang.Integer lambda$getSupplier_static$3(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - x: ldc #x // String lambda$getSupplier_static$3 - x: ldc #x // String ()Ljava/lang/Integer; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_4 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static java.lang.Integer lambda$getSupplier$2(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - x: ldc #x // String lambda$getSupplier$2 - x: ldc #x // String ()Ljava/lang/Integer; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_3 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static java.lang.Integer lambda$static$1(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - x: ldc #x // String lambda$static$1 - x: ldc #x // String ()Ljava/lang/Integer; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_2 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static java.lang.Integer lambda$new$0(); - descriptor: ()Ljava/lang/Integer; - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - x: ldc #x // String lambda$new$0 - x: ldc #x // String ()Ljava/lang/Integer; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_1 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: invokedynamic #x, 0 // InvokeDynamic #x:get:()Ljava/util/function/Supplier; - x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // Nested=class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested of class com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas - public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles -SourceFile: "TinyFrameworkLambdas.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestKeep - x: #x() - android.hosttest.annotation.HostSideTestStaticInitializerKeep -BootstrapMethods: - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$new$0:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$getSupplier$2:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$getSupplier_static$3:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()Ljava/lang/Object; - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.lambda$static$1:()Ljava/lang/Integer; - #x ()Ljava/lang/Integer; -NestMembers: - com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas$Nested -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo.class - Compiled from "TinyFrameworkMethodCallReplace.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 4, attributes: 4 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static void startThread(java.lang.Thread); - descriptor: (Ljava/lang/Thread;)V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo - x: ldc #x // String startThread - x: ldc #x // String (Ljava/lang/Thread;)V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: iconst_1 - x: invokevirtual #x // Method java/lang/Thread.setDaemon:(Z)V - x: aload_0 - x: invokevirtual #x // Method java/lang/Thread.start:()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 10 0 thread Ljava/lang/Thread; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int add(int, int); - descriptor: (II)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo - x: ldc #x // String add - x: ldc #x // String (II)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iload_0 - x: iload_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 4 0 a I - 11 4 1 b I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // ReplaceTo=class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo of class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace -SourceFile: "TinyFrameworkMethodCallReplace.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.class - Compiled from "TinyFrameworkMethodCallReplace.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 5, attributes: 6 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static boolean nonStaticMethodCallReplaceTester() throws java.lang.Exception; - descriptor: ()Z - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=2, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace - x: ldc #x // String nonStaticMethodCallReplaceTester - x: ldc #x // String ()Z - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: new #x // class java/util/concurrent/atomic/AtomicBoolean - x: dup - x: iconst_0 - x: invokespecial #x // Method java/util/concurrent/atomic/AtomicBoolean."":(Z)V - x: astore_0 - x: new #x // class java/lang/Thread - x: dup - x: aload_0 - x: invokedynamic #x, 0 // InvokeDynamic #x:run:(Ljava/util/concurrent/atomic/AtomicBoolean;)Ljava/lang/Runnable; - x: invokespecial #x // Method java/lang/Thread."":(Ljava/lang/Runnable;)V - x: astore_1 - x: aload_1 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo.startThread:(Ljava/lang/Thread;)V - x: aload_1 - x: invokevirtual #x // Method java/lang/Thread.join:()V - x: aload_0 - x: invokevirtual #x // Method java/util/concurrent/atomic/AtomicBoolean.get:()Z - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 20 27 0 ab Ljava/util/concurrent/atomic/AtomicBoolean; - 34 13 1 th Ljava/lang/Thread; - Exceptions: - throws java.lang.Exception - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int staticMethodCallReplaceTester(); - descriptor: ()I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace - x: ldc #x // String staticMethodCallReplaceTester - x: ldc #x // String ()I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_1 - x: iconst_2 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo.add:(II)I - x: ireturn - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static void lambda$nonStaticMethodCallReplaceTester$0(java.util.concurrent.atomic.AtomicBoolean); - descriptor: (Ljava/util/concurrent/atomic/AtomicBoolean;)V - flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace - x: ldc #x // String lambda$nonStaticMethodCallReplaceTester$0 - x: ldc #x // String (Ljava/util/concurrent/atomic/AtomicBoolean;)V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokestatic #x // Method java/lang/Thread.currentThread:()Ljava/lang/Thread; - x: invokevirtual #x // Method java/lang/Thread.isDaemon:()Z - x: invokevirtual #x // Method java/util/concurrent/atomic/AtomicBoolean.set:(Z)V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 11 0 ab Ljava/util/concurrent/atomic/AtomicBoolean; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // ReplaceTo=class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo of class com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace - public static final #x= #x of #x; // Lookup=class java/lang/invoke/MethodHandles$Lookup of class java/lang/invoke/MethodHandles -SourceFile: "TinyFrameworkMethodCallReplace.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -BootstrapMethods: - x: #x REF_invokeStatic java/lang/invoke/LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; - Method arguments: - #x ()V - #x REF_invokeStatic com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.lambda$nonStaticMethodCallReplaceTester$0:(Ljava/util/concurrent/atomic/AtomicBoolean;)V - #x ()V -NestMembers: - com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace$ReplaceTo -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.class - Compiled from "TinyFrameworkNative.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 15, attributes: 3 - int value; - descriptor: I - flags: (0x0000) - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNative(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int nativeAddTwo(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative - x: ldc #x // String nativeAddTwo - x: ldc #x // String (I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iload_0 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeAddTwo:(I)I - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect - - public static int nativeAddTwo_should_be_like_this(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative - x: ldc #x // String nativeAddTwo_should_be_like_this - x: ldc #x // String (I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iload_0 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeAddTwo:(I)I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 arg I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static long nativeLongPlus(long, long); - descriptor: (JJ)J - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=4, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative - x: ldc #x // String nativeLongPlus - x: ldc #x // String (JJ)J - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: lload_0 - x: lload_2 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeLongPlus:(JJ)J - x: lreturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect - - public static long nativeLongPlus_should_be_like_this(long, long); - descriptor: (JJ)J - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=4, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative - x: ldc #x // String nativeLongPlus_should_be_like_this - x: ldc #x // String (JJ)J - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: lload_0 - x: lload_2 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeLongPlus:(JJ)J - x: lreturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 6 0 arg1 J - 11 6 2 arg2 J - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public void setValue(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative - x: ldc #x // String setValue - x: ldc #x // String (I)V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: iload_1 - x: putfield #x // Field value:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; - 11 6 1 v I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int nativeNonStaticAddToValue(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative - x: ldc #x // String nativeNonStaticAddToValue - x: ldc #x // String (I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: iload_1 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeNonStaticAddToValue:(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect - - public int nativeNonStaticAddToValue_should_be_like_this(int); - descriptor: (I)I - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative - x: ldc #x // String nativeNonStaticAddToValue_should_be_like_this - x: ldc #x // String (I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: iload_1 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeNonStaticAddToValue:(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; - 11 6 1 arg I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static void nativeStillNotSupported(); - descriptor: ()V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative - x: ldc #x // String nativeStillNotSupported - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onThrowMethodCalled:()V - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String Unreachable - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsThrow - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestThrow - - public static native void nativeStillKeep(); - descriptor: ()V - flags: (0x0109) ACC_PUBLIC, ACC_STATIC, ACC_NATIVE - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static void nativeStillNotSupported_should_be_like_this(); - descriptor: ()V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative - x: ldc #x // String nativeStillNotSupported_should_be_like_this - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: new #x // class java/lang/RuntimeException - x: dup - x: invokespecial #x // Method java/lang/RuntimeException."":()V - x: athrow - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static byte nativeBytePlus(byte, byte); - descriptor: (BB)B - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative - x: ldc #x // String nativeBytePlus - x: ldc #x // String (BB)B - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iload_0 - x: iload_1 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.nativeBytePlus:(BB)B - x: ireturn - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect - - public void notNativeRedirected(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative - x: ldc #x // String notNativeRedirected - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.notNativeRedirected:(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;)V - x: return - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect - - public static void notNativeStaticRedirected(); - descriptor: ()V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative - x: ldc #x // String notNativeStaticRedirected - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: invokestatic #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.notNativeStaticRedirected:()V - x: return - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsSubstitute - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestRedirect -} -SourceFile: "TinyFrameworkNative.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep - x: #x(#x=s#x) - android.hosttest.annotation.HostSideTestRedirectionClass( - value="TinyFrameworkNative_host" - ) -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.class - Compiled from "TinyFrameworkNative_host.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 8, attributes: 3 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNative_host(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int nativeAddTwo(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host - x: ldc #x // String nativeAddTwo - x: ldc #x // String (I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iload_0 - x: iconst_2 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 4 0 arg I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static long nativeLongPlus(long, long); - descriptor: (JJ)J - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=4, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host - x: ldc #x // String nativeLongPlus - x: ldc #x // String (JJ)J - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: lload_0 - x: lload_2 - x: ladd - x: lreturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 4 0 arg1 J - 11 4 2 arg2 J - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int nativeNonStaticAddToValue(com.android.hoststubgen.test.tinyframework.TinyFrameworkNative, int); - descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host - x: ldc #x // String nativeNonStaticAddToValue - x: ldc #x // String (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: getfield #x // Field com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.value:I - x: iload_1 - x: iadd - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 7 0 source Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; - 11 7 1 arg I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static byte nativeBytePlus(byte, byte); - descriptor: (BB)B - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host - x: ldc #x // String nativeBytePlus - x: ldc #x // String (BB)B - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iload_0 - x: iload_1 - x: iadd - x: i2b - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 arg1 B - 11 5 1 arg2 B - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static void notNativeRedirected(com.android.hoststubgen.test.tinyframework.TinyFrameworkNative); - descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;)V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host - x: ldc #x // String notNativeRedirected - x: ldc #x // String (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative;)V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 1 0 source Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNative; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static void notNativeStaticRedirected(); - descriptor: ()V - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host - x: ldc #x // String notNativeStaticRedirected - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "TinyFrameworkNative_host.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1.class - Compiled from "TinyFrameworkNestedClasses.java" -class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$1 extends java.lang.Object implements java.util.function.Supplier - minor version: 0 - major version: 61 - flags: (0x0020) ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 - super_class: #x // java/lang/Object - interfaces: 1, fields: 1, methods: 4, attributes: 6 - final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$1(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); - descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - flags: (0x0000) - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 - x: ldc #x // String - x: ldc #x // String (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: aload_1 - x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; - 11 10 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - MethodParameters: - Name Flags - final mandated - - public java.lang.Integer get(); - descriptor: ()Ljava/lang/Integer; - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 - x: ldc #x // String get - x: ldc #x // String ()Ljava/lang/Integer; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_1 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.Object get(); - descriptor: ()Ljava/lang/Object; - flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 - x: ldc #x // String get - x: ldc #x // String ()Ljava/lang/Object; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokevirtual #x // Method get:()Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 -EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses -Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2.class - Compiled from "TinyFrameworkNestedClasses.java" -class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2 extends java.lang.Object implements java.util.function.Supplier - minor version: 0 - major version: 61 - flags: (0x0020) ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 4, attributes: 6 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$2(); - descriptor: ()V - flags: (0x0000) - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.Integer get(); - descriptor: ()Ljava/lang/Integer; - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 - x: ldc #x // String get - x: ldc #x // String ()Ljava/lang/Integer; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_2 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.Object get(); - descriptor: ()Ljava/lang/Object; - flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 - x: ldc #x // String get - x: ldc #x // String ()Ljava/lang/Object; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokevirtual #x // Method get:()Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 -EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses -Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3.class - Compiled from "TinyFrameworkNestedClasses.java" -class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$3 extends java.lang.Object implements java.util.function.Supplier - minor version: 0 - major version: 61 - flags: (0x0020) ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 - super_class: #x // java/lang/Object - interfaces: 1, fields: 1, methods: 4, attributes: 6 - final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$3(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); - descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - flags: (0x0000) - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 - x: ldc #x // String - x: ldc #x // String (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: aload_1 - x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; - 11 10 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - MethodParameters: - Name Flags - final mandated - - public java.lang.Integer get(); - descriptor: ()Ljava/lang/Integer; - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 - x: ldc #x // String get - x: ldc #x // String ()Ljava/lang/Integer; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_3 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.Object get(); - descriptor: ()Ljava/lang/Object; - flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 - x: ldc #x // String get - x: ldc #x // String ()Ljava/lang/Object; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokevirtual #x // Method get:()Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 -EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses.getSupplier -Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4.class - Compiled from "TinyFrameworkNestedClasses.java" -class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4 extends java.lang.Object implements java.util.function.Supplier - minor version: 0 - major version: 61 - flags: (0x0020) ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 4, attributes: 6 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$4(); - descriptor: ()V - flags: (0x0000) - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.Integer get(); - descriptor: ()Ljava/lang/Integer; - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 - x: ldc #x // String get - x: ldc #x // String ()Ljava/lang/Integer; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: iconst_4 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.Object get(); - descriptor: ()Ljava/lang/Object; - flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 - x: ldc #x // String get - x: ldc #x // String ()Ljava/lang/Object; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokevirtual #x // Method get:()Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 -EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses.getSupplier_static -Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 2, attributes: 4 - public int value; - descriptor: I - flags: (0x0001) ACC_PUBLIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass - x: ldc #x // String - x: ldc #x // String (I)V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iload_1 - x: putfield #x // Field value:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass; - 11 10 1 x I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$InnerClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 2, attributes: 4 - public int value; - descriptor: I - flags: (0x0001) ACC_PUBLIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - final com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses this$0; - descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - flags: (0x1010) ACC_FINAL, ACC_SYNTHETIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$InnerClass(com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses); - descriptor: (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass - x: ldc #x // String - x: ldc #x // String (Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: aload_1 - x: putfield #x // Field this$0:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iconst_5 - x: putfield #x // Field value:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 15 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass; - 11 15 1 this$0 Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - MethodParameters: - Name Flags - final mandated -} -InnerClasses: - public #x= #x of #x; // InnerClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1.class - Compiled from "TinyFrameworkNestedClasses.java" -class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$1 extends java.lang.Object implements java.util.function.Supplier - minor version: 0 - major version: 61 - flags: (0x0020) ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 4, attributes: 6 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$1(); - descriptor: ()V - flags: (0x0000) - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.Integer get(); - descriptor: ()Ljava/lang/Integer; - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 - x: ldc #x // String get - x: ldc #x // String ()Ljava/lang/Integer; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: bipush 7 - x: invokestatic #x // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.lang.Object get(); - descriptor: ()Ljava/lang/Object; - flags: (0x1041) ACC_PUBLIC, ACC_BRIDGE, ACC_SYNTHETIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 - x: ldc #x // String get - x: ldc #x // String ()Ljava/lang/Object; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokevirtual #x // Method get:()Ljava/lang/Integer; - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 -EnclosingMethod: #x.#x // com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass.getSupplier_static -Signature: #x // Ljava/lang/Object;Ljava/util/function/Supplier; -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 2, attributes: 4 - public int value; - descriptor: I - flags: (0x0001) ACC_PUBLIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: bipush 8 - x: putfield #x // Field value:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 11 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 3, attributes: 4 - public int value; - descriptor: I - flags: (0x0001) ACC_PUBLIC - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$StaticNestedClass(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: bipush 6 - x: putfield #x // Field value:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 11 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static java.util.function.Supplier getSupplier_static(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass - x: ldc #x // String getSupplier_static - x: ldc #x // String ()Ljava/util/function/Supplier; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 - x: dup - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1."":()V - x: areturn - LineNumberTable: - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 - public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$SubClass extends com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$BaseClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass - super_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass - interfaces: 0, fields: 0, methods: 2, attributes: 4 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses$SubClass(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass - x: ldc #x // String - x: ldc #x // String (I)V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: iload_1 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass."":(I)V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 6 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass; - 11 6 1 x I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public static #x= #x of #x; // SubClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -NestHost: class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses.class - Compiled from "TinyFrameworkNestedClasses.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - super_class: #x // java/lang/Object - interfaces: 0, fields: 2, methods: 4, attributes: 5 - public final java.util.function.Supplier mSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0011) ACC_PUBLIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static final java.util.function.Supplier sSupplier; - descriptor: Ljava/util/function/Supplier; - flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL - Signature: #x // Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkNestedClasses(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 - x: dup - x: aload_0 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1."":(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - x: putfield #x // Field mSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 17 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public java.util.function.Supplier getSupplier(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - x: ldc #x // String getSupplier - x: ldc #x // String ()Ljava/util/function/Supplier; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 - x: dup - x: aload_0 - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3."":(Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses;)V - x: areturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 9 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses; - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static java.util.function.Supplier getSupplier_static(); - descriptor: ()Ljava/util/function/Supplier; - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - x: ldc #x // String getSupplier_static - x: ldc #x // String ()Ljava/util/function/Supplier; - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 - x: dup - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4."":()V - x: areturn - LineNumberTable: - Signature: #x // ()Ljava/util/function/Supplier; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - static {}; - descriptor: ()V - flags: (0x0008) ACC_STATIC - Code: - stack=4, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: new #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 - x: dup - x: invokespecial #x // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2."":()V - x: putstatic #x // Field sSupplier:Ljava/util/function/Supplier; - x: return - LineNumberTable: - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -InnerClasses: - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 - public static #x= #x of #x; // SubClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public static #x= #x of #x; // BaseClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public static #x= #x of #x; // StaticNestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public #x= #x of #x; // InnerClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses - public static #x= #x of #x; // Double$NestedClass=class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass of class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass - #x; // class com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 -SourceFile: "TinyFrameworkNestedClasses.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -NestMembers: - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$SubClass - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$BaseClass - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$Double$NestedClass - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$StaticNestedClass$1 - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$InnerClass - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$4 - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$3 - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$2 - com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses$1 -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect.class - Compiled from "TinyFrameworkPackageRedirect.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedirect - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 3, attributes: 3 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkPackageRedirect(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int foo(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect - x: ldc #x // String foo - x: ldc #x // String (I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: new #x // class com/supported/UnsupportedClass - x: dup - x: iload_0 - x: invokespecial #x // Method com/supported/UnsupportedClass."":(I)V - x: invokevirtual #x // Method com/supported/UnsupportedClass.getValue:()I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 12 0 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "TinyFrameworkPackageRedirect.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.class - Compiled from "TinyFrameworkRenamedClassCaller.java" -public class com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 3, attributes: 3 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.android.hoststubgen.test.tinyframework.TinyFrameworkRenamedClassCaller(); - descriptor: ()V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller - x: ldc #x // String - x: ldc #x // String ()V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public static int foo(int); - descriptor: (I)I - flags: (0x0009) ACC_PUBLIC, ACC_STATIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller - x: ldc #x // String foo - x: ldc #x // String (I)I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: new #x // class rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed - x: dup - x: iload_0 - x: invokespecial #x // Method rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed."":(I)V - x: invokevirtual #x // Method rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.getValue:()I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 12 0 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "TinyFrameworkRenamedClassCaller.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/android/hoststubgen/test/tinyframework/packagetest/A.class - Compiled from "A.java" -public class com.android.hoststubgen.test.tinyframework.packagetest.A - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/A - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/packagetest/A - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "A.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/packagetest/sub/A.class - Compiled from "A.java" -public class com.android.hoststubgen.test.tinyframework.packagetest.sub.A - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/packagetest/sub/A - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/packagetest/sub/A - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "A.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C1.class - Compiled from "C1.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.C1 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/C1 - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "C1.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C2.class - Compiled from "C2.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.C2 extends com.android.hoststubgen.test.tinyframework.subclasstest.C1 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 - interfaces: 0, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/C2 - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "C2.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/C3.class - Compiled from "C3.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.C3 extends com.android.hoststubgen.test.tinyframework.subclasstest.C2 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3 - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 - interfaces: 0, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/C3 - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "C3.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/CA.class - Compiled from "CA.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.CA - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CA - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/CA - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "CA.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/CB.class - Compiled from "CB.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.CB - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/CB - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/CB - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "CB.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1.class - Compiled from "Class_C1.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C1 extends com.android.hoststubgen.test.tinyframework.subclasstest.C1 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1 - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C1 - interfaces: 0, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1 - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "Class_C1.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2.class - Compiled from "Class_C2.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C2 extends com.android.hoststubgen.test.tinyframework.subclasstest.C2 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2 - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C2 - interfaces: 0, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2 - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "Class_C2.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3.class - Compiled from "Class_C3.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_C3 extends com.android.hoststubgen.test.tinyframework.subclasstest.C3 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3 - super_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/C3 - interfaces: 0, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3 - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "Class_C3.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1.class - Compiled from "Class_I1.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1 implements com.android.hoststubgen.test.tinyframework.subclasstest.I1 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1 - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "Class_I1.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA.class - Compiled from "Class_I1_IA.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I1_IA implements com.android.hoststubgen.test.tinyframework.subclasstest.I1,com.android.hoststubgen.test.tinyframework.subclasstest.IA - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA - super_class: #x // java/lang/Object - interfaces: 2, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "Class_I1_IA.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2.class - Compiled from "Class_I2.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I2 implements com.android.hoststubgen.test.tinyframework.subclasstest.I2 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2 - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "Class_I2.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3.class - Compiled from "Class_I3.java" -public class com.android.hoststubgen.test.tinyframework.subclasstest.Class_I3 implements com.android.hoststubgen.test.tinyframework.subclasstest.I3 - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3 - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "Class_I3.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I1.class - Compiled from "I1.java" -public interface com.android.hoststubgen.test.tinyframework.subclasstest.I1 - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I1 - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/I1 - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "I1.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I2.class - Compiled from "I2.java" -public interface com.android.hoststubgen.test.tinyframework.subclasstest.I2 extends com.android.hoststubgen.test.tinyframework.subclasstest.I1 - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I2 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/I2 - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "I2.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/I3.class - Compiled from "I3.java" -public interface com.android.hoststubgen.test.tinyframework.subclasstest.I3 extends com.android.hoststubgen.test.tinyframework.subclasstest.I2 - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/I3 - super_class: #x // java/lang/Object - interfaces: 1, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/I3 - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "I3.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/IA.class - Compiled from "IA.java" -public interface com.android.hoststubgen.test.tinyframework.subclasstest.IA - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IA - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/IA - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "IA.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/android/hoststubgen/test/tinyframework/subclasstest/IB.class - Compiled from "IB.java" -public interface com.android.hoststubgen.test.tinyframework.subclasstest.IB - minor version: 0 - major version: 61 - flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT - this_class: #x // com/android/hoststubgen/test/tinyframework/subclasstest/IB - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 1, attributes: 2 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/subclasstest/IB - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return -} -SourceFile: "IB.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -## Class: com/supported/UnsupportedClass.class - Compiled from "UnsupportedClass.java" -public class com.supported.UnsupportedClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/supported/UnsupportedClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 3, attributes: 3 - private final int mValue; - descriptor: I - flags: (0x0012) ACC_PRIVATE, ACC_FINAL - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/supported/UnsupportedClass - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.supported.UnsupportedClass(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/supported/UnsupportedClass - x: ldc #x // String - x: ldc #x // String (I)V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iload_1 - x: putfield #x // Field mValue:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 10 0 this Lcom/supported/UnsupportedClass; - 11 10 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int getValue(); - descriptor: ()I - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/supported/UnsupportedClass - x: ldc #x // String getValue - x: ldc #x // String ()I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: getfield #x // Field mValue:I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/supported/UnsupportedClass; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "UnsupportedClass.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: com/unsupported/UnsupportedClass.class - Compiled from "UnsupportedClass.java" -public class com.unsupported.UnsupportedClass - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // com/unsupported/UnsupportedClass - super_class: #x // java/lang/Object - interfaces: 0, fields: 0, methods: 3, attributes: 3 - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/unsupported/UnsupportedClass - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public com.unsupported.UnsupportedClass(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/unsupported/UnsupportedClass - x: ldc #x // String - x: ldc #x // String (I)V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String This class is not supported - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 14 0 this Lcom/unsupported/UnsupportedClass; - 11 14 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int getValue(); - descriptor: ()I - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/unsupported/UnsupportedClass - x: ldc #x // String getValue - x: ldc #x // String ()I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: new #x // class java/lang/RuntimeException - x: dup - x: ldc #x // String This class is not supported - x: invokespecial #x // Method java/lang/RuntimeException."":(Ljava/lang/String;)V - x: athrow - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 10 0 this Lcom/unsupported/UnsupportedClass; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "UnsupportedClass.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep -## Class: rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.class - Compiled from "TinyFrameworkToBeRenamed.java" -public class rename_prefix.com.android.hoststubgen.test.tinyframework.TinyFrameworkToBeRenamed - minor version: 0 - major version: 61 - flags: (0x0021) ACC_PUBLIC, ACC_SUPER - this_class: #x // rename_prefix/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed - super_class: #x // java/lang/Object - interfaces: 0, fields: 1, methods: 3, attributes: 3 - private final int mValue; - descriptor: I - flags: (0x0012) ACC_PRIVATE, ACC_FINAL - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - private static {}; - descriptor: ()V - flags: (0x000a) ACC_PRIVATE, ACC_STATIC - Code: - stack=2, locals=0, args_size=0 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logClassLoaded - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.onClassLoaded:(Ljava/lang/Class;Ljava/lang/String;)V - x: return - - public rename_prefix.com.android.hoststubgen.test.tinyframework.TinyFrameworkToBeRenamed(int); - descriptor: (I)V - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=2, args_size=2 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed - x: ldc #x // String - x: ldc #x // String (I)V - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: invokespecial #x // Method java/lang/Object."":()V - x: aload_0 - x: iload_1 - x: putfield #x // Field mValue:I - x: return - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 10 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed; - 11 10 1 value I - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep - - public int getValue(); - descriptor: ()I - flags: (0x0001) ACC_PUBLIC - Code: - stack=4, locals=1, args_size=1 - x: ldc #x // class com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed - x: ldc #x // String getValue - x: ldc #x // String ()I - x: ldc #x // String com.android.hoststubgen.hosthelper.HostTestUtils.logMethodCall - x: invokestatic #x // Method com/android/hoststubgen/hosthelper/HostTestUtils.callMethodCallHook:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - x: aload_0 - x: getfield #x // Field mValue:I - x: ireturn - LineNumberTable: - LocalVariableTable: - Start Length Slot Name Signature - 11 5 0 this Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed; - RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -} -SourceFile: "TinyFrameworkToBeRenamed.java" -RuntimeVisibleAnnotations: - x: #x() - com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep -RuntimeInvisibleAnnotations: - x: #x() - android.hosttest.annotation.HostSideTestWholeClassKeep diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/policy-override-tiny-framework.txt b/tools/hoststubgen/hoststubgen/test-tiny-framework/policy-override-tiny-framework.txt deleted file mode 100644 index 3c138d21b75d..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/policy-override-tiny-framework.txt +++ /dev/null @@ -1,75 +0,0 @@ -class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy keep - field stub keep - # field remove remove # Implicitly remove - method ()V keep - method addOne (I)I keep - method addOneInner (I)I keep - method toBeRemoved (Ljava/lang/String;)V remove - method addTwo (I)I @addTwo_host - # method addTwo_host (I)I # used as a substitute - method nativeAddThree (I)I @addThree_host - # method addThree_host (I)I # used as a substitute - method unsupportedMethod ()Ljava/lang/String; throw - method visibleButUsesUnsupportedMethod ()Ljava/lang/String; keep - method toBeIgnoredObj ()Ljava/lang/String; ignore - method toBeIgnoredV ()V ignore - method toBeIgnoredZ ()Z ignore - method toBeIgnoredB ()B ignore - method toBeIgnoredC ()C ignore - method toBeIgnoredS ()S ignore - method toBeIgnoredI ()I ignore - method toBeIgnoredL ()L ignore - method toBeIgnoredF ()F ignore - method toBeIgnoredD ()D ignore - -# Class load hook -class com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy ~com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded - -# Heuristics rule: Stub all the AIDL classes. -class :aidl keepclass - -# Heuristics rule: Stub all the R classes. -class :r keepclass - -# Default is "remove", so let's put all the base classes / interfaces in the stub first. -class com.android.hoststubgen.test.tinyframework.subclasstest.C1 keep -class com.android.hoststubgen.test.tinyframework.subclasstest.C2 keep -class com.android.hoststubgen.test.tinyframework.subclasstest.C3 keep -class com.android.hoststubgen.test.tinyframework.subclasstest.CA keep -class com.android.hoststubgen.test.tinyframework.subclasstest.CB keep -class com.android.hoststubgen.test.tinyframework.subclasstest.I1 keep -class com.android.hoststubgen.test.tinyframework.subclasstest.I2 keep -class com.android.hoststubgen.test.tinyframework.subclasstest.I3 keep -class com.android.hoststubgen.test.tinyframework.subclasstest.IA keep -class com.android.hoststubgen.test.tinyframework.subclasstest.IB keep - -# Then define inheritance based policies. -class *com.android.hoststubgen.test.tinyframework.subclasstest.C1 keep -class *com.android.hoststubgen.test.tinyframework.subclasstest.CA remove - -class *com.android.hoststubgen.test.tinyframework.subclasstest.I1 keep -class *com.android.hoststubgen.test.tinyframework.subclasstest.IA remove - -# Test package directive -package com.android.hoststubgen.test.tinyframework.packagetest keep -class com.android.hoststubgen.test.tinyframework.packagetest.B remove -class com.android.hoststubgen.test.tinyframework.packagetest.sub.B remove -# The following rules are the same as above -# class com.android.hoststubgen.test.tinyframework.packagetest.A keep -# class com.android.hoststubgen.test.tinyframework.packagetest.sub.A keep - -# Used to test method call replacement. -class com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace keepclass - method originalAdd (II)I @com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo.add - -# Used to test method call replacement. -# Note because java.lang.Thread is _not_ within the tiny-framework jar, the policy ("keep") -# doesn't realy matter. -class java.lang.Thread keep - method start ()V @com.android.hoststubgen.test.tinyframework.TinyFrameworkMethodCallReplace$ReplaceTo.startThread - - -# "rename" takes a type internal name, so '/'s is used as a separator. -# The leading / in the prefix is not needed (it'll be stripped), but it's added to make -# sure the stripping works. -rename ^.*/TinyFrameworkToBeRenamed$ /rename_prefix/ diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/run-test-manually.sh b/tools/hoststubgen/hoststubgen/test-tiny-framework/run-test-manually.sh deleted file mode 100755 index 80ebf3adab3d..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/run-test-manually.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/bash -# Copyright (C) 2023 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -source "${0%/*}"/../../common.sh - -# This scripts run the "tiny-framework" test, but does most stuff from the command line, using -# the native java and javac commands. - -debug=0 -while getopts "d" opt; do -case "$opt" in - d) debug=1 ;; -esac -done -shift $(($OPTIND - 1)) - - -out=out - -rm -fr $out -mkdir -p $out - -HOSTSTUBGEN=hoststubgen - -# Rebuild the tool and the dependencies. These are the only things we build with the build system. -run m $HOSTSTUBGEN hoststubgen-annotations hoststubgen-helper-runtime truth junit - - -# Build tiny-framework - -tiny_framework_classes=$out/tiny-framework/classes/ -tiny_framework_jar=$out/tiny-framework.jar -tiny_framework_host_jar=$out/tiny-framework_host.jar - -tiny_test_classes=$out/tiny-test/classes/ -tiny_test_jar=$out/tiny-test.jar - -framework_compile_classpaths=( - $SOONG_INT/frameworks/base/tools/hoststubgen/hoststubgen/hoststubgen-annotations/android_common/javac/hoststubgen-annotations.jar -) - -test_compile_classpaths=( - $SOONG_INT/external/junit/junit/android_common/combined/junit.jar - $SOONG_INT/external/truth/truth/android_common/combined/truth.jar -) - -test_runtime_classpaths=( - $SOONG_INT/frameworks/base/tools/hoststubgen/hoststubgen/hoststubgen-helper-runtime/linux_glibc_common/javac/hoststubgen-helper-runtime.jar -) - -# This suite runs all tests in the JAR. -test_classes=(com.android.hoststubgen.hosthelper.HostTestSuite) - -# Uncomment this to run a specific test. -# tests=(com.android.hoststubgen.test.tinyframework.TinyFrameworkBenchmark) - - -# Build tiny-framework.jar -echo "# Building tiny-framework..." -run $JAVAC \ - -cp $( \ - join : \ - ${framework_compile_classpaths[@]} \ - ) \ - -d $tiny_framework_classes \ - tiny-framework/src/**/*.java - -run $JAR cvf $tiny_framework_jar \ - -C $tiny_framework_classes . - -# Build stub/impl jars -echo "# Generating the stub and impl jars..." -run $HOSTSTUBGEN \ - @../hoststubgen-standard-options.txt \ - --in-jar $tiny_framework_jar \ - --out-jar $tiny_framework_host_jar \ - --policy-override-file policy-override-tiny-framework.txt \ - --gen-keep-all-file out/tiny-framework_keep_all.txt \ - --gen-input-dump-file out/tiny-framework_dump.txt \ - --package-redirect com.unsupported:com.supported \ - --annotation-allowed-classes-file annotation-allowed-classes-tiny-framework.txt \ - $HOSTSTUBGEN_OPTS - -# Extract the jar files, so we can look into them. -extract $tiny_framework_host_jar - -# Build the test -echo "# Building tiny-test..." -run $JAVAC \ - -cp $( \ - join : \ - $tiny_framework_jar \ - "${test_compile_classpaths[@]}" \ - ) \ - -d $tiny_test_classes \ - tiny-test/src/**/*.java - -run $JAR cvf $tiny_test_jar \ - -C $tiny_test_classes . - -if (( $debug )) ; then - JAVA_OPTS="$JAVA_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8700" -fi - -# Run the test -echo "# Running tiny-test..." -run $JAVA \ - $JAVA_OPTS \ - -cp $( \ - join : \ - $tiny_test_jar \ - $tiny_framework_host_jar \ - "${test_compile_classpaths[@]}" \ - "${test_runtime_classpaths[@]}" \ - ) \ - org.junit.runner.JUnitCore \ - ${test_classes[@]} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework-dump-test.py b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework-dump-test.py deleted file mode 100755 index cee29dcd1d59..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework-dump-test.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/python3 -# Copyright (C) 2023 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Compare the tiny-framework JAR dumps to the golden files. - -import sys -import os -import unittest -import subprocess - -GOLDEN_DIR = 'golden-output' - -# Run diff. -def run_diff(file1, file2): - command = ['diff', '-u', '--ignore-blank-lines', '--ignore-space-change', file1, file2] - print(' '.join(command)) - result = subprocess.run(command, stderr = sys.stdout) - - success = result.returncode == 0 - - if success: - print(f'No diff found.') - else: - print(f'Fail: {file1} and {file2} are different.') - - return success - - -# Check one golden file. -def check_one_file(filename): - print(f'= Checking file: {filename}') - return run_diff(os.path.join(GOLDEN_DIR, filename), filename) - -class TestWithGoldenOutput(unittest.TestCase): - - # Test to check the generated jar files to the golden output. - def test_compare_to_golden(self): - files = os.listdir(GOLDEN_DIR) - files.sort() - - print(f"Golden files: {files}") - success = True - - for file in files: - if not check_one_file(file): - success = False - - if not success: - self.fail('Some files are different. See stdout log for more details.') - -if __name__ == "__main__": - unittest.main(verbosity=2) diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/IPretendingAidl.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/IPretendingAidl.java deleted file mode 100644 index 0a07c2b91fc3..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/IPretendingAidl.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -/** - * An interface that matches the "AIDL detection heuristics' logic. - * - * The "class :aidl" line in the text policy file will control the visibility of it. - */ -public interface IPretendingAidl { - public static class Stub { - public static int addOne(int a) { - return a + 1; - } - - public static class Proxy { - public static int addTwo(int a) { - return a + 2; - } - } - } - -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/R.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/R.java deleted file mode 100644 index b1bedf4b6853..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/R.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -public class R { - public static class Nested { - public static int[] ARRAY = new int[] {1}; - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.java deleted file mode 100644 index 3415deb957ed..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotations.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import android.hosttest.annotation.HostSideTestClassLoadHook; -import android.hosttest.annotation.HostSideTestIgnore; -import android.hosttest.annotation.HostSideTestKeep; -import android.hosttest.annotation.HostSideTestRemove; -import android.hosttest.annotation.HostSideTestSubstitute; -import android.hosttest.annotation.HostSideTestThrow; - -/** - * Test without class-wide annotations. - */ -@HostSideTestKeep -@HostSideTestClassLoadHook( - "com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded") -public class TinyFrameworkAnnotations { - @HostSideTestKeep - public TinyFrameworkAnnotations() { - } - - @HostSideTestKeep - public int keep = 1; - - // Members will be deleted by default. - // Deleted fields cannot have an initial value, because otherwise .ctor will fail to set it at - // runtime. - public int remove; - - @HostSideTestKeep - public int addOne(int value) { - return value + 1; - } - - @HostSideTestRemove // Explicitly remove - public void toBeRemoved(String foo) { - throw new RuntimeException(); - } - - @HostSideTestSubstitute(suffix = "_host") - public int addTwo(int value) { - throw new RuntimeException("not supported on host side"); - } - - public int addTwo_host(int value) { - return value + 2; - } - - @HostSideTestSubstitute(suffix = "_host") - public static native int nativeAddThree(int value); - - // This method is private, but at runtime, it'll inherit the visibility of the original method - private static int nativeAddThree_host(int value) { - return value + 3; - } - - @HostSideTestThrow - public String unsupportedMethod() { - return "This value shouldn't be seen on the host side."; - } - - @HostSideTestIgnore - public int toBeIgnored() { - throw new RuntimeException("not supported on host side"); - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook.java deleted file mode 100644 index f734790c8dd9..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassLoadHook.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import android.hosttest.annotation.HostSideTestWholeClassKeep; - -import java.util.HashSet; -import java.util.Set; - -@HostSideTestWholeClassKeep -public class TinyFrameworkClassLoadHook { - private TinyFrameworkClassLoadHook() { - } - - public static final Set> sLoadedClasses = new HashSet<>(); - - public static void onClassLoaded(Class clazz) { - sLoadedClasses.add(clazz); - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations.java deleted file mode 100644 index e83163edb5e5..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotations.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import android.hosttest.annotation.HostSideTestRemove; -import android.hosttest.annotation.HostSideTestSubstitute; -import android.hosttest.annotation.HostSideTestThrow; -import android.hosttest.annotation.HostSideTestWholeClassKeep; - -@HostSideTestWholeClassKeep -public class TinyFrameworkClassWideAnnotations { - public TinyFrameworkClassWideAnnotations() { - } - - public int keep = 1; - - @HostSideTestRemove - public int remove; - - public int addOne(int value) { - return value + 1; - } - - @HostSideTestSubstitute(suffix = "_host") - public int addTwo(int value) { - throw new RuntimeException("not supported on host side"); - } - - public int addTwo_host(int value) { - return value + 2; - } - - @HostSideTestRemove - public void toBeRemoved(String foo) { - throw new RuntimeException(); - } - - @HostSideTestThrow - public String unsupportedMethod() { - return "This value shouldn't be seen on the host side."; - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault.java deleted file mode 100644 index 3df21d9a5647..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerDefault.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import android.hosttest.annotation.HostSideTestKeep; - -@HostSideTestKeep -public class TinyFrameworkClassWithInitializerDefault { - static { - sInitialized = true; - } - - @HostSideTestKeep - public static boolean sInitialized; - @HostSideTestKeep - public static Object sObject = new Object(); -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub.java deleted file mode 100644 index cc665de9cd01..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWithInitializerStub.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import android.hosttest.annotation.HostSideTestClassLoadHook; -import android.hosttest.annotation.HostSideTestKeep; -import android.hosttest.annotation.HostSideTestStaticInitializerKeep; - -@HostSideTestClassLoadHook( - "com.android.hoststubgen.test.tinyframework.TinyFrameworkClassLoadHook.onClassLoaded") -@HostSideTestKeep -@HostSideTestStaticInitializerKeep -public class TinyFrameworkClassWithInitializerStub { - static { - sInitialized = true; - } - - @HostSideTestKeep - public static boolean sInitialized; - @HostSideTestKeep - public static Object sObject = new Object(); -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex.java deleted file mode 100644 index f833ad814513..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import android.hosttest.annotation.HostSideTestKeep; - -@HostSideTestKeep -public enum TinyFrameworkEnumComplex { - @HostSideTestKeep - RED("Red", "R"), - @HostSideTestKeep - GREEN("Green", "G"), - @HostSideTestKeep - BLUE("Blue", "B"); - - @HostSideTestKeep - private final String mLongName; - - @HostSideTestKeep - private final String mShortName; - - @HostSideTestKeep - TinyFrameworkEnumComplex(String longName, String shortName) { - mLongName = longName; - mShortName = shortName; - } - - @HostSideTestKeep - public String getLongName() { - return mLongName; - } - - @HostSideTestKeep - public String getShortName() { - return mShortName; - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple.java deleted file mode 100644 index c023169b5601..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import android.hosttest.annotation.HostSideTestKeep; - -@HostSideTestKeep -public enum TinyFrameworkEnumSimple { - @HostSideTestKeep - CAT, - @HostSideTestKeep - DOG, -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester.java deleted file mode 100644 index f7cae7d255fe..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import android.hosttest.annotation.HostSideTestWholeClassKeep; - -@HostSideTestWholeClassKeep -public class TinyFrameworkExceptionTester { - public static int testException() { - try { - throw new IllegalStateException("Inner exception"); - } catch (Exception e) { - throw new RuntimeException("Outer exception", e); - } - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy.java deleted file mode 100644 index ec1efba99c77..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkForTextPolicy.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -/** - * Class for testing the "text policy" file. - */ -public class TinyFrameworkForTextPolicy { - public TinyFrameworkForTextPolicy() { - } - - public int stub = 1; - - // Removed fields cannot have an initial value, because otherwise .ctor will fail to set it at - // runtime. - public int remove; - - public int addOne(int value) { - return value + 1; - } - - public void toBeRemoved(String foo) { - throw new RuntimeException(); - } - - public String toBeIgnoredObj() { - throw new RuntimeException(); - } - - public void toBeIgnoredV() { - throw new RuntimeException(); - } - - public boolean toBeIgnoredZ() { - throw new RuntimeException(); - } - - public byte toBeIgnoredB() { - throw new RuntimeException(); - } - - public char toBeIgnoredC() { - throw new RuntimeException(); - } - - public short toBeIgnoredS() { - throw new RuntimeException(); - } - - public int toBeIgnoredI() { - throw new RuntimeException(); - } - - public float toBeIgnoredF() { - throw new RuntimeException(); - } - - public double toBeIgnoredD() { - throw new RuntimeException(); - } - - public int addTwo(int value) { - throw new RuntimeException("not supported on host side"); - } - - public int addTwo_host(int value) { - return value + 2; - } - - public static native int nativeAddThree(int value); - - public static int addThree_host(int value) { - return value + 3; - } - - public String unsupportedMethod() { - return "This value shouldn't be seen on the host side."; - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.java deleted file mode 100644 index 1ca653ec7da6..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkLambdas.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import android.hosttest.annotation.HostSideTestKeep; -import android.hosttest.annotation.HostSideTestStaticInitializerKeep; - -import java.util.function.Supplier; - - -/** - * In this class, we explicitly mark each member as "stub". (rather than using WholeClassStub) - * - * This means the actual generated lambda functions would be removed by default. - * - * Implicit filter should take care of them. - */ -@HostSideTestKeep -@HostSideTestStaticInitializerKeep -public class TinyFrameworkLambdas { - @HostSideTestKeep - public TinyFrameworkLambdas() { - } - - @HostSideTestKeep - public final Supplier mSupplier = () -> 1; - - @HostSideTestKeep - public static final Supplier sSupplier = () -> 2; - - @HostSideTestKeep - public Supplier getSupplier() { - return () -> 3; - } - - @HostSideTestKeep - public static Supplier getSupplier_static() { - return () -> 4; - } - - @HostSideTestKeep - @HostSideTestStaticInitializerKeep - public static class Nested { - @HostSideTestKeep - public Nested() { - } - - @HostSideTestKeep - public final Supplier mSupplier = () -> 5; - - @HostSideTestKeep - public static final Supplier sSupplier = () -> 6; - - @HostSideTestKeep - public Supplier getSupplier() { - return () -> 7; - } - - @HostSideTestKeep - public static Supplier getSupplier_static() { - return () -> 8; - } - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.java deleted file mode 100644 index 57c69a336654..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkMethodCallReplace.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import android.hosttest.annotation.HostSideTestWholeClassKeep; - -import java.util.concurrent.atomic.AtomicBoolean; - -@HostSideTestWholeClassKeep -public class TinyFrameworkMethodCallReplace { - // This method should return true. - public static boolean nonStaticMethodCallReplaceTester() throws Exception { - final AtomicBoolean ab = new AtomicBoolean(false); - - Thread th = new Thread(() -> { - ab.set(Thread.currentThread().isDaemon()); - }); - // This Thread.start() call will be redirected to ReplaceTo.startThread() - // (because of the policy file directive) which will make the thread "daemon" and start it. - th.start(); - th.join(); - - return ab.get(); // This should be true. - } - - public static int staticMethodCallReplaceTester() { - // This method call will be replaced with ReplaceTo.add(). - return originalAdd(1, 2); - } - - private static int originalAdd(int a, int b) { - return a + b - 1; // Original is broken. - } - - public static class ReplaceTo { - public static void startThread(Thread thread) { - thread.setDaemon(true); - thread.start(); - } - - public static int add(int a, int b) { - return a + b; - } - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.java deleted file mode 100644 index 04a551c8c46e..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNative.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import android.hosttest.annotation.HostSideTestRedirect; -import android.hosttest.annotation.HostSideTestRedirectionClass; -import android.hosttest.annotation.HostSideTestThrow; -import android.hosttest.annotation.HostSideTestWholeClassKeep; - -@HostSideTestWholeClassKeep -@HostSideTestRedirectionClass("TinyFrameworkNative_host") -public class TinyFrameworkNative { - - @HostSideTestRedirect - public static native int nativeAddTwo(int arg); - - public static int nativeAddTwo_should_be_like_this(int arg) { - return TinyFrameworkNative_host.nativeAddTwo(arg); - } - - @HostSideTestRedirect - public static native long nativeLongPlus(long arg1, long arg2); - - public static long nativeLongPlus_should_be_like_this(long arg1, long arg2) { - return TinyFrameworkNative_host.nativeLongPlus(arg1, arg2); - } - - int value; - - public void setValue(int v) { - this.value = v; - } - - @HostSideTestRedirect - public native int nativeNonStaticAddToValue(int arg); - - public int nativeNonStaticAddToValue_should_be_like_this(int arg) { - return TinyFrameworkNative_host.nativeNonStaticAddToValue(this, arg); - } - - @HostSideTestThrow - public static native void nativeStillNotSupported(); - - public static native void nativeStillKeep(); - - public static void nativeStillNotSupported_should_be_like_this() { - throw new RuntimeException(); - } - - @HostSideTestRedirect - public static native byte nativeBytePlus(byte arg1, byte arg2); - - @HostSideTestRedirect - public void notNativeRedirected() { - throw new RuntimeException(); - } - - @HostSideTestRedirect - public static void notNativeStaticRedirected() { - throw new RuntimeException(); - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.java deleted file mode 100644 index c7a29a1cc0f9..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNative_host.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import android.hosttest.annotation.HostSideTestWholeClassKeep; - -@HostSideTestWholeClassKeep -public class TinyFrameworkNative_host { - public static int nativeAddTwo(int arg) { - return arg + 2; - } - - public static long nativeLongPlus(long arg1, long arg2) { - return arg1 + arg2; - } - - // Note, the method must be static even for a non-static native method, but instead it - // must take the "source" instance as the first argument. - public static int nativeNonStaticAddToValue(TinyFrameworkNative source, int arg) { - return source.value + arg; - } - - public static byte nativeBytePlus(byte arg1, byte arg2) { - return (byte) (arg1 + arg2); - } - - public static void notNativeRedirected(TinyFrameworkNative source) { - } - - public static void notNativeStaticRedirected() { - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses.java deleted file mode 100644 index c1ea2ee59fbb..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkNestedClasses.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import android.hosttest.annotation.HostSideTestWholeClassKeep; - -import java.util.function.Supplier; - -@HostSideTestWholeClassKeep -public class TinyFrameworkNestedClasses { - public final Supplier mSupplier = new Supplier() { - @Override - public Integer get() { - return 1; - } - }; - - public static final Supplier sSupplier = new Supplier() { - @Override - public Integer get() { - return 2; - } - }; - - public Supplier getSupplier() { - return new Supplier() { - @Override - public Integer get() { - return 3; - } - }; - } - - public static Supplier getSupplier_static() { - return new Supplier() { - @Override - public Integer get() { - return 4; - } - }; - } - - public class InnerClass { - public int value = 5; - } - - public static class StaticNestedClass { - public int value = 6; - - // Double-nest - public static Supplier getSupplier_static() { - return new Supplier() { - @Override - public Integer get() { - return 7; - } - }; - } - - public static class Double$NestedClass { - public int value = 8; - } - } - - public static class BaseClass { - public int value; - public BaseClass(int x) { - value = x; - } - } - - public static class SubClass extends BaseClass { - public SubClass(int x) { - super(x); - } - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect.java deleted file mode 100644 index 941fcff31d8e..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkPackageRedirect.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import android.hosttest.annotation.HostSideTestWholeClassKeep; - -@HostSideTestWholeClassKeep -public class TinyFrameworkPackageRedirect { - /** - * A method that uses "unsupported" class. HostStubGen will redirect them to the "supported" - * one (because of --package-redirect), so this test will pass. - */ - public static int foo(int value) { - // This method throws, so it's not callable as-is. But HostStubGen - // will rewrite it, it will actually work. - return new com.unsupported.UnsupportedClass(value).getValue(); - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.java deleted file mode 100644 index 707bc0ebb4db..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkRenamedClassCaller.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import android.hosttest.annotation.HostSideTestWholeClassKeep; - -@HostSideTestWholeClassKeep -public class TinyFrameworkRenamedClassCaller { - /** Calls the class that'll be renamed. */ - public static int foo(int value) { - // When TinyFrameworkToBeRenamed gets renamed, this callsite should be updated too, - // so this code should work as-is. - return new TinyFrameworkToBeRenamed(value).getValue(); - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.java deleted file mode 100644 index 8319ced6109a..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkToBeRenamed.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import android.hosttest.annotation.HostSideTestWholeClassKeep; - -/** - * This class will be renamed by the "rename" directive in the policy file. - */ -@HostSideTestWholeClassKeep -public class TinyFrameworkToBeRenamed { - private final int mValue; - - public TinyFrameworkToBeRenamed(int value) { - mValue = value; - } - - public int getValue() { - return mValue; - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/A.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/A.java deleted file mode 100644 index 6a52e4401b45..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/A.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.packagetest; - -public class A { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/B.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/B.java deleted file mode 100644 index 1374a288f7aa..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/B.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.packagetest; - -public class B { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/sub/A.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/sub/A.java deleted file mode 100644 index 361a7fd04842..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/sub/A.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.packagetest.sub; - -public class A { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/sub/B.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/sub/B.java deleted file mode 100644 index 716595a44243..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/packagetest/sub/B.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.packagetest.sub; - -public class B { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C1.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C1.java deleted file mode 100644 index 03c9e2a7b5bb..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C1.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class C1 { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C2.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C2.java deleted file mode 100644 index 3ca8f1f172bd..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C2.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class C2 extends C1 { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C3.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C3.java deleted file mode 100644 index a6c14f09b680..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/C3.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class C3 extends C2 { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/CA.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/CA.java deleted file mode 100644 index 2e353709fd1e..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/CA.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class CA { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/CB.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/CB.java deleted file mode 100644 index fe4cee64b2f9..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/CB.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class CB { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1.java deleted file mode 100644 index 12012fcdf6ca..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C1.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class Class_C1 extends C1 { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2.java deleted file mode 100644 index 8d48ee6f6858..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C2.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class Class_C2 extends C2 { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3.java deleted file mode 100644 index 6748430a8e6f..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_C3.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class Class_C3 extends C3 { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CA.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CA.java deleted file mode 100644 index 58aa5c3b74eb..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CA.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class Class_CA extends CA { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB.java deleted file mode 100644 index c1c3d624b126..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class Class_CB extends CB { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB_IA.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB_IA.java deleted file mode 100644 index 398b56975f1c..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_CB_IA.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class Class_CB_IA extends CB implements IA { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1.java deleted file mode 100644 index 44cbd8f9bffa..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class Class_I1 implements I1 { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA.java deleted file mode 100644 index 42355a34b65c..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I1_IA.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class Class_I1_IA implements I1, IA { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2.java deleted file mode 100644 index 09c80992e450..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I2.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class Class_I2 implements I2 { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3.java deleted file mode 100644 index 0806a478d756..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class Class_I3 implements I3 { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3_IA.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3_IA.java deleted file mode 100644 index eaa8528a3f31..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_I3_IA.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class Class_I3_IA implements I3, IA { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA.java deleted file mode 100644 index 778c5aaf27f0..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class Class_IA implements IA { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I1.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I1.java deleted file mode 100644 index 493f7c83c0f0..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I1.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class Class_IA_I1 implements IA, I1 { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I3.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I3.java deleted file mode 100644 index 2aa1de18b7f4..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IA_I3.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class Class_IA_I3 implements IA, I3 { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB.java deleted file mode 100644 index d9eae0934c42..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class Class_IB implements IB { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB_IA.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB_IA.java deleted file mode 100644 index 9ee42836ac9a..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_IB_IA.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class Class_IB_IA implements IB, IA { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_None.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_None.java deleted file mode 100644 index 50ec2cbc9c6e..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/Class_None.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public class Class_None { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I1.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I1.java deleted file mode 100644 index 3f3659644a80..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I1.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public interface I1 { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I2.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I2.java deleted file mode 100644 index 960060c8a036..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I2.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public interface I2 extends I1 { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I3.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I3.java deleted file mode 100644 index c678eaa789b0..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/I3.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public interface I3 extends I2 { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/IA.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/IA.java deleted file mode 100644 index 1cff484c3cd8..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/IA.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public interface IA { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/IB.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/IB.java deleted file mode 100644 index 84e7173c71b8..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/android/hoststubgen/test/tinyframework/subclasstest/IB.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework.subclasstest; - -public interface IB { -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/supported/UnsupportedClass.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/supported/UnsupportedClass.java deleted file mode 100644 index fa5866451e83..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/supported/UnsupportedClass.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.supported; - -import android.hosttest.annotation.HostSideTestWholeClassKeep; - -// Used for testing --package-redirect. -@HostSideTestWholeClassKeep -public class UnsupportedClass { - private final int mValue; - - public UnsupportedClass(int value) { - mValue = value; - } - - public int getValue() { - return mValue; - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/unsupported/UnsupportedClass.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/unsupported/UnsupportedClass.java deleted file mode 100644 index 92f41ac63cdb..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-framework/src/com/unsupported/UnsupportedClass.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.unsupported; - -import android.hosttest.annotation.HostSideTestWholeClassKeep; - -// Used for testing --package-redirect. -@HostSideTestWholeClassKeep -public class UnsupportedClass { - public UnsupportedClass(int value) { - throw new RuntimeException("This class is not supported"); - } - - public int getValue() { - throw new RuntimeException("This class is not supported"); - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotationsTest.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotationsTest.java deleted file mode 100644 index 1ae049371229..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkAnnotationsTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import static com.google.common.truth.Truth.assertThat; - -import static org.junit.Assert.assertThrows; - -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; - -public class TinyFrameworkAnnotationsTest { - @Rule - public ExpectedException thrown = ExpectedException.none(); - - @Test - public void testSimple() { - TinyFrameworkAnnotations tfc = new TinyFrameworkAnnotations(); - assertThat(tfc.addOne(1)).isEqualTo(2); - assertThat(tfc.keep).isEqualTo(1); - } - - @Test - public void testRemove() { - TinyFrameworkAnnotations tfc = new TinyFrameworkAnnotations(); - assertThrows(NoSuchMethodError.class, () -> tfc.toBeRemoved("abc")); - assertThrows(NoSuchFieldError.class, () -> tfc.remove = 1); - } - - @Test - public void testSubstitute() { - TinyFrameworkAnnotations tfc = new TinyFrameworkAnnotations(); - assertThat(tfc.addTwo(1)).isEqualTo(3); - } - - @Test - public void testSubstituteNative() { - TinyFrameworkAnnotations tfc = new TinyFrameworkAnnotations(); - assertThat(tfc.nativeAddThree(1)).isEqualTo(4); - } - - @Test - public void testUnsupportedMethod() { - TinyFrameworkAnnotations tfc = new TinyFrameworkAnnotations(); - - thrown.expect(RuntimeException.class); - thrown.expectMessage("not yet supported"); - tfc.unsupportedMethod(); - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassTest.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassTest.java deleted file mode 100644 index 68673dc2a5b8..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassTest.java +++ /dev/null @@ -1,321 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import static com.google.common.truth.Truth.assertThat; - -import static org.junit.Assert.assertThrows; - -import com.android.hoststubgen.test.tinyframework.R.Nested; - -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; - -import java.io.FileDescriptor; -import java.lang.reflect.Field; -import java.lang.reflect.Method; - -public class TinyFrameworkClassTest { - @Rule - public ExpectedException thrown = ExpectedException.none(); - - @Test - public void testSimple() { - TinyFrameworkForTextPolicy tfc = new TinyFrameworkForTextPolicy(); - assertThat(tfc.addOne(1)).isEqualTo(2); - assertThat(tfc.stub).isEqualTo(1); - } - - @Test - public void testRemove() { - TinyFrameworkForTextPolicy tfc = new TinyFrameworkForTextPolicy(); - assertThrows(NoSuchMethodError.class, () -> tfc.toBeRemoved("abc")); - assertThrows(NoSuchFieldError.class, () -> tfc.remove = 1); - } - - @Test - public void testIgnore() { - TinyFrameworkForTextPolicy tfc = new TinyFrameworkForTextPolicy(); - tfc.toBeIgnoredV(); - assertThat(tfc.toBeIgnoredZ()).isEqualTo(false); - assertThat(tfc.toBeIgnoredB()).isEqualTo(0); - assertThat(tfc.toBeIgnoredC()).isEqualTo(0); - assertThat(tfc.toBeIgnoredS()).isEqualTo(0); - assertThat(tfc.toBeIgnoredI()).isEqualTo(0); - assertThat(tfc.toBeIgnoredF()).isEqualTo(0); - assertThat(tfc.toBeIgnoredD()).isEqualTo(0); - assertThat(tfc.toBeIgnoredObj()).isEqualTo(null); - } - - @Test - public void testSubstitute() { - TinyFrameworkForTextPolicy tfc = new TinyFrameworkForTextPolicy(); - assertThat(tfc.addTwo(1)).isEqualTo(3); - } - - @Test - public void testSubstituteNative() { - TinyFrameworkForTextPolicy tfc = new TinyFrameworkForTextPolicy(); - assertThat(tfc.nativeAddThree(1)).isEqualTo(4); - } - - @Test - public void testUnsupportedMethod() { - TinyFrameworkForTextPolicy tfc = new TinyFrameworkForTextPolicy(); - - thrown.expect(RuntimeException.class); - thrown.expectMessage("not yet supported"); - tfc.unsupportedMethod(); - } - - @Test - public void testLambda1() { - assertThat(new TinyFrameworkLambdas().mSupplier.get()).isEqualTo(1); - } - - @Test - public void testLambda2() { - assertThat(TinyFrameworkLambdas.sSupplier.get()).isEqualTo(2); - } - - @Test - public void testLambda3() { - assertThat(new TinyFrameworkLambdas().getSupplier().get()).isEqualTo(3); - } - - @Test - public void testLambda4() { - assertThat(TinyFrameworkLambdas.getSupplier_static().get()).isEqualTo(4); - } - - @Test - public void testLambda5() { - assertThat(new TinyFrameworkLambdas.Nested().mSupplier.get()).isEqualTo(5); - } - - @Test - public void testLambda6() { - assertThat(TinyFrameworkLambdas.Nested.sSupplier.get()).isEqualTo(6); - } - - @Test - public void testLambda7() { - assertThat(new TinyFrameworkLambdas.Nested().getSupplier().get()).isEqualTo(7); - } - - @Test - public void testLambda8() { - assertThat(TinyFrameworkLambdas.Nested.getSupplier_static().get()).isEqualTo(8); - } - - @Test - public void testNativeSubstitutionClass() { - assertThat(TinyFrameworkNative.nativeAddTwo(3)).isEqualTo(5); - } - - @Test - public void testNativeSubstitutionLong() { - assertThat(TinyFrameworkNative.nativeLongPlus(1L, 2L)).isEqualTo(3L); - } - - @Test - public void testNativeSubstitutionByte() { - assertThat(TinyFrameworkNative.nativeBytePlus((byte) 3, (byte) 4)).isEqualTo(7); - } - - @Test - public void testNativeSubstitutionClass_nonStatic() { - TinyFrameworkNative instance = new TinyFrameworkNative(); - instance.setValue(5); - assertThat(instance.nativeNonStaticAddToValue(3)).isEqualTo(8); - } - - @Test - public void testSubstituteNativeWithThrow() { - thrown.expect(RuntimeException.class); - thrown.expectMessage("not yet supported"); - - TinyFrameworkNative.nativeStillNotSupported(); - } - - @Test - public void testSubstituteNativeWithKeep() { - // We don't want to complicate the test by setting up JNI, - // so to test out whether the native method is preserved, we - // check whether calling it will throw UnsatisfiedLinkError, - // which would only happen on native methods. - thrown.expect(UnsatisfiedLinkError.class); - - TinyFrameworkNative.nativeStillKeep(); - } - - @Test - public void testNotNativeRedirect() { - TinyFrameworkNative.notNativeStaticRedirected(); - new TinyFrameworkNative().notNativeRedirected(); - } - - @Test - public void testExitLog() { - thrown.expect(RuntimeException.class); - thrown.expectMessage("Outer exception"); - - TinyFrameworkExceptionTester.testException(); - } - - @Test - public void testClassLoadHook() { - assertThat(TinyFrameworkClassWithInitializerStub.sInitialized).isTrue(); - - // Having this line before assertThat() will ensure these class are already loaded. - var classes = new Class[]{ - TinyFrameworkClassWithInitializerStub.class, - TinyFrameworkAnnotations.class, - TinyFrameworkForTextPolicy.class, - }; - - // The following classes have a class load hook, so they should be registered. - assertThat(TinyFrameworkClassLoadHook.sLoadedClasses) - .containsAnyIn(classes); - - // This class doesn't have a class load hook, so shouldn't be included. - assertThat(TinyFrameworkClassLoadHook.sLoadedClasses) - .doesNotContain(TinyFrameworkNestedClasses.class); - } - - @Test - public void testStaticInitializer_Default() { - assertThat(TinyFrameworkClassWithInitializerDefault.sInitialized).isFalse(); - assertThat(TinyFrameworkClassWithInitializerDefault.sObject).isNull(); - } - - @Test - public void testStaticInitializer_Stub() { - assertThat(TinyFrameworkClassWithInitializerStub.sInitialized).isTrue(); - assertThat(TinyFrameworkClassWithInitializerStub.sObject).isNotNull(); - } - - /** - * Test to try accessing JDK private fields using reflections + setAccessible(true), - * which is now disallowed due to Java Modules, unless you run the javacommand with. - * --add-opens=java.base/java.io=ALL-UNNAMED - * - * You can try it from the command line, like: - * $ JAVA_OPTS="--add-opens=java.base/java.io=ALL-UNNAMED" ./run-test-manually.sh - * - * @throws Exception - */ - @Test - public void testFileDescriptor() throws Exception { - var fd = FileDescriptor.out; - - // Get the FD value directly from the private field. - // This is now prohibited due to Java Modules. - // It throws: - // java.lang.reflect.InaccessibleObjectException: Unable to make field private int java.io.FileDescriptor.fd accessible: module java.base does not "opens java.io" to unnamed module @3bb50eaa - - thrown.expect(java.lang.reflect.InaccessibleObjectException.class); - - // Access the private field. - final Field f = FileDescriptor.class.getDeclaredField("fd"); - final Method m = FileDescriptor.class.getDeclaredMethod("set", int.class); - f.setAccessible(true); - m.setAccessible(true); - - assertThat(f.get(fd)).isEqualTo(1); - - // Set - f.set(fd, 2); - assertThat(f.get(fd)).isEqualTo(2); - - // Call the package private method, set(int). - m.invoke(fd, 0); - assertThat(f.get(fd)).isEqualTo(0); - } - - @Test - public void testPackageRedirect() throws Exception { - assertThat(TinyFrameworkPackageRedirect.foo(1)).isEqualTo(1); - } - - @Test - public void testEnumSimple() throws Exception { - assertThat(TinyFrameworkEnumSimple.CAT.ordinal()).isEqualTo(0); - assertThat(TinyFrameworkEnumSimple.CAT.name()).isEqualTo("CAT"); - - assertThat(TinyFrameworkEnumSimple.DOG.ordinal()).isEqualTo(1); - assertThat(TinyFrameworkEnumSimple.DOG.name()).isEqualTo("DOG"); - - assertThat(TinyFrameworkEnumSimple.valueOf("DOG").ordinal()).isEqualTo(1); - - assertThat(TinyFrameworkEnumSimple.values()).isEqualTo( - new TinyFrameworkEnumSimple[]{ - TinyFrameworkEnumSimple.CAT, - TinyFrameworkEnumSimple.DOG, - } - ); - } - - @Test - public void testEnumComplex() throws Exception { - assertThat(TinyFrameworkEnumComplex.RED.ordinal()).isEqualTo(0); - assertThat(TinyFrameworkEnumComplex.RED.name()).isEqualTo("RED"); - - assertThat(TinyFrameworkEnumComplex.RED.getShortName()).isEqualTo("R"); - - assertThat(TinyFrameworkEnumComplex.GREEN.ordinal()).isEqualTo(1); - assertThat(TinyFrameworkEnumComplex.GREEN.name()).isEqualTo("GREEN"); - - assertThat(TinyFrameworkEnumComplex.valueOf("BLUE").ordinal()).isEqualTo(2); - - assertThat(TinyFrameworkEnumComplex.values()).isEqualTo( - new TinyFrameworkEnumComplex[]{ - TinyFrameworkEnumComplex.RED, - TinyFrameworkEnumComplex.GREEN, - TinyFrameworkEnumComplex.BLUE, - } - ); - } - - @Test - public void testAidlHeuristics() { - assertThat(IPretendingAidl.Stub.addOne(1)).isEqualTo(2); - assertThat(IPretendingAidl.Stub.Proxy.addTwo(1)).isEqualTo(3); - } - - @Test - public void testRFileHeuristics() { - assertThat(Nested.ARRAY.length).isEqualTo(1); - } - - @Test - public void testTypeRename() { - assertThat(TinyFrameworkRenamedClassCaller.foo(1)).isEqualTo(1); - } - - @Test - public void testMethodCallReplaceNonStatic() throws Exception { - assertThat(TinyFrameworkMethodCallReplace.nonStaticMethodCallReplaceTester()) - .isEqualTo(true); - } - - @Test - public void testMethodCallReplaceStatic() throws Exception { - assertThat(TinyFrameworkMethodCallReplace.staticMethodCallReplaceTester()) - .isEqualTo(3); - } -} diff --git a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotationsTest.java b/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotationsTest.java deleted file mode 100644 index 1816b383f6f7..000000000000 --- a/tools/hoststubgen/hoststubgen/test-tiny-framework/tiny-test/src/com/android/hoststubgen/test/tinyframework/TinyFrameworkClassWideAnnotationsTest.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.test.tinyframework; - -import static com.google.common.truth.Truth.assertThat; - -import static org.junit.Assert.assertThrows; - -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; - -public class TinyFrameworkClassWideAnnotationsTest { - @Rule - public ExpectedException thrown = ExpectedException.none(); - - @Test - public void testSimple() { - var tfc = new TinyFrameworkClassWideAnnotations(); - assertThat(tfc.addOne(1)).isEqualTo(2); - assertThat(tfc.keep).isEqualTo(1); - } - - @Test - public void testRemove() { - var tfc = new TinyFrameworkClassWideAnnotations(); - assertThrows(NoSuchMethodError.class, () -> tfc.toBeRemoved("abc")); - assertThrows(NoSuchFieldError.class, () -> tfc.remove = 1); - } - - @Test - public void testSubstitute() { - var tfc = new TinyFrameworkClassWideAnnotations(); - assertThat(tfc.addTwo(1)).isEqualTo(3); - } - - @Test - public void testUnsupportedMethod() { - var tfc = new TinyFrameworkClassWideAnnotations(); - - thrown.expect(RuntimeException.class); - thrown.expectMessage("not yet supported"); - tfc.unsupportedMethod(); - } - - @Test - public void testMethodCallBeforeSuperCall() { - assertThat(new TinyFrameworkNestedClasses.SubClass(3).value).isEqualTo(3); - } - - @Test - public void testNestedClass1() { - assertThat(new TinyFrameworkNestedClasses().mSupplier.get()).isEqualTo(1); - } - - @Test - public void testNestedClass2() { - assertThat(TinyFrameworkNestedClasses.sSupplier.get()).isEqualTo(2); - } - - @Test - public void testNestedClass3() { - assertThat(new TinyFrameworkNestedClasses().getSupplier().get()).isEqualTo(3); - } - - @Test - public void testNestedClass4() { - assertThat(TinyFrameworkNestedClasses.getSupplier_static().get()).isEqualTo(4); - } - - @Test - public void testNestedClass5() { - assertThat((new TinyFrameworkNestedClasses()).new InnerClass().value).isEqualTo(5); - } - - @Test - public void testNestedClass6() { - assertThat(new TinyFrameworkNestedClasses.StaticNestedClass().value).isEqualTo(6); - } - - @Test - public void testNestedClass7() { - assertThat(TinyFrameworkNestedClasses.StaticNestedClass.getSupplier_static().get()) - .isEqualTo(7); - } - - @Test - public void testNestedClass8() { - assertThat(new TinyFrameworkNestedClasses.StaticNestedClass.Double$NestedClass().value) - .isEqualTo(8); - } - - @Test - public void testIgnoreAnnotation() { - // The actual method will throw, but because of @Ignore, it'll return 0. - assertThat(new TinyFrameworkAnnotations().toBeIgnored()) - .isEqualTo(0); - } -} diff --git a/tools/hoststubgen/hoststubgen/test/com/android/hoststubgen/asm/AsmUtilsTest.kt b/tools/hoststubgen/hoststubgen/test/com/android/hoststubgen/asm/AsmUtilsTest.kt deleted file mode 100644 index 5b2795c4cff2..000000000000 --- a/tools/hoststubgen/hoststubgen/test/com/android/hoststubgen/asm/AsmUtilsTest.kt +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.asm - -import com.google.common.truth.Truth.assertThat -import org.junit.Test -import org.objectweb.asm.Opcodes.ACC_PRIVATE -import org.objectweb.asm.Opcodes.ACC_PROTECTED -import org.objectweb.asm.Opcodes.ACC_PUBLIC -import org.objectweb.asm.Opcodes.ACC_STATIC - -class AsmUtilsTest { - @Test - fun testVisibility() { - fun test(access: Int, expected: Visibility) { - assertThat(Visibility.fromAccess(access)).isEqualTo(expected) - } - - test(ACC_PUBLIC or ACC_STATIC, Visibility.PUBLIC) - test(ACC_PRIVATE or ACC_STATIC, Visibility.PRIVATE) - test(ACC_PROTECTED or ACC_STATIC, Visibility.PROTECTED) - test(ACC_STATIC, Visibility.PACKAGE_PRIVATE) - } -} \ No newline at end of file diff --git a/tools/hoststubgen/hoststubgen/test/com/android/hoststubgen/utils/ClassFilterTest.kt b/tools/hoststubgen/hoststubgen/test/com/android/hoststubgen/utils/ClassFilterTest.kt deleted file mode 100644 index d4e75d43a54a..000000000000 --- a/tools/hoststubgen/hoststubgen/test/com/android/hoststubgen/utils/ClassFilterTest.kt +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.utils - -import com.android.hoststubgen.ParseException -import com.google.common.truth.Truth.assertThat -import org.junit.Assert.fail -import org.junit.Test - -class ClassFilterTest { - @Test - fun testDefaultTrue() { - val f = ClassFilter.newNullFilter(true) - assertThat(f.matches("a/b/c")).isEqualTo(true) - } - - @Test - fun testDefaultFalse() { - val f = ClassFilter.newNullFilter(false) - assertThat(f.matches("a/b/c")).isEqualTo(false) - } - - @Test - fun testComplex1() { - val f = ClassFilter.buildFromString(""" - # ** this is a comment ** - a.b.c # allow - !a.b.d # disallow - * # allow all - """.trimIndent(), false, "X") - assertThat(f.getCacheSizeForTest()).isEqualTo(0) - - assertThat(f.matches("a/b/c")).isEqualTo(true) - assertThat(f.getCacheSizeForTest()).isEqualTo(1) - - assertThat(f.matches("a/b/d")).isEqualTo(false) - assertThat(f.matches("x")).isEqualTo(true) - - assertThat(f.getCacheSizeForTest()).isEqualTo(3) - - // Make sure the cache is working - assertThat(f.matches("x")).isEqualTo(true) - } - - @Test - fun testComplex2() { - val f = ClassFilter.buildFromString(""" - a.b.c # allow - !a.* # disallow everything else in package "a". - !d.e.f # disallow d.e.f. - - # everything else is allowed by default - """.trimIndent(), true, "X") - assertThat(f.matches("a/b/c")).isEqualTo(true) - assertThat(f.matches("a/x")).isEqualTo(false) - assertThat(f.matches("d/e/f")).isEqualTo(false) - assertThat(f.matches("d/e/f/g")).isEqualTo(true) - assertThat(f.matches("x")).isEqualTo(true) - - assertThat(f.matches("ab/x")).isEqualTo(true) - } - - @Test - fun testNestedClass() { - val f = ClassFilter.buildFromString("a.b.c\nm.n.o\$p\n", false, "X") - assertThat(f.matches("a/b/c")).isEqualTo(true) - assertThat(f.matches("a/b/c\$d")).isEqualTo(true) - assertThat(f.matches("a/b/c\$d\$e")).isEqualTo(true) - assertThat(f.matches("m/n/o")).isEqualTo(false) - assertThat(f.matches("m/n/o\$p")).isEqualTo(true) - assertThat(f.matches("m/n/o\$p\$r")).isEqualTo(true) - assertThat(f.matches("m/n/o\$p\$r\$")).isEqualTo(true) - } - - @Test - fun testBadFilter1() { - try { - ClassFilter.buildFromString(""" - a* - """.trimIndent(), true, "FILENAME") - fail("ParseException didn't happen") - } catch (e: ParseException) { - assertThat(e.message).contains("Wildcard") - assertThat(e.message).contains("FILENAME") - assertThat(e.message).contains("line 1") - } - } - - @Test - fun testSuffix() { - val f = ClassFilter.buildFromString(""" - *.Abc # allow - !* # Disallow by default - """.trimIndent(), true, "X") - assertThat(f.matches("a/b/c")).isEqualTo(false) - assertThat(f.matches("a/Abc")).isEqualTo(true) - assertThat(f.matches("a/b/c/Abc")).isEqualTo(true) - assertThat(f.matches("a/b/c/Abc\$Nested")).isEqualTo(true) - - assertThat(f.matches("a/XyzAbc")).isEqualTo(false) - } -} \ No newline at end of file diff --git a/tools/hoststubgen/hoststubgen/test/com/android/hoststubgen/utils/TrieTest.kt b/tools/hoststubgen/hoststubgen/test/com/android/hoststubgen/utils/TrieTest.kt deleted file mode 100644 index 081d03909926..000000000000 --- a/tools/hoststubgen/hoststubgen/test/com/android/hoststubgen/utils/TrieTest.kt +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2024 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.utils - -import org.junit.Assert.assertEquals -import org.junit.Assert.assertNull -import org.junit.Test - -class TrieTest { - - private class TestTrie : Trie() { - override fun splitToComponents(key: String): Iterator { - return key.toCharArray().iterator() - } - } - - @Test - fun testPrefixTree() { - val trie = TestTrie() - trie["ab"] = 1 - trie["abc"] = 2 - trie["ab123"] = 3 - assertNull(trie["a"]) - assertNull(trie["x"]) - assertNull(trie["a1"]) - assertEquals(1, trie["ab"]) - assertEquals(2, trie["abc"]) - assertEquals(2, trie["abcd"]) - assertEquals(1, trie["ab1"]) - assertEquals(1, trie["ab12"]) - assertEquals(3, trie["ab123"]) - assertEquals(1, trie["ab@"]) - } -} diff --git a/tools/hoststubgen/hoststubgen/test/com/android/hoststubgen/visitors/HelperTest.kt b/tools/hoststubgen/hoststubgen/test/com/android/hoststubgen/visitors/HelperTest.kt deleted file mode 100644 index 75e2536a98fa..000000000000 --- a/tools/hoststubgen/hoststubgen/test/com/android/hoststubgen/visitors/HelperTest.kt +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.android.hoststubgen.visitors - -import com.android.hoststubgen.HostStubGenErrors -import com.android.hoststubgen.asm.ClassNodes -import com.google.common.truth.Truth.assertThat -import org.junit.Test -import org.objectweb.asm.Opcodes -import org.objectweb.asm.tree.ClassNode -import org.objectweb.asm.tree.MethodNode - -class HelperTest { - @Test - fun testCheckSubstitutionMethodCompatibility() { - val errors = object : HostStubGenErrors() { - override fun onErrorFound(message: String) { - // Don't throw - } - } - - val cn = ClassNode().apply { - name = "ClassName" - methods = ArrayList() - } - - val descriptor = "()V" - - val staticPublic = MethodNode().apply { - name = "staticPublic" - access = Opcodes.ACC_STATIC or Opcodes.ACC_PUBLIC - desc = descriptor - cn.methods.add(this) - } - - val staticPrivate = MethodNode().apply { - name = "staticPrivate" - access = Opcodes.ACC_STATIC or Opcodes.ACC_PRIVATE - desc = descriptor - cn.methods.add(this) - } - - val nonStaticPublic = MethodNode().apply { - name = "nonStaticPublic" - access = Opcodes.ACC_PUBLIC - desc = descriptor - cn.methods.add(this) - } - - val nonStaticPProtected = MethodNode().apply { - name = "nonStaticPProtected" - access = 0 - desc = descriptor - cn.methods.add(this) - } - - val classes = ClassNodes().apply { - addClass(cn) - } - - fun check(from: MethodNode?, to: MethodNode?, expected: Int) { - assertThat(checkSubstitutionMethodCompatibility( - classes, - cn.name, - (from?.name ?: "**nonexistentmethodname**"), - (to?.name ?: "**nonexistentmethodname**"), - descriptor, - errors, - )).isEqualTo(expected) - } - - check(staticPublic, staticPublic, Opcodes.ACC_PUBLIC or Opcodes.ACC_STATIC) - check(staticPrivate, staticPrivate, Opcodes.ACC_PRIVATE or Opcodes.ACC_STATIC) - check(nonStaticPublic, nonStaticPublic, Opcodes.ACC_PUBLIC) - check(nonStaticPProtected, nonStaticPProtected, 0) - - check(staticPublic, null, NOT_COMPATIBLE) - check(null, staticPublic, NOT_COMPATIBLE) - - check(staticPublic, nonStaticPublic, NOT_COMPATIBLE) - check(nonStaticPublic, staticPublic, NOT_COMPATIBLE) - - check(staticPublic, staticPrivate, Opcodes.ACC_PUBLIC or Opcodes.ACC_STATIC) - check(staticPrivate, staticPublic, Opcodes.ACC_PRIVATE or Opcodes.ACC_STATIC) - - check(nonStaticPublic, nonStaticPProtected, Opcodes.ACC_PUBLIC) - check(nonStaticPProtected, nonStaticPublic, 0) - } -} \ No newline at end of file diff --git a/tools/hoststubgen/scripts/Android.bp b/tools/hoststubgen/scripts/Android.bp deleted file mode 100644 index b1ba07ec540d..000000000000 --- a/tools/hoststubgen/scripts/Android.bp +++ /dev/null @@ -1,20 +0,0 @@ -package { - // See: http://go/android-license-faq - // A large-scale-change added 'default_applicable_licenses' to import - // all of the 'license_kinds' from "frameworks_base_license" - // to get the below license kinds: - // SPDX-license-identifier-Apache-2.0 - default_applicable_licenses: ["frameworks_base_license"], -} - -sh_binary_host { - name: "dump-jar", - src: "dump-jar", - visibility: ["//visibility:public"], -} - -genrule_defaults { - name: "hoststubgen-jar-dump-defaults", - tools: ["dump-jar"], - cmd: "$(location dump-jar) -s -o $(out) $(in)", -} diff --git a/tools/hoststubgen/scripts/build-framework-hostside-jars-without-genrules.sh b/tools/hoststubgen/scripts/build-framework-hostside-jars-without-genrules.sh deleted file mode 100755 index c3605a9ffaa5..000000000000 --- a/tools/hoststubgen/scripts/build-framework-hostside-jars-without-genrules.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# Copyright (C) 2023 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# Script to build hoststubgen and run it directly (without using the build rules) -# on framework-all.jar. - - -echo "THIS SCRIPT IS BROKEN DUE TO CHANGES TO FILE PATHS TO DEPENDENT FILES. FIX IT WHEN YOU NEED TO USE IT." 1>&2 - -exit 99 - - -source "${0%/*}"/../common.sh - -out=out - -mkdir -p $out - -# Build the tool and target jar. -run m hoststubgen framework-all - -base_args=( - @../hoststubgen/hoststubgen-standard-options.txt - - --in-jar $ANDROID_BUILD_TOP/out/soong/.intermediates/frameworks/base/framework-all/android_common/combined/framework-all.jar - --policy-override-file ../hoststubgen/framework-policy-override.txt "${@}" - - # This file will contain all classes as an annotation file, with "keep all" policy. - --gen-keep-all-file $out/framework-all-keep-all-policy.txt - - # This file will contains dump of all classes in the input jar. - --gen-input-dump-file $out/framework-all-dump.txt -) - -do_it() { - local out_file_stem="$1" - shift - local extra_args=("${@}") - - run hoststubgen \ - "${base_args[@]}" \ - "${extra_args[@]}" \ - --out-stub-jar ${out_file_stem}_stub.jar \ - --out-impl-jar ${out_file_stem}_impl.jar \ - $HOSTSTUBGEN_OPTS - - # Extract the jar files, so we can look into them. - run extract ${out_file_stem}_*.jar -} - -#----------------------------------------------------------------------------- -# framework-all, with all hidden APIs. -#----------------------------------------------------------------------------- - -# No extra args. -do_it $out/framework-all_host - -#----------------------------------------------------------------------------- -# framework-test-api, only public/system/test-APIs in the stub. -#----------------------------------------------------------------------------- - -do_it $out/framework-test-api_host \ - --intersect-stub-jar $SOONG_INT/frameworks/base/api/android_test_stubs_current/android_common/combined/*.jar diff --git a/tools/hoststubgen/scripts/dump-jar b/tools/hoststubgen/scripts/dump-jar deleted file mode 100755 index 87652451359d..000000000000 --- a/tools/hoststubgen/scripts/dump-jar +++ /dev/null @@ -1,159 +0,0 @@ -#!/bin/bash -# Copyright (C) 2023 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -e - - -help() { - cat <<'EOF' - - dump-jar: Dump java classes in jar files - - Usage: - dump-jar [-v] CLASS-FILE [...] - - Dump a *.class file - - dump-jar [-v] [-s] [-o OUTPUT-FILENAME] JAR-FILE[: class internal name regex] [...] - - Dump a jar file. - - If a filename contains a ':', then the following part - will be used to filter files in the jar file that matches against class internal names. - - For example, "file.jar:/MyClass$" will only dump "MyClass" in file.jar. - - Options: - -v: Enable verbose output. - - -s: Simple output mode, used to check HostStubGen output jars. - - -o: Write the output to a specified file. -EOF -} - -# Parse the options. - -verbose=0 -simple=0 -output="" -while getopts "hvso:" opt; do -case "$opt" in - h) - help - exit 0 - ;; - v) - verbose=1 - ;; - s) - simple=1 - ;; - o) - output="$OPTARG" - ;; - '?') - help - exit 1 - ;; -esac -done -shift $(($OPTIND - 1)) - -JAVAP_OPTS="${JAVAP_OPTS:--v -p -s -sysinfo -constants}" - -if (( $simple )) ; then - JAVAP_OPTS="-p -c -v" -fi - -# Convert the output for `-s` as needed. -filter_output() { - if (( $simple )) ; then - # For "simple output" mode, - # - Normalize the constant numbers (replace with "#x") - # - Normalize byte code offsets and other similar numbers. (e.g. "0:" -> "x:") - # - Remove the constant pool - # - Remove the line number table - # - Some other transient lines - # - Sometimes the javap shows mysterious warnings, so remove them too. - # - # `/PATTERN-1/,/PATTERN-1/{//!d}` is a trick to delete lines between two patterns, without - # the start and the end lines. - sed -e 's/#[0-9][0-9]*/#x/g' \ - -e 's/^\( *\)[0-9][0-9]*:/\1x:/' \ - -e '/^Constant pool:/,/^[^ ]/{//!d}' \ - -e '/^ *line *[0-9][0-9]*: *[0-9][0-9]*$/d' \ - -e '/SHA-256 checksum/d' \ - -e '/Last modified/d' \ - -e '/^Classfile jar/d' \ - -e '/\[warning\]/d' - else - cat # Print as-is. - fi -} - -# Write to the output file (specified with -o) as needed. -write_to_out() { - if [[ -n "$output" ]] ; then - cat >"$output" - echo "Wrote output to $output" 1>&2 - else - cat # print to stdout - fi -} - -# Read jar file names and remove the .class suffix. -# Also remove non-class files. -to_internal_names() { - sed -ne 's/\.class$//p' -} - -for file in "${@}"; do - - # *.class? - if echo "$file" | grep -qE '\.class$' ; then - echo "# Class: $file" 1>&2 - javap $dump_code_opt $JAVAP_OPTS $file - - # *.jar? - elif echo "$file" | grep -qE '\.jar(:.*)?$' ; then - # Take the regex. Remove everything up to : in $file - regex="" - if [[ "$file" =~ : ]] ; then - regex="${file##*:}" - fi - - # Remove everything after ':', inclusively, in $file. - file="${file%:*}" - - # Print the filename and the regex. - if ! (( $simple )) ; then - echo -n "# Jar: $file" - if [[ "$regex" != "" ]] ;then - echo -n " (regex: $regex)" - fi - echo - fi - - jar tf "$file" | sort | to_internal_names | grep -- "$regex" | while read -r class ; do - echo "## Class: $class.class" - javap $dump_code_opt $JAVAP_OPTS -cp "$file" "${class}" - done - - else - echo "Unknown file type: $file" 1>&2 - exit 1 - fi -done | filter_output | write_to_out -- cgit v1.2.3-59-g8ed1b