History log of /system/tools/aidl/generate_java.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/generate_java.cpp
3a9da170c8e8ab91841339cd0ee9b5edd12a80c6 29-Jan-2016 Christopher Wiley <wiley@google.com> Update style in generate_java.*

- Add license notices
- Adopt Google style conventions
- remove string append(char* a, char* b)
- remove using std::* declarations from headers
- do not sprintf into a char buffer any longer

Bug: None
Change-Id: I42d95d25a6a88e87150bd9c7f1b79e26b9076c11
Test: compiles, unittests continue to pass
/system/tools/aidl/generate_java.cpp
c1f39b4ea30e7313eeb7f3d3fd5ec66ba00f2bb5 24-Nov-2015 Casey Dahlin <sadmac@google.com> Refactor top-level AST nodes v2

The previous version of this patch was tainted by parts of another
change to remove a memory leak, and ended up trying to treat a bare
pointer like a unique_ptr in a few places. This combines both changes in
to one.

Previous patch was b696437d842d59c0cc26411fa3d71cb91897c572:

We now return an AidlDocument from parsing. This type is non-polymorphic
and contains either a vector of parcelables or an interface. This gets
rid of all of our reinterpret_cast calls and the public item_type field.

Change-Id: I77fbb1d8448343bd02484d896289a514d636df25
Test: Unit tests pass
Bug: none
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/generate_java.cpp
eedb29f028af472b90fa528c84d0d89100346e5c 24-Nov-2015 Bart Sears <bsears@google.com> Revert "Refactor top-level AST nodes"

This reverts commit b696437d842d59c0cc26411fa3d71cb91897c572.

Change-Id: Id5c716536299cfad4d13c5891d9be8b1fa2aceae
/system/tools/aidl/generate_java.cpp
b696437d842d59c0cc26411fa3d71cb91897c572 17-Nov-2015 Casey Dahlin <sadmac@google.com> Refactor top-level AST nodes

We now return an AidlDocument from parsing. This type is non-polymorphic
and contains either a vector of parcelables or an interface. This gets
rid of all of our reinterpret_cast calls and the public item_type field.

Change-Id: Ia15ace677f79a153f8ebfad84ed43b08f4a3685f
Test: unit and integration tests pass
Bug: 25479378
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/generate_java.cpp
a30a45e7b7cdd3c4b5b7c5dcc6ce005abfe7c90f 17-Oct-2015 Christopher Wiley <wiley@google.com> Mock IO in all unit tests

Bug: 24816077
Test: unittests pass

Change-Id: I3e269106727370173a45a3443602a33eb4d7e9f8
/system/tools/aidl/generate_java.cpp
fb7da2e62fe66b0a57ffbb0304f5884024a68f1c 09-Oct-2015 Casey Dahlin <sadmac@google.com> Put AidlInterface members behind methods

Change-Id: Ib367a9183e734a008acecf90c5f3f25e51e16b37
Test: Full android build
Bug: 24410295
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/generate_java.cpp
1ae2bc56d20fe0e19262f2721abc338662fa6e30 08-Oct-2015 Casey Dahlin <sadmac@google.com> Convert document item structs to classes

This is the least-complete first run for any of these structs, but this
shift is going to be particularly gnarly, so we need to be
extra-incremental about it.

Change-Id: I7295add8b9a1291f229743f8c36d941569a16ab6
Test: unit tests
Bug: 24410295
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/generate_java.cpp
f2d23f7f05252fa1a06a8f95bd9475fa9d414c0c 03-Oct-2015 Casey Dahlin <sadmac@google.com> Kill comments token in AidlMethod

Change-Id: I3df6629eaa5b56093d2453269d4b138987bee7ce
Test: unit tests
Bug: 24410295
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/generate_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/generate_java.cpp
84c1eacc7f09377d7724f0783187b0477fe7c2ba 23-Sep-2015 Christopher Wiley <wiley@google.com> Use TypeNamespace instances in aidl.cpp

Refactor much of the logic around types into an instance of
TypeNamespace. This class defines an interface to type reasoning
logic that aidl.cpp can use to register binder and parcelable types
it loads during parsing. Code generation can use a language specific
subclass of the type namespace to reason about types more specifically.

For now, leave NAMES and the global type constants intact. We'll
refactor those in a separate change if necessary.

Bug: 24303749
Test: Compiles, unittests pass

Change-Id: Ie56a89159c956c587a1ff3e45d38d1850b04a9f2
/system/tools/aidl/generate_java.cpp
214c916028246ac6ede992877adfd8def175c8dd 24-Sep-2015 Christopher Wiley <wiley@google.com> Revert "Use TypeNamespace instances in aidl.cpp"

This fixes a build break while we investigate.

This reverts commit d03b54f61d1a0fb1a2791ee96d476180a5d38c85.

Change-Id: I200e7a6c84274e71ea661f8d952807e8266c5e54
/system/tools/aidl/generate_java.cpp
d03b54f61d1a0fb1a2791ee96d476180a5d38c85 23-Sep-2015 Christopher Wiley <wiley@google.com> Use TypeNamespace instances in aidl.cpp

Refactor much of the logic around types into an instance of
TypeNamespace. This class defines an interface to type reasoning
logic that aidl.cpp can use to register binder and parcelable types
it loads during parsing. Code generation can use a language specific
subclass of the type namespace to reason about types more specifically.

For now, leave NAMES and the global type constants intact. We'll
refactor those in a separate change if necessary.

Bug: 24303749
Test: Compiles, unittests pass

Change-Id: Ie961dcef4f10bc23932ce45c39a1b190d272ab72
/system/tools/aidl/generate_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/generate_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/generate_java.cpp
413e0426eebdb41d8e9344bd2a6a0ef79369de25 18-Sep-2015 Christopher Wiley <wiley@google.com> Move logic to write to stdout into CodeWriter

This will allow us to reuse it when we write C++ code.
I think this will mostly come in handy for debugging.

While here, rename the helper functions in accordance with the style
guide.

Test: unittests
Bug: 24220933

Change-Id: I269eb4a0dda10588c2ae77b7c8f2b00e50e70047
/system/tools/aidl/generate_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/generate_java.cpp
88868fc6566d371bf04180c429964bc699effb55 01-Sep-2015 Casey Dahlin <sadmac@google.com> Remove RPC interface Type

AIDL previously supported "rpc" and "flatten" types, which are not used
anywhere in the Android tree. This patch removes them, which significantly cuts
down code and complexity.

Bug: 23517584
Test: Rebuilt AOSP tree against new version
Change-Id: I6cf38d43c1ce109ffca987cc14520945aa22431f
Signed-off-by: Casey Dahlin <sadmac@google.com>
/system/tools/aidl/generate_java.cpp
ffa1686a7a8964d1f6e08ee2ab3e5eb42eb5f0b3 24-Jan-2014 Adam Lesinski <adamlesinski@google.com> Revert "Move frameworks/base/tools/ to frameworks/tools/"

This reverts commit 9f6a119c8aa276432ece4fe2118bd8a3c9b1067e.
/system/tools/aidl/generate_java.cpp
be354814711cbbb3bcf7467fc69d53fcf9363093 28-Aug-2013 Mike Lockwood <lockwood@google.com> Move frameworks/base/tools/ to frameworks/tools/

Change-Id: I3ffafdab27cc4aca256c3a5806b630795b75d5c8
/system/tools/aidl/generate_java.cpp
c596cfe6ebccd8f0bcced0922fbc6029c3b750ef 31-Aug-2011 Joe Onorato <joeo@google.com> Checkpoint adding @home RPC support to aidl
/system/tools/aidl/generate_java.cpp
15f8da2280290d39291b12dc87165fce1806923e 13-Jul-2011 Elliott Hughes <enh@google.com> Fix aidl to cope with multiple collection types per method.

Bug: http://code.google.com/p/android/issues/detail?id=18497
Change-Id: I152416022524d2860cb16b46c4812c5be6bdcbad
/system/tools/aidl/generate_java.cpp
1d217bd57699fbab69dab2d573a1f17286d16528 04-Aug-2009 Android (Google) Code Review <android-gerrit@google.com> am 747cb3b5: Merge change 9670 into donut

Merge commit '747cb3b515e1b01f6b61ec911b693d88d480eaaf'

* commit '747cb3b515e1b01f6b61ec911b693d88d480eaaf':
Make aidl annotate onTransact with @Override
e2272c18b488f053aba2250901e3b8f1902aec6a 04-Aug-2009 Xavier Ducrohet <xav@android.com> Make aidl annotate onTransact with @Override

BUG: 1902262
/system/tools/aidl/generate_java.cpp
e42b5f5731dcaad89cf7883bd29e16bd74c96dd8 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/system/tools/aidl/generate_java.cpp
3f063e539d2b8dc82a130c4322cdf93f2f1a9874 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/system/tools/aidl/generate_java.cpp
59500b9e161d149190bed71c52859391d9d66146 13-Feb-2009 Adrian Taylor <adrian@macrobug.com> Removing "import" statements from AIDL-generated .java files.

AIDL generates unnecessary "import" statements. These cause warnings
within Eclipse when the default Eclipse warnings settings are used.
This is inconvenient since the generated .java files are not
editable. Some pesky organisations have a zero-warnings policy
too, so there's no option but to fiddle with the Eclipse settings.

This patch ensures that all usages of class names within the
generated code are fully-qualified. In practice, they were nearly
all fully-qualified already. And this patch also removes the
generation of the import statements, since they are redundant
if we're using fully-qualified names everywhere.

This should fix issue 43 in the Google Code Android issues tracker.
http://code.google.com/p/android/issues/detail?id=43

I would appreciate if somebody who knows exactly how 'aidl'
works could confirm that there's no reason 'import' statements
would have been necessary except for the bits I've fixed. (I think
unqualified names were used much more frequently in early versions
of aidl, which might explain why import statements are generated
so eagerly).
/system/tools/aidl/generate_java.cpp
aa4031230fe73a8657552a183ac58a845e7fd07c 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
bcaa86d9d95e6a3d1731b16116c2a848aa862080 10-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@125939
/system/tools/aidl/generate_java.cpp
ccace32924e2d6f72c345cfbce8724eade9566a2 21-Oct-2008 Alexey Zaytsev <alexey.zaytsev@gmail.com> Add a few missing headers

Fixes build with gcc 4.3.2

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
/system/tools/aidl/generate_java.cpp
46c012c3806a4b5c5c46539ea5070cc56e1bdb4b 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/system/tools/aidl/generate_java.cpp