Vectors are now exposed as ArrayList<T> in the Java backend even for arguments

and return values to/from methods, they already were inside structures.
In addition vectors of arrays are now properly marshalled when used as arguments
or results to/from methods.

Bug: 32237331, 32180328
Test: hidl_test_java
Change-Id: Ie24f11668f22fc2c31fb7d8e8da534f1c970f58f
5 files changed
tree: e3ddcb26d83bef25686d302513d0f93739b1c3fa
  1. c2hal/
  2. test/
  3. utils/
  4. Android.bp
  5. Annotation.cpp
  6. Annotation.h
  7. ArrayType.cpp
  8. ArrayType.h
  9. AST.cpp
  10. AST.h
  11. CompoundType.cpp
  12. CompoundType.h
  13. ConstantExpression.cpp
  14. ConstantExpression.h
  15. Coordinator.cpp
  16. Coordinator.h
  17. EnumType.cpp
  18. EnumType.h
  19. FQName.cpp
  20. FQName.h
  21. generateCpp.cpp
  22. generateCppImpl.cpp
  23. generateJava.cpp
  24. generateVts.cpp
  25. GenericBinder.cpp
  26. GenericBinder.h
  27. HandleType.cpp
  28. HandleType.h
  29. hidl-gen_l.ll
  30. hidl-gen_y.yy
  31. Interface.cpp
  32. Interface.h
  33. main.cpp
  34. Method.cpp
  35. Method.h
  36. MODULE_LICENSE_APACHE2
  37. NamedType.cpp
  38. NamedType.h
  39. NOTICE
  40. PredefinedType.cpp
  41. PredefinedType.h
  42. README.md
  43. RefType.cpp
  44. RefType.h
  45. ScalarType.cpp
  46. ScalarType.h
  47. Scope.cpp
  48. Scope.h
  49. StringType.cpp
  50. StringType.h
  51. Type.cpp
  52. Type.h
  53. TypeDef.cpp
  54. TypeDef.h
  55. VectorType.cpp
  56. VectorType.h
README.md

hidl-gen user guide

1. Build

croot
make hidl-gen

2. Run

hidl-gen -o output-path -L language (-r interface-root) fqname

output-path: directory to store the output files.
language: output file for given language. e.g.c++, vts..

fqname: fully qualified name of the input files.
For singe file input, follow the format: package@version::fileName
For directory input, follow the format: package@version

interface-root(optional): prefix and root path for fqname.
If not set, use the default prefix: android.hardware and default root path
defined in $TOP.

examples:

hidl-gen -o output -L c++ android.hardware.nfc@1.0::INfc.hal
hidl-gen -o output -L vts android.hardware.nfc@1.0
hidl-gen -o test -L c++ -r android.hardware:/home/android/master/hardware/interfaces android.hardware.nfc@1.0