摘要:
A system and method for providing a filtering classloader within a Java-based or other application environment. In one embodiment, a filtering classloader is placed between two other classloaders, e.g. between the system classloader and the application classloader. The filtering classloader is provided with a set of patterns which throw a “class not found exception” if an application makes a request for that class or package. The exception leads the application classloader to believe (perhaps correctly) that there is no class with that name in the system classloader. The application classloader then loads the class itself. The class may or may not exist in the system classloader; the filtering classloader in essence overrides any retrieval from that classloader in favor of the application classloader, for certain specified patterns of request.
摘要:
A system and method for providing a filtering classloader within a Java-based or other application environment. In one embodiment, a filtering classloader is placed between two other classloaders, e.g. between the system classloader and the application classloader. The filtering classloader is provided with a set of patterns which throw a “class not found exception” if an application makes a request for that class or package. The exception leads the application classloader to believe (perhaps correctly) that there is no class with that name in the system classloader. The application classloader then loads the class itself. The class may or may not exist in the system classloader; the filtering classloader in essence overrides any retrieval from that classloader in favor of the application classloader, for certain specified patterns of request.
摘要:
Disclosed herein is a system and method for dynamically redefining class files in a Java-based development environment. The existing development cycle in Java generally requires developers to edit, build, and deploy before they can test changes to the code. This process can be quite time consuming. There is a need for dynamically redefining and testing class files in a development environment without a significant time delay or loss of data. In one embodiment, when a developer modifies the class definition a ClassFileTransformer function is used to maintain the original shape of a redefinable class, i.e. its declared fields and methods, without affecting the redefined class' behavior or appearance to outside code.
摘要:
Disclosed herein is a system and method for dynamically redefining class files in a Java-based development environment. The existing development cycle in Java generally requires developers to edit, build, and deploy before they can test changes to the code. This process can be quite time consuming. There is a need for dynamically redefining and testing class files in a development environment without a significant time delay or loss of data. In one embodiment, when a developer modifies the class definition a ClassFileTransformer function is used to maintain the original shape of a redefinable class, i.e. its declared fields and methods, without affecting the redefined class' behavior or appearance to outside code.