摘要 |
An apparatus and method provide a cache for analyzed program information when no class file can be identified. If a class file can be identified, the analyzed program information is attached to the class file. If no class file can be identified, the analyzed program information is stored in a cache separate from any class file. When loading a class, the apparatus and method of the invention check to see if there is an identifiable class file for the class. If so, the class file is checked to see if there is analyzed program information attached to the class file. If so, the analyzed program information can be directly used without the overhead of analyzing the program information again. If there is no identifiable class file for the class, a cache is checked to see if there is an entry in the cache corresponding to the class. If there is no entry in the cache corresponding to the class, the program information is analyzed and saved in a cache entry for future use. If there is an entry in the cache corresponding to the class, the analyzed program information is retrieved and used, thereby saving the time required to repeatedly analyze the program information.
|