Back to results
US 9,436,462 B2Granted
Identifying singleton classes
AssigneeRed Hat, Inc.
InventorDavid H. Malcolm
Life of this patent
Estimating the term…
Abstract
A compiler system analyzes source code for an application. The compiler system determines whether a class in the source code uses a singleton pattern even though the class is not defined as singleton class. The compiler system may optionally convert the class to a singleton class. The compiler system may also perform one or more optimizations when generating the application based on the source code.
Claims18
A method, comprising:
- analyzing, by a processing device, source code associated with an application;
- determining, in view of the analysis, that a class defined by the source code will be instantiated, wherein the class is instantiated at most once, and wherein the determining is performed during a linking phase of a generation of the application, the generation of the application comprising a compiling phase, an assembling phase, and the linking phase;
- and
- converting, by the processing device, the class to a singleton class.
1 more element
An apparatus, comprising;
- a memory to store source code associated with an application;
- a processing device, operatively coupled to the memory, the processing device to:
- analyze the source code;
- determine, in view of the analysis, that a class defined by the source code will be instantiated, wherein the class is instantiated at most once, and wherein the determination is performed during a linking phase of a generation of the application, the generation of the application comprising a compiling phase, an assembling phase, and the linking phase;
- and
- convert the class to a singleton class.
3 more elements
A non-transitory computer readable storage medium comprising instructions that, when executed by a processing device, cause the processing device to:
- analyze source code associated with an application;
- determine, in view of the analysis, that a class defined by the source code will be instantiated, wherein the class is instantiated at most once, and wherein the determination is performed during a linking phase of a generation of the application, the generation of the application comprising a compiling phase, an assembling phase, and the linking phase;
- and
- convert the class to a singleton class.
1 more element
Dependencies are inferred from the claim text.