< prev index next > src/jdk.compiler/share/classes/com/sun/tools/javac/api/JavacTrees.java
Print this page
return null;
}
MethodSymbol findConstructor(ClassSymbol tsym, List<Type> paramTypes, boolean strict) {
! for (Symbol sym : tsym.members().getSymbolsByName(names.init)) {
if (sym.kind == MTH) {
if (hasParameterTypes((MethodSymbol) sym, paramTypes, strict)) {
return (MethodSymbol) sym;
}
}
return null;
}
MethodSymbol findConstructor(ClassSymbol tsym, List<Type> paramTypes, boolean strict) {
! Name constructorName = tsym.isConcreteValueClass() ? names.vnew : names.init;
+ for (Symbol sym : tsym.members().getSymbolsByName(constructorName)) {
if (sym.kind == MTH) {
if (hasParameterTypes((MethodSymbol) sym, paramTypes, strict)) {
return (MethodSymbol) sym;
}
}
List<Type> paramTypes, boolean strict,
Set<ClassSymbol> searched) {
//### Note that this search is not necessarily what the compiler would do!
// do not match constructors
! if (methodName == names.init)
return null;
if (searched.contains(tsym))
return null;
searched.add(tsym);
List<Type> paramTypes, boolean strict,
Set<ClassSymbol> searched) {
//### Note that this search is not necessarily what the compiler would do!
// do not match constructors
! if (names.isInitOrVNew(methodName))
return null;
if (searched.contains(tsym))
return null;
searched.add(tsym);
}
if (errorType instanceof com.sun.tools.javac.code.Type.ClassType classType &&
errorType.getKind() == TypeKind.ERROR) {
return extraType2OriginalMap.computeIfAbsent(classType, tt ->
new ClassType(classType.getEnclosingType(), classType.typarams_field,
! classType.tsym, classType.getMetadata()) {
@Override
public Type baseType() { return classType; }
@Override
public TypeKind getKind() {
return TypeKind.DECLARED;
}
if (errorType instanceof com.sun.tools.javac.code.Type.ClassType classType &&
errorType.getKind() == TypeKind.ERROR) {
return extraType2OriginalMap.computeIfAbsent(classType, tt ->
new ClassType(classType.getEnclosingType(), classType.typarams_field,
! classType.tsym, classType.getMetadata(), classType.getFlavor()) {
@Override
public Type baseType() { return classType; }
@Override
public TypeKind getKind() {
return TypeKind.DECLARED;
< prev index next >