发明名称 Supporting method references in the JAVA language
摘要 According to one embodiment of the invention, the JAVA compiler is modified so that when the JAVA compiler determines, while compiling source code, that an invocation of a first method, which expects to receive a reference to an object, passes, to the first method, a reference to a second method instead of a reference to an object, the JAVA compiler does not issue a compile-time error as the JAVA compiler normally would. Instead, the JAVA compiler generates compiled code (e.g., byte code) that the JAVA compiler would have generated if the source code had (a) defined a “bridge” class that implemented a method that invoked the second method and (b) contained, in the invocation of the first method, a reference to an object that was an instance of the “bridge” class in the place of the reference to the second method.
申请公布号 US7802239(B2) 申请公布日期 2010.09.21
申请号 US20050271424 申请日期 2005.11.09
申请人 ORACLE AMERICA, INC. 发明人 HAMILTON GRAHAM
分类号 G06F9/45;G06F9/44 主分类号 G06F9/45
代理机构 代理人
主权项
地址