Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/apache/derby/iapi/services/loader/ClassFactory.java


1   /*
2   
3      Derby - Class org.apache.derby.iapi.services.loader.ClassFactory
4   
5      Copyright 1998, 2004 The Apache Software Foundation or its licensors, as applicable.
6   
7      Licensed under the Apache License, Version 2.0 (the "License");
8      you may not use this file except in compliance with the License.
9      You may obtain a copy of the License at
10  
11        http://www.apache.org/licenses/LICENSE-2.0
12  
13     Unless required by applicable law or agreed to in writing, software
14     distributed under the License is distributed on an "AS IS" BASIS,
15     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16     See the License for the specific language governing permissions and
17     limitations under the License.
18  
19   */
20  
21  package org.apache.derby.iapi.services.loader;
22  
23  import org.apache.derby.iapi.error.StandardException;
24  
25  import org.apache.derby.iapi.util.ByteArray;
26  
27  import java.io.ObjectStreamClass;
28  
29  
30  /**
31    A class factory module to handle application classes
32    and generated classes.
33  */
34  
35  public interface ClassFactory {
36  
37    /**
38      Add a generated class to the class manager's class repository.
39  
40      @exception   StandardException  Standard Cloudscape error policy
41  
42    */
43    public GeneratedClass loadGeneratedClass(String fullyQualifiedName, ByteArray classDump)
44      throws StandardException;
45  
46    /**
47      Return a ClassInspector object
48    */
49    public ClassInspector  getClassInspector();
50  
51    /**
52      Load an application class, or a class that is potentially an application class.
53  
54      @exception ClassNotFoundException Class cannot be found
55    */
56    public Class loadApplicationClass(String className)
57      throws ClassNotFoundException;
58  
59    /**
60      Load an application class, or a class that is potentially an application class.
61  
62      @exception ClassNotFoundException Class cannot be found
63    */
64    public Class loadApplicationClass(ObjectStreamClass classDescriptor)
65      throws ClassNotFoundException;
66  
67    /**
68      Was the passed in class loaded by a ClassManager.
69  
70      @return true if the class was loaded by a Cloudscape class manager,
71      false it is was loaded by the system class loader, or another class loader.
72    */
73    public boolean isApplicationClass(Class theClass);
74  
75    /**
76      Notify the class manager that a jar file has been modified.
77      @param reload Restart any attached class loader
78  
79      @exception StandardException thrown on error
80    */
81    public void notifyModifyJar(boolean reload) throws StandardException ;
82  
83    /**
84      Notify the class manager that the classpath has been modified.
85  
86      @exception StandardException thrown on error
87    */
88    public void notifyModifyClasspath(String classpath) throws StandardException ;
89  
90    /**
91      Return the in-memory "version" of the class manager. The version
92      is bumped everytime the classes are re-loaded.
93    */
94    public int getClassLoaderVersion();
95  }