首页>
外国专利>
Refactor exception class hierarchy for reduced footprint and faster application start
Refactor exception class hierarchy for reduced footprint and faster application start
展开▼
机译:重构异常类层次结构以减少占用空间并加快应用程序启动
展开▼
页面导航
摘要
著录项
相似文献
摘要
A method, system, and program product for removing exception classes that match a pattern is disclosed. Exception classes are searched for those of the exception classes that match that pattern. The parent classes of matched exception classes are refactored to accept an exception type argument. Code that throws the matched exceptions is rewritten by replacing the exception class with the parent class and adding a corresponding exception type. Code that catches the thrown exceptions is rewritten by changing a catch clause to catch a parent exception class and inserting a case statement for the exception type in that catch clause. The matched exception classes are removed.
展开▼