private TypeSubstitution inferTypeSubstitutionInTypeVariable(MethodJavaSymbol method, TypeSubstitution substitution, TypeVariableJavaType formalType, JavaType argType, boolean variableArity, List<JavaType> remainingArgTypes) { TypeSubstitution result = new TypeSubstitution(substitution); if (substitution.substitutedType(formalType) == null) { JavaType expectedType = argType; if (expectedType.isPrimitive()) { expectedType = expectedType.primitiveWrapperType; } else if (isNullType(expectedType)) { expectedType = symbols.objectType; } TypeVariableJavaType typeVar = formalType; result.add(typeVar, expectedType); } for (JavaType bound : formalType.bounds) { if (!bound.is("java.lang.Object")) { result = inferTypeSubstitution(method, result, bound, argType, variableArity, remainingArgTypes); } } return result; } }
private TypeSubstitution inferTypeSubstitutionInTypeVariable(MethodJavaSymbol method, TypeSubstitution substitution, TypeVariableJavaType formalType, JavaType argType, boolean variableArity, List<JavaType> remainingArgTypes) { TypeSubstitution result = new TypeSubstitution(substitution); if (substitution.substitutedType(formalType) == null) { JavaType expectedType = argType; if (expectedType.isPrimitive()) { expectedType = expectedType.primitiveWrapperType; } else if (isNullType(expectedType)) { expectedType = symbols.objectType; } TypeVariableJavaType typeVar = formalType; result.add(typeVar, expectedType); } for (JavaType bound : formalType.bounds) { if (!bound.is("java.lang.Object")) { result = inferTypeSubstitution(method, result, bound, argType, variableArity, remainingArgTypes); } } return result; } }
} else if (isRawTypeOfType(argType, formalType) || isNullType(argType)) { return TypeSubstitution.uncheckedTypeSubstitution(); } else if (argType.isSubtypeOf(formalType.erasure()) && argType.isClass()) {
} else if (isRawTypeOfType(argType, formalType) || isNullType(argType)) { return TypeSubstitution.uncheckedTypeSubstitution(); } else if (argType.isSubtypeOf(formalType.erasure()) && argType.isClass()) {