Main ClassLoader for Java <-> Qore and Java <-> Python integration.
More...
Inherits URLClassLoader.
|
| | QoreURLClassLoader (ClassLoader parent) |
| | constructor for using this class as the boot classloader
|
| |
|
| QoreURLClassLoader () |
| | constructor for using this class as the boot classloader for the module
|
| |
|
| QoreURLClassLoader (long p_ptr) |
| | constructor for using this class as the boot classloader for the module
|
| |
|
| QoreURLClassLoader (long p_ptr, ClassLoader parent) |
| | constructor with a QoreProgram pointer and a parent
|
| |
|
| QoreURLClassLoader (String name, ClassLoader parent) |
| | constructor with a name and a parent
|
| |
| void | add (final String qualifiedClassName, final QoreJavaFileObject javaFile) |
| |
| Collection< QoreJavaFileObject > | files () |
| |
|
void | addPendingClass (String bin_name, byte[] byte_code) |
| | adds byte code for an inner class to the byte code cache; requires a binary name (ex: my.package.MyClass$1)
|
| |
| Class<?> | checkLoadedClass (String bin_name) |
| |
| Class<?> | loadClass (String bin_name) throws ClassNotFoundException |
| |
|
Class<?> | loadClassWithPtr (String bin_name, long class_ptr) throws ClassNotFoundException |
| | Returns the Java class from the given Qore class with a Qore class ptr.
|
| |
|
void | addParentPath (String classpath) |
| | Adds a path to the classpath.
|
| |
|
void | addPath (String classpath) |
| | Adds a path to the classpath.
|
| |
|
ArrayList< String > | getClassesInNamespace (String packageName) |
| | Returns a list of classes in the given dynamic package.
|
| |
| void | addWildcard (File dir, String nam) |
| |
| void | clearCompilationCache () |
| |
|
|
static boolean | isDynamic (String bin_name) |
| | Returns true if the given package name is dynamic.
|
| |
|
|
Class<?> | findClass (String bin_name) throws ClassNotFoundException |
| | Supports generating classes from byte code as well as returning classes built in to the jni module.
|
| |
Main ClassLoader for Java <-> Qore and Java <-> Python integration.
This ClassLoader supports dynamic imports from Qore and Java using the following special packages:
python.[path...]: indicates that the given path should be imported from Python to Java (after being imported to Qore if necessary).
pythonmod.mod.[path...]: indicates that the given path should be mapped to Qore namespaces and/or classes after loading the Python module mod and importing into Qore; the Java package segments after pythonmod.mod. are then converted to the equivalent Qore namespace path
qore: indicates that the given path should be mapped to Qore namespaces and/or classes; the Java package segments after qore. are then converted to the equivalent Qore namespace path
qoremod.mod.[path...]: indicates that the given path should be mapped to Qore namespaces and/or classes after loading the Qore module mod; the Java package segments after qoremod.mod. are then converted to the equivalent Qore namespace path
◆ QoreURLClassLoader()
| org.qore.jni.QoreURLClassLoader.QoreURLClassLoader |
( |
ClassLoader |
parent | ) |
|
|
inline |
constructor for using this class as the boot classloader
For example, starting Java like: java -cp xxx -Djava.system.class.loader=org.qore.jni.QoreURLClassLoader ... will result in this constructor being called
◆ add()
| void org.qore.jni.QoreURLClassLoader.add |
( |
final String |
qualifiedClassName, |
|
|
final QoreJavaFileObject |
javaFile |
|
) |
| |
|
inline |
Add a class name/JavaFileObject mapping
- Parameters
-
| qualifiedClassName | the name |
| javaFile | the file associated with the name |
◆ addWildcard()
| void org.qore.jni.QoreURLClassLoader.addWildcard |
( |
File |
dir, |
|
|
String |
nam |
|
) |
| |
|
inline |
Adds a set of files using a generic base name to this loader's classpath. See addClassPath(String) for details of the generic base name.
◆ checkLoadedClass()
| Class<?> org.qore.jni.QoreURLClassLoader.checkLoadedClass |
( |
String |
bin_name | ) |
|
|
inline |
Check if the class is loaded in this class loader or in the parent if it's a QoreURLClassLoader
- Parameters
-
| bin_name | the class to check |
- Returns
- the class if it's loaded
◆ clearCompilationCache()
| void org.qore.jni.QoreURLClassLoader.clearCompilationCache |
( |
| ) |
|
|
inline |
Clears the compilation cache after compiling
◆ files()
- Returns
- An collection of QoreJavaFileObject instances for the classes in the class loader.
◆ loadClass()
| Class<?> org.qore.jni.QoreURLClassLoader.loadClass |
( |
String |
bin_name | ) |
throws ClassNotFoundException |
|
inline |
Loads classes; returns pending classes injected by the jni module or the compiler
The documentation for this class was generated from the following file:
- /tmp/module-jni/src/java/org/qore/jni/QoreURLClassLoader.java