diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-08-04 11:23:04 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-08-04 11:23:04 -0700 |
commit | 5887f2199a6285e3af36aaa5e446bcdf2d54f408 (patch) | |
tree | a16b236a2e4a5b44c5faae3d7ea20282c91cb62d /tools | |
parent | ff14d457c41a8b608ea743e6a04642912436d21e (diff) | |
parent | 747cb3b515e1b01f6b61ec911b693d88d480eaaf (diff) | |
download | frameworks_base-5887f2199a6285e3af36aaa5e446bcdf2d54f408.zip frameworks_base-5887f2199a6285e3af36aaa5e446bcdf2d54f408.tar.gz frameworks_base-5887f2199a6285e3af36aaa5e446bcdf2d54f408.tar.bz2 |
am 747cb3b5: Merge change 9670 into donut
Merge commit '747cb3b515e1b01f6b61ec911b693d88d480eaaf'
* commit '747cb3b515e1b01f6b61ec911b693d88d480eaaf':
Make aidl annotate onTransact with @Override
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/aidl/AST.cpp | 8 | ||||
-rwxr-xr-x | tools/aidl/AST.h | 2 | ||||
-rw-r--r-- | tools/aidl/generate_java.cpp | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/tools/aidl/AST.cpp b/tools/aidl/AST.cpp index 1856cb9..752ef7c 100755 --- a/tools/aidl/AST.cpp +++ b/tools/aidl/AST.cpp @@ -6,6 +6,10 @@ WriteModifiers(FILE* to, int mod, int mask) { int m = mod & mask; + if (m & OVERRIDE) { + fprintf(to, "@Override "); + } + if ((m & SCOPE_MASK) == PUBLIC) { fprintf(to, "public "); } @@ -79,7 +83,7 @@ Field::Write(FILE* to) if (this->comment.length() != 0) { fprintf(to, "%s\n", this->comment.c_str()); } - WriteModifiers(to, this->modifiers, SCOPE_MASK | STATIC | FINAL); + WriteModifiers(to, this->modifiers, SCOPE_MASK | STATIC | FINAL | OVERRIDE); fprintf(to, "%s %s", this->variable->type->QualifiedName().c_str(), this->variable->name.c_str()); if (this->value.length() != 0) { @@ -674,7 +678,7 @@ Method::Write(FILE* to) fprintf(to, "%s\n", this->comment.c_str()); } - WriteModifiers(to, this->modifiers, SCOPE_MASK | STATIC | FINAL); + WriteModifiers(to, this->modifiers, SCOPE_MASK | STATIC | FINAL | OVERRIDE); if (this->returnType != NULL) { string dim; diff --git a/tools/aidl/AST.h b/tools/aidl/AST.h index aec2164..3156356 100755 --- a/tools/aidl/AST.h +++ b/tools/aidl/AST.h @@ -22,6 +22,8 @@ enum { FINAL = 0x00000020, ABSTRACT = 0x00000040, + OVERRIDE = 0x00000100, + ALL_MODIFIERS = 0xffffffff }; diff --git a/tools/aidl/generate_java.cpp b/tools/aidl/generate_java.cpp index da20d1f..0f18132 100644 --- a/tools/aidl/generate_java.cpp +++ b/tools/aidl/generate_java.cpp @@ -104,7 +104,7 @@ StubClass::StubClass(Type* type, Type* interfaceType) this->transact_reply = new Variable(PARCEL_TYPE, "reply"); this->transact_flags = new Variable(INT_TYPE, "flags"); Method* onTransact = new Method; - onTransact->modifiers = PUBLIC; + onTransact->modifiers = PUBLIC | OVERRIDE; onTransact->returnType = BOOLEAN_TYPE; onTransact->name = "onTransact"; onTransact->parameters.push_back(this->transact_code); |