436 public ElementKind getKind() { |
436 public ElementKind getKind() { |
437 return ElementKind.OTHER; // most unkind |
437 return ElementKind.OTHER; // most unkind |
438 } |
438 } |
439 |
439 |
440 public Set<Modifier> getModifiers() { |
440 public Set<Modifier> getModifiers() { |
441 return Flags.asModifierSet(flags()); |
441 long flags = flags(); |
|
442 return Flags.asModifierSet((flags & DEFAULT) != 0 ? flags & ~ABSTRACT : flags); |
442 } |
443 } |
443 |
444 |
444 public Name getSimpleName() { |
445 public Name getSimpleName() { |
445 return name; |
446 return name; |
446 } |
447 } |
473 this.other = other; |
474 this.other = other; |
474 } |
475 } |
475 public String toString() { return other.toString(); } |
476 public String toString() { return other.toString(); } |
476 public Symbol location() { return other.location(); } |
477 public Symbol location() { return other.location(); } |
477 public Symbol location(Type site, Types types) { return other.location(site, types); } |
478 public Symbol location(Type site, Types types) { return other.location(site, types); } |
|
479 public Symbol baseSymbol() { return other; } |
478 public Type erasure(Types types) { return other.erasure(types); } |
480 public Type erasure(Types types) { return other.erasure(types); } |
479 public Type externalType(Types types) { return other.externalType(types); } |
481 public Type externalType(Types types) { return other.externalType(types); } |
480 public boolean isLocal() { return other.isLocal(); } |
482 public boolean isLocal() { return other.isLocal(); } |
481 public boolean isConstructor() { return other.isConstructor(); } |
483 public boolean isConstructor() { return other.isConstructor(); } |
482 public Name getQualifiedName() { return other.getQualifiedName(); } |
484 public Name getQualifiedName() { return other.getQualifiedName(); } |
1190 } |
1192 } |
1191 } |
1193 } |
1192 |
1194 |
1193 // check for an inherited implementation |
1195 // check for an inherited implementation |
1194 if ((flags() & ABSTRACT) != 0 || |
1196 if ((flags() & ABSTRACT) != 0 || |
1195 (other.flags() & ABSTRACT) == 0 || |
1197 ((other.flags() & ABSTRACT) == 0 && (other.flags() & DEFAULT) == 0) || |
1196 !other.isOverridableIn(origin) || |
1198 !other.isOverridableIn(origin) || |
1197 !this.isMemberOf(origin, types)) |
1199 !this.isMemberOf(origin, types)) |
1198 return false; |
1200 return false; |
1199 |
1201 |
1200 // assert types.asSuper(origin.type, other.owner) != null; |
1202 // assert types.asSuper(origin.type, other.owner) != null; |
1201 Type mt = types.memberType(origin.type, this); |
1203 Type mt = types.memberType(origin.type, this); |
1202 Type ot = types.memberType(origin.type, other); |
1204 Type ot = types.memberType(origin.type, other); |
1203 return |
1205 return |
1204 types.isSubSignature(mt, ot) && |
1206 types.isSubSignature(mt, ot) && |
1205 (!checkResult || types.resultSubtype(mt, ot, Warner.noWarnings)); |
1207 (!checkResult || types.resultSubtype(mt, ot, types.noWarnings)); |
1206 } |
1208 } |
1207 |
1209 |
1208 private boolean isOverridableIn(TypeSymbol origin) { |
1210 private boolean isOverridableIn(TypeSymbol origin) { |
1209 // JLS 8.4.6.1 |
1211 // JLS 8.4.6.1 |
1210 switch ((int)(flags_field & Flags.AccessFlags)) { |
1212 switch ((int)(flags_field & Flags.AccessFlags)) { |