- 专利标题: Supporting method references in the JAVA language
-
申请号: US11271424申请日: 2005-11-09
-
公开(公告)号: US07802239B2公开(公告)日: 2010-09-21
- 发明人: Graham Hamilton
- 申请人: Graham Hamilton
- 申请人地址: US CA Redwood City
- 专利权人: Oracle America, Inc.
- 当前专利权人: Oracle America, Inc.
- 当前专利权人地址: US CA Redwood City
- 代理机构: Osha • Liang LLP
- 主分类号: G06F9/45
- IPC分类号: G06F9/45 ; G06F9/44
摘要:
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.
公开/授权文献
- US20100169869A1 Supporting method references in the JAVA language 公开/授权日:2010-07-01
信息查询