发明名称 Defining classes as singleton classes or non-singleton classes
摘要 One or more of the classes is defined using an attribute or keyword that indicates that the one or more classes may be defined as singleton classes or non-singleton classes (a class that may be instantiated more than once). A compiler system converts the class to a singleton class when the compiler system receives a command or request indicating that the class is to be defined as a singleton class. Various optimizations may be performed when one or more of the classes in the source code are defined as singleton classes. The compiler system may not convert the class to a singleton class when the compiler system receives a command or request indicating that the class is to be defined as a non-singleton class.
申请公布号 US9448818(B2) 申请公布日期 2016.09.20
申请号 US201414181315 申请日期 2014.02.14
申请人 Red Hat, Inc. 发明人 Malcolm David H.
分类号 G06F9/45;G06F9/445 主分类号 G06F9/45
代理机构 Lowenstein Sandler LLP 代理人 Lowenstein Sandler LLP
主权项 1. A method comprising: receiving, by a processing device, a first request to generate an application from source code, wherein the source code comprises a class, and wherein the first request specifies a first value; generating by the processing device, in response to the first request, a first instance of the application, wherein in view of the first value, the class is implemented in the first instance as a singleton and at most one object of the class exists in the first instance at any time; receiving, by the processing device, a second request to generate the application from the source code, wherein the second request specifies a second value that is different than the first value; and generating by the processing device, in response to the second request, a second instance of the application, wherein in view of the second value, the class is implemented in the second instance as a non-singleton.
地址 Raleigh NC US