History log of /system/tools/aidl/ast_java.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d21bfee0d45a5eb8ffb09eaae3c6d81f3dd292f7 30-Jan-2016 Christopher Wiley <wiley@google.com> Fully separate AIDL and Java type namespaces

For android::aidl::ValidatableType, rename:
- QualifiedName() -> CanonicalName()
- Name() -> ShortName()

For android::aidl::java::Type, add a new JavaType() method.
Use that method exclusively when generating Java.

Bug: 26875320
Test: unit and integration tests pass

Change-Id: Ib1d09f4f84d3270634e611f0911f60a2e685cefc
/system/tools/aidl/ast_java.cpp
f76b59aeac2ce35e954c15c676e9102777ec8faa 29-Jan-2016 Christopher Wiley <wiley@google.com> Turn android::aidl::java::Document into a class

Bug: None
Test: Compiles, unit tests pass

Change-Id: I17db404bceb868d7f8ff5de5beea03fca222d7d8
/system/tools/aidl/ast_java.cpp
12e894a3b69f045f104a9026765ecbc60ec5967e 29-Jan-2016 Christopher Wiley <wiley@google.com> Remove last using directives from global header scope

Bug: None
Test: Compiles, unittests pass

Change-Id: I66dee2504b28049ecb74526a08345e999d57db8d
/system/tools/aidl/ast_java.cpp
ae58997526a9cd817508366471d6fcf03b1993c4 29-Jan-2016 Christopher Wiley <wiley@google.com> clang-format ast_java.{cpp,h}

Ran `/usr/bin/clang-format -style=Google -i ast_java.*`

Bug: None
Test: compiles, unittests still pass

Change-Id: I6e87c8f7d199f369d8782eb943ecfa9212f8f5cd
/system/tools/aidl/ast_java.cpp
d40e2fed2c19850d53f1620322ac5cbca2c0e245 24-Nov-2015 Casey Dahlin <sadmac@google.com> Introduce integer constants

We can now declare a "const int" variable in an AIDL interface, in
addition to methods. These constants will become static members of the
interface/base class in the generated code.

Change-Id: I6b690ecbbe2acae37abb106510e42283f0753f26
Test: Unit and integration tests updated and pass
Bug: 23600061
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/ast_java.cpp
685a8ed1840bb11b28e7a16cf43dc49f92f498b1 17-Oct-2015 Christopher Wiley <wiley@google.com> Remove dead Java AST code

It looks like the original authors at one point thought about importing
types rather than using canonical names. However, this code has no
callsite.

Bug: None
Test: unittests pass

Change-Id: I26c6bd741d8c97e56b4599b0c4bc3a86acb7374d
/system/tools/aidl/ast_java.cpp
df03d975a7135ecfef513d0eef415e35a5e5caaa 29-Sep-2015 Christopher Wiley <wiley@google.com> Remove trivial destructors and constructors from Java AST

It seems likely we can share a lot of this code with the C++
AST. Clean it up a little.

Test: unittests pass, clean build of Android passes

Change-Id: I1548a108fb4ba4d9561ed9502b0808b497343790
/system/tools/aidl/ast_java.cpp
db154a5f543ff697248df649a14f2ac4a70cbf0e 29-Sep-2015 Christopher Wiley <wiley@google.com> Move Java related code into a java namespace

This lets us use names like Type instead of CppType for generated
code specific to C++. C++ code will similarly go in its own namespace.

Bug: 24472672
Test: Compiles, unittests pass

Change-Id: I10fc8ce6436e297eb36c7b63e0c6d78a45bf2a19
/system/tools/aidl/ast_java.cpp
8f6816ea1fb532cff9ce0ecc1449926553b4e1da 23-Sep-2015 Christopher Wiley <wiley@google.com> Don't allow non-const pointers to Type instances

This makes the namespace into a read only datastructure of types
with a few methods to load types during parsing.

Bug: 24303749
Test: compiles, unittests

Change-Id: I0873e520d771b348a1a8ec9515b6e7b9a8a29298
/system/tools/aidl/ast_java.cpp
3637a4d41d9dd1669d92127212fb4822a315ab76 23-Sep-2015 Christopher Wiley <wiley@google.com> Make all possible Type methods const

While here, mark inherited virtual methods as override methods.

Bug: 24303749
Test: Compiles, unittests

Change-Id: Ia7114b53e243b8539a6c84e1b96bb68fee5281cd
/system/tools/aidl/ast_java.cpp
775fa1f7db4626b85e5185149b054821fc605c2b 23-Sep-2015 Christopher Wiley <wiley@google.com> Rename Type.* to type_java.*

We'll soon have type_cpp variations on these files, and a more
generic type.h

Bug: 24303749
Test: Compiles, unittests

Change-Id: I64f45efa3553f1a46d2d16d6652eedd6b324b2e4
/system/tools/aidl/ast_java.cpp
fdeb0f4b96b6c39b1b9ed3358634f180f9e6df06 12-Sep-2015 Christopher Wiley <wiley@google.com> Abstract away file IO when writing generated code

This allows us to write unittests of Java/Cpp AST elements without
doing file I/O each time. Introduce a CodeWriter class which
may write to either a string or a file dependening on the contect.

While here, mark the write methods as const.

Test: Compiles, unittests pass, added new unittest demonstrating usage.
Bug: 23598995

Change-Id: I240ede41f0f9c04c0d14d1a3680ce5ab332babbc
/system/tools/aidl/ast_java.cpp
038485e9c8a4d7c0d47720e5bb1b1086b7550de7 12-Sep-2015 Christopher Wiley <wiley@google.com> Rename AST.{h,cpp} files to ast_java.{h,cpp}

Soon we will grow equivalent ast_cpp.{h,cpp} files.

Bug: 23598995
Change-Id: Ief017596a1a19d679a66c183f3956f069e8a989a
Test: Compiles, unittests pass
/system/tools/aidl/ast_java.cpp