--- /dev/null
+/*\r
+\r
+ Derby - Class org.apache.derby.iapi.services.loader.ClassFactory\r
+\r
+ Licensed to the Apache Software Foundation (ASF) under one or more\r
+ contributor license agreements. See the NOTICE file distributed with\r
+ this work for additional information regarding copyright ownership.\r
+ The ASF licenses this file to you under the Apache License, Version 2.0\r
+ (the "License"); you may not use this file except in compliance with\r
+ the License. You may obtain a copy of the License at\r
+\r
+ http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+ Unless required by applicable law or agreed to in writing, software\r
+ distributed under the License is distributed on an "AS IS" BASIS,\r
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ See the License for the specific language governing permissions and\r
+ limitations under the License.\r
+\r
+ */\r
+\r
+package org.apache.derby.iapi.services.loader;\r
+\r
+import org.apache.derby.iapi.error.StandardException;\r
+\r
+import org.apache.derby.iapi.util.ByteArray;\r
+\r
+import java.io.ObjectStreamClass;\r
+\r
+\r
+/**\r
+ A class factory module to handle application classes\r
+ and generated classes.\r
+*/\r
+\r
+public interface ClassFactory {\r
+\r
+ /**\r
+ Add a generated class to the class manager's class repository.\r
+\r
+ @exception StandardException Standard Derby error policy\r
+\r
+ */\r
+ public GeneratedClass loadGeneratedClass(String fullyQualifiedName, ByteArray classDump)\r
+ throws StandardException;\r
+\r
+ /**\r
+ Return a ClassInspector object\r
+ */\r
+ public ClassInspector getClassInspector();\r
+\r
+ /**\r
+ Load an application class, or a class that is potentially an application class.\r
+\r
+ @exception ClassNotFoundException Class cannot be found, or\r
+ a SecurityException or LinkageException was thrown loading the class.\r
+ */\r
+ public Class loadApplicationClass(String className)\r
+ throws ClassNotFoundException;\r
+\r
+ /**\r
+ Load an application class, or a class that is potentially an application class.\r
+\r
+ @exception ClassNotFoundException Class cannot be found, or\r
+ a SecurityException or LinkageException was thrown loading the class.\r
+ */\r
+ public Class loadApplicationClass(ObjectStreamClass classDescriptor)\r
+ throws ClassNotFoundException;\r
+\r
+ /**\r
+ Was the passed in class loaded by a ClassManager.\r
+\r
+ @return true if the class was loaded by a Derby class manager,\r
+ false it is was loaded by the system class loader, or another class loader.\r
+ */\r
+ public boolean isApplicationClass(Class theClass);\r
+\r
+ /**\r
+ Notify the class manager that a jar file has been modified.\r
+ @param reload Restart any attached class loader\r
+\r
+ @exception StandardException thrown on error\r
+ */\r
+ public void notifyModifyJar(boolean reload) throws StandardException ;\r
+\r
+ /**\r
+ Notify the class manager that the classpath has been modified.\r
+\r
+ @exception StandardException thrown on error\r
+ */\r
+ public void notifyModifyClasspath(String classpath) throws StandardException ;\r
+\r
+ /**\r
+ Return the in-memory "version" of the class manager. The version\r
+ is bumped everytime the classes are re-loaded.\r
+ */\r
+ public int getClassLoaderVersion();\r
+}\r