public static Symbol.MethodSymbol getFunctionalInterfaceMethod(ExpressionTree tree, Types types) {
    Preconditions.checkArgument(
        (tree instanceof LambdaExpressionTree) || (tree instanceof MemberReferenceTree));
    Type funcInterfaceType = ((JCTree.JCFunctionalExpression) tree).type;
    return (Symbol.MethodSymbol) types.findDescriptorSymbol(funcInterfaceType.tsym);
  }
public static Symbol . MethodSymbol getFunctionalInterfaceMethod ( ExpressionTree tree , Types types ) { Preconditions . checkArgument ( ( tree instanceof LambdaExpressionTree ) || ( tree instanceof MemberReferenceTree ) ) ; Type funcInterfaceType = ( ( JCTree . JCFunctionalExpression ) tree ) . type ; return ( Symbol . MethodSymbol ) types . findDescriptorSymbol ( funcInterfaceType . tsym ) ; }
finds the corresponding functional interface method for a lambda expression or method reference

@param tree the lambda expression or method reference
@return the functional interface method