summaryrefslogtreecommitdiff
path: root/tests/Codegen/src/com/android/codegentest/SampleDataClass.java
Commit message (Collapse)AuthorAgeFilesLines
* Fix IBinder parcellingEugene Susla2021-03-231-10/+120
| | | | | | | Fixes: 183547536 Test: . frameworks/base/tests/Codegen/runTest.sh Change-Id: Ifffac8c560a8e2e9e0543d523738ad529af633e9
* Disregard annotation params for stale dataclass detectionEugene Susla2020-11-041-4/+4
| | | | | | | | | | | | 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
* Fix signature generation for nested annotaionsEugene Susla2020-11-031-3/+3
| | | | | Test: . frameworks/base/tests/Codegen/runTest.sh Change-Id: I240e1ab757c2d6efd6afbcf33b6a292eed4ea398
* Relax literal initializer requirement when codegen detects constantsEugene Susla2020-10-271-42/+44
| | | | | | Test: . frameworks/base/tests/Codegen/runTest.sh Fixes: 158195639 Change-Id: I93bdea18f348aeca896a9fd619bef2d65704bb41
* Fix codegen for wildcards in type argsEugene Susla2020-10-051-3/+3
| | | | | Test: tests/Codegen/runTest.sh Change-Id: I4b1f3c9d07ab2ddfa644983898ada309ff42b23e
* Generate @NonNull setter args and @MaySetToNull to opt outEugene Susla2020-02-251-18/+18
| | | | | | Bug: 143653080 Test: source /usr/local/google/home/eugenesusla/android2/master/frameworks/base/tests/Codegen/runTest.sh Change-Id: Iba8da34c91fd09e266429ab131add1d53449506b
* Add @NonNull annotation to Builder.addXXX argsEugene Susla2019-11-181-5/+5
| | | | | | | | | | 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
* Fix codegen ArrayMap fieldsEugene Susla2019-11-051-3/+3
| | | | | | Fixes: 143112074 Test: . frameworks/base/tests/Codegen/runTest.sh Change-Id: Iec0fa89a91955f8b4e4b5b8d4dd9d7f0b30c608f
* [codegen] Fix generation for files without end markersEugene Susla2019-11-011-3/+3
| | | | | | | | 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
* [codegen] Support nested classesEugene Susla2019-11-011-5/+9
| | | | | | | | | | | 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
* Add @NonNull to some generated methods' argsEugene Susla2019-10-161-10/+10
| | | | | | Test: . frameworks/base/tests/Codegen/runTest.sh Fixes: 142783758 Change-Id: I7303d420efd59389c324b3e399fcb3532b5d6c37
* Few minor codegen fixesEugene Susla2019-10-111-3/+7
| | | | | | | | | | | | - (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
* Fix some stale dataclass detector false positivesEugene Susla2019-10-081-3/+3
| | | | | Test: . frameworks/base/tests/Codegen/runTest.sh Change-Id: I562bb4f238bdb28af49804e77c956e41a7bd198d
* Add inheritance support for parcelable dataclassesEugene Susla2019-10-041-51/+121
| | | | | | | | | 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
* Fix a few corner-cases with parcelling SparseArrays and MapsEugene Susla2019-10-031-3/+3
| | | | | | | | Also added a test for some similar parcelling corner cases Test: . frameworks/base/tests/Codegen/runTest.sh Fixes: 141877655 Change-Id: Iad5c3b0a8489206754f6ebe6acb8b56ba9ca174a
* Fix codegen adding random /Eugene Susla2019-10-011-5/+5
| | | | | | Fixes: 141934335 Test: . frameworks/base/tests/Codegen/runTest.sh Change-Id: Ic72d141ed58e332079e7edb7134e02d1447ff643
* Fix codegen not accepting relative pathsEugene Susla2019-09-111-3/+3
| | | | | | | Fixes: 140886378 Test: codegen tests/Codegen/src/com/android/codegentest/SampleDataClass.java; ./frameworks/base/tests/Codegen/runTest.sh Change-Id: Ie2b5c55f35ec7865bf34cf9e99ef7751eb5f8d98
* Update codegen to match javaparser updateEugene Susla2019-08-061-1/+1
| | | | | Test: . $ANDROID_BUILD_TOP/frameworks/base/tests/Codegen/runTest.sh Change-Id: I3e961a9cee5c71bd2195328dcb53dabd61255aa6
* Addresses further review comments from ag/8000041Eugene Susla2019-08-051-267/+533
| | | | | | | | | | | 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
* Auto-build/update codegenEugene Susla2019-07-291-4/+4
| | | | | | | 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
* Codegen for parcelable/dataclass boilerplateEugene Susla2019-07-171-0/+1542
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