发明名称 System and method for supporting compatibility checking for lambda expression
摘要 A system and method can support compatibility checking in a programming language environment. The programming language environment can check whether a target type associated with an expression in the programming language environment is functional, wherein the target type is functional when it has exactly one method meeting one or more criteria that define that method as relevant in a counting system. Then, the programming language environment can derive a function descriptor from the target type, which is context-dependent. Furthermore, the programming language environment can type-check the expression with the function descriptor associated with the target type.
申请公布号 US9557974(B2) 申请公布日期 2017.01.31
申请号 US201313779536 申请日期 2013.02.27
申请人 ORACLE INTERNATIONAL CORPORATION 发明人 Goetz Brian;Smith Daniel;Cimadamore Maurizio
分类号 G06F9/44;G06F9/45 主分类号 G06F9/44
代理机构 Tucker Ellis LLP 代理人 Tucker Ellis LLP
主权项 1. A computer-implemented method for supporting compatibility checking in a programming language environment (PLE), the computer-implemented method comprising: receiving a language expression in the PLE; determining a context of the language expression in the PLE; analyzing the context of the language expression in the PLE to determine a target type of the language expression in the PLE; determining, via a compiler in the PLE, that the target type of the language expression implements a functional interface that includes a single abstract method; deriving, using the compiler, a function descriptor from the target type; and comparing a return type and an exception type resulting from an execution of the language expression against the function descriptor.
地址 Redwood Shores CA US