Merge change 9670 into donut
* changes: Make aidl annotate onTransact with @Override
This commit is contained in:
@ -6,6 +6,10 @@ WriteModifiers(FILE* to, int mod, int mask)
|
|||||||
{
|
{
|
||||||
int m = mod & mask;
|
int m = mod & mask;
|
||||||
|
|
||||||
|
if (m & OVERRIDE) {
|
||||||
|
fprintf(to, "@Override ");
|
||||||
|
}
|
||||||
|
|
||||||
if ((m & SCOPE_MASK) == PUBLIC) {
|
if ((m & SCOPE_MASK) == PUBLIC) {
|
||||||
fprintf(to, "public ");
|
fprintf(to, "public ");
|
||||||
}
|
}
|
||||||
@ -79,7 +83,7 @@ Field::Write(FILE* to)
|
|||||||
if (this->comment.length() != 0) {
|
if (this->comment.length() != 0) {
|
||||||
fprintf(to, "%s\n", this->comment.c_str());
|
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(),
|
fprintf(to, "%s %s", this->variable->type->QualifiedName().c_str(),
|
||||||
this->variable->name.c_str());
|
this->variable->name.c_str());
|
||||||
if (this->value.length() != 0) {
|
if (this->value.length() != 0) {
|
||||||
@ -674,7 +678,7 @@ Method::Write(FILE* to)
|
|||||||
fprintf(to, "%s\n", this->comment.c_str());
|
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) {
|
if (this->returnType != NULL) {
|
||||||
string dim;
|
string dim;
|
||||||
|
@ -22,6 +22,8 @@ enum {
|
|||||||
FINAL = 0x00000020,
|
FINAL = 0x00000020,
|
||||||
ABSTRACT = 0x00000040,
|
ABSTRACT = 0x00000040,
|
||||||
|
|
||||||
|
OVERRIDE = 0x00000100,
|
||||||
|
|
||||||
ALL_MODIFIERS = 0xffffffff
|
ALL_MODIFIERS = 0xffffffff
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ StubClass::StubClass(Type* type, Type* interfaceType)
|
|||||||
this->transact_reply = new Variable(PARCEL_TYPE, "reply");
|
this->transact_reply = new Variable(PARCEL_TYPE, "reply");
|
||||||
this->transact_flags = new Variable(INT_TYPE, "flags");
|
this->transact_flags = new Variable(INT_TYPE, "flags");
|
||||||
Method* onTransact = new Method;
|
Method* onTransact = new Method;
|
||||||
onTransact->modifiers = PUBLIC;
|
onTransact->modifiers = PUBLIC | OVERRIDE;
|
||||||
onTransact->returnType = BOOLEAN_TYPE;
|
onTransact->returnType = BOOLEAN_TYPE;
|
||||||
onTransact->name = "onTransact";
|
onTransact->name = "onTransact";
|
||||||
onTransact->parameters.push_back(this->transact_code);
|
onTransact->parameters.push_back(this->transact_code);
|
||||||
|
Reference in New Issue
Block a user