src/share/classes/com/sun/tools/javac/code/Types.java

changeset 2431
37c7dbe8efee
parent 2428
ce1d9dd2e9eb
child 2434
7de1481c6cd8
equal deleted inserted replaced
2430:f4381f9541e6 2431:37c7dbe8efee
2298 private UnaryVisitor<Type> supertype = new UnaryVisitor<Type>() { 2298 private UnaryVisitor<Type> supertype = new UnaryVisitor<Type>() {
2299 2299
2300 public Type visitType(Type t, Void ignored) { 2300 public Type visitType(Type t, Void ignored) {
2301 // A note on wildcards: there is no good way to 2301 // A note on wildcards: there is no good way to
2302 // determine a supertype for a super bounded wildcard. 2302 // determine a supertype for a super bounded wildcard.
2303 return null; 2303 return Type.noType;
2304 } 2304 }
2305 2305
2306 @Override 2306 @Override
2307 public Type visitClassType(ClassType t, Void ignored) { 2307 public Type visitClassType(ClassType t, Void ignored) {
2308 if (t.supertype_field == null) { 2308 if (t.supertype_field == null) {
2465 public boolean isDerivedRawInternal(Type t) { 2465 public boolean isDerivedRawInternal(Type t) {
2466 if (t.isErroneous()) 2466 if (t.isErroneous())
2467 return false; 2467 return false;
2468 return 2468 return
2469 t.isRaw() || 2469 t.isRaw() ||
2470 supertype(t) != null && isDerivedRaw(supertype(t)) || 2470 supertype(t) != Type.noType && isDerivedRaw(supertype(t)) ||
2471 isDerivedRaw(interfaces(t)); 2471 isDerivedRaw(interfaces(t));
2472 } 2472 }
2473 2473
2474 public boolean isDerivedRaw(List<Type> ts) { 2474 public boolean isDerivedRaw(List<Type> ts) {
2475 List<Type> l = ts; 2475 List<Type> l = ts;

mercurial