langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacTypes.java
changeset 27224 228abfa87080
parent 26781 a786b07c7b91
child 29842 826ac2519523
equal deleted inserted replaced
27130:41df50e7303d 27224:228abfa87080
    36 
    36 
    37 import com.sun.tools.javac.code.*;
    37 import com.sun.tools.javac.code.*;
    38 import com.sun.tools.javac.code.Symbol.*;
    38 import com.sun.tools.javac.code.Symbol.*;
    39 import com.sun.tools.javac.util.*;
    39 import com.sun.tools.javac.util.*;
    40 import com.sun.tools.javac.util.DefinedBy.Api;
    40 import com.sun.tools.javac.util.DefinedBy.Api;
       
    41 
       
    42 import static com.sun.tools.javac.code.Kinds.Kind.*;
    41 
    43 
    42 /**
    44 /**
    43  * Utility methods for operating on types.
    45  * Utility methods for operating on types.
    44  *
    46  *
    45  * <p><b>This is NOT part of any supported API.
    47  * <p><b>This is NOT part of any supported API.
   326         Set<MethodSymbol> results = new LinkedHashSet<>();
   328         Set<MethodSymbol> results = new LinkedHashSet<>();
   327         for (Type t : types.closure(origin.type)) {
   329         for (Type t : types.closure(origin.type)) {
   328             if (t != origin.type) {
   330             if (t != origin.type) {
   329                 ClassSymbol c = (ClassSymbol) t.tsym;
   331                 ClassSymbol c = (ClassSymbol) t.tsym;
   330                 for (Symbol sym : c.members().getSymbolsByName(m.name)) {
   332                 for (Symbol sym : c.members().getSymbolsByName(m.name)) {
   331                     if (sym.kind == Kinds.MTH && m.overrides(sym, origin, types, true)) {
   333                     if (sym.kind == MTH && m.overrides(sym, origin, types, true)) {
   332                         results.add((MethodSymbol) sym);
   334                         results.add((MethodSymbol) sym);
   333                     }
   335                     }
   334                 }
   336                 }
   335             }
   337             }
   336         }
   338         }