use of org.sonar.java.model.expression.MethodReferenceTreeImpl in project sonar-java by SonarSource.
the class TypeAndReferenceSolver method visitMethodReference.
@Override
public void visitMethodReference(MethodReferenceTree methodReferenceTree) {
MethodReferenceTreeImpl methodRefTree = (MethodReferenceTreeImpl) methodReferenceTree;
if (methodRefTree.isTypeSet() && methodReferenceTree.typeArguments() == null) {
resolve.getSamMethod((JavaType) methodRefTree.symbolType()).ifPresent(samMethod -> resolveMethodReference(samMethod, methodRefTree));
} else {
// TODO : SONARJAVA-1663 : consider type arguments for method resolution and substitution
scan(methodReferenceTree.typeArguments());
resolveAs(methodReferenceTree.expression(), JavaSymbol.VAR | JavaSymbol.TYP);
registerType(methodRefTree, symbols.deferedType(methodRefTree));
}
}
Aggregations