summaryrefslogtreecommitdiff
path: root/tests/Codegen/src/com/android/codegentest/SampleDataClass.java
AgeCommit message (Collapse)Author
2021-03-23Fix IBinder parcellingEugene Susla
Fixes: 183547536 Test: . frameworks/base/tests/Codegen/runTest.sh Change-Id: Ifffac8c560a8e2e9e0543d523738ad529af633e9
2020-11-04Disregard annotation params for stale dataclass detectionEugene Susla
Annotation processor seens annotation args with constants already inlined, making it challenging to compare to the souce-generated metadata that contains initial expressions. For now just ignoring args for all non-DataClass annotations to prevent false positives Test: . frameworks/base/tests/Codegen/runTest.sh Exempt-From-Owner-Approval: changing metadata on multiple files Change-Id: I640816ae0f20f36b1b828bc2161f53788c4a4dae
2020-11-03Fix signature generation for nested annotaionsEugene Susla
Test: . frameworks/base/tests/Codegen/runTest.sh Change-Id: I240e1ab757c2d6efd6afbcf33b6a292eed4ea398
2020-10-27Relax literal initializer requirement when codegen detects constantsEugene Susla
Test: . frameworks/base/tests/Codegen/runTest.sh Fixes: 158195639 Change-Id: I93bdea18f348aeca896a9fd619bef2d65704bb41
2020-10-05Fix codegen for wildcards in type argsEugene Susla
Test: tests/Codegen/runTest.sh Change-Id: I4b1f3c9d07ab2ddfa644983898ada309ff42b23e
2020-02-25Generate @NonNull setter args and @MaySetToNull to opt outEugene Susla
Bug: 143653080 Test: source /usr/local/google/home/eugenesusla/android2/master/frameworks/base/tests/Codegen/runTest.sh Change-Id: Iba8da34c91fd09e266429ab131add1d53449506b
2019-11-18Add @NonNull annotation to Builder.addXXX argsEugene Susla
API guidelines is for each non-primitive arg to have a nullablility annotation. Since it's very rate for collections to permit null values, just assume collections only accept @NunNull emenents for now. Fixes: 144725154 Test: . frameworks/base/tests/Codegen/runTest.sh Change-Id: I333327490bd8eb9bb031f062c80283bd405173af
2019-11-05Fix codegen ArrayMap fieldsEugene Susla
Fixes: 143112074 Test: . frameworks/base/tests/Codegen/runTest.sh Change-Id: Iec0fa89a91955f8b4e4b5b8d4dd9d7f0b30c608f
2019-11-01[codegen] Fix generation for files without end markersEugene Susla
This fixes a bug where cedegen fails for files that were generated before end of generated code section markers were introduced. Test: . master/frameworks/base/tests/Codegen/runTest.sh Change-Id: Ia68e8124fcbdeeb2052067ba8731e68e42007529
2019-11-01[codegen] Support nested classesEugene Susla
Adds support for arbitrarily-nested @DataClasses Only static ones are supported for now See FileInfo for the main implementation piece Fixes: 139833958 Test: . frameworks/base/tests/Codegen/runTest.sh Change-Id: I31cd16969788c47003a7a15a3573a4bf623ab960
2019-10-16Add @NonNull to some generated methods' argsEugene Susla
Test: . frameworks/base/tests/Codegen/runTest.sh Fixes: 142783758 Change-Id: I7303d420efd59389c324b3e399fcb3532b5d6c37
2019-10-11Few minor codegen fixesEugene Susla
- (partially) fix annotations with array arg trigger stale false positive - support boxed primitives parcelling - support excluding generated code from Intellij auto-formatting Fixes: 142086873, 142149372 Bug: 142132310 Test: . frameworks/base/tests/Codegen/runTest.sh + manually test auto-formatting Change-Id: Ib6a44dee59f840cc11066aa9ff3517d957d1d010
2019-10-08Fix some stale dataclass detector false positivesEugene Susla
Test: . frameworks/base/tests/Codegen/runTest.sh Change-Id: I562bb4f238bdb28af49804e77c956e41a7bd198d
2019-10-04Add inheritance support for parcelable dataclassesEugene Susla
We don't want to recommend this, but some legacy framework classes use inheritance, and it's easy enough to support Fixes: 142081378 Test: . frameworks/base/tests/Codegen/runTest.sh Change-Id: Ifb7f34abf1dfb871ac01b9a9a38dfee144e5f49a
2019-10-03Fix a few corner-cases with parcelling SparseArrays and MapsEugene Susla
Also added a test for some similar parcelling corner cases Test: . frameworks/base/tests/Codegen/runTest.sh Fixes: 141877655 Change-Id: Iad5c3b0a8489206754f6ebe6acb8b56ba9ca174a
2019-10-01Fix codegen adding random /Eugene Susla
Fixes: 141934335 Test: . frameworks/base/tests/Codegen/runTest.sh Change-Id: Ic72d141ed58e332079e7edb7134e02d1447ff643
2019-09-11Fix codegen not accepting relative pathsEugene Susla
Fixes: 140886378 Test: codegen tests/Codegen/src/com/android/codegentest/SampleDataClass.java; ./frameworks/base/tests/Codegen/runTest.sh Change-Id: Ie2b5c55f35ec7865bf34cf9e99ef7751eb5f8d98
2019-08-06Update codegen to match javaparser updateEugene Susla
Test: . $ANDROID_BUILD_TOP/frameworks/base/tests/Codegen/runTest.sh Change-Id: I3e961a9cee5c71bd2195328dcb53dabd61255aa6
2019-08-05Addresses further review comments from ag/8000041Eugene Susla
Including: - An API to opt out of Int/StringDefs generation on per-field basis - A way to customize Builder - Non-optional fields are passed in Builder constructor - Various adjustments to SampleDataclass examples, as requested Test: . $ANDROID_BUILD_TOP/frameworks/base/tests/Codegen/runTest.sh Change-Id: I32d2eec52f05d505ff07779d923e4793d3036579
2019-07-29Auto-build/update codegenEugene Susla
Test: 1. Manually enter version/presence of build artifact, and ensure `codegen FILENAME` still works 2. run codegen again without altering version, ensure no build triggered Change-Id: I6f1dba0a476077c708bbea8ef558445107e5ad97
2019-07-17Codegen for parcelable/dataclass boilerplateEugene Susla
This is the initial implementation of the `codegen` cli utility for in-place java boilerplate generation See DataClass and SampleDataClass for documentation/guide/examples. See tools/codegen/ for implementation and tests/Codegen/ for tests. Bug: 64221737 Test: . frameworks/base/tests/Codegen/runTest.sh Change-Id: I75177cb770f1beabc87dbae9e77ce4b93ca08e7f