Commit Graph

4 Commits

Author SHA1 Message Date
Eugene Susla
322e8b1772 [codegen] Support nested classes
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-11-01 17:53:56 +00:00
Eugene Susla
20b6e646e5 Fix a few corner-cases with parcelling SparseArrays and Maps
Also added a test for some similar parcelling corner cases

Test: . frameworks/base/tests/Codegen/runTest.sh
Fixes: 141877655
Change-Id: Iad5c3b0a8489206754f6ebe6acb8b56ba9ca174a
2019-10-03 15:05:26 -07:00
Eugene Susla
3156a4ce21 Addresses further review comments from ag/8000041
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-08-05 16:54:41 -07:00
Eugene Susla
574b7e11d5 Codegen for parcelable/dataclass boilerplate
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
2019-07-17 17:12:37 -07:00