Class OfficeClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.libreoffice.ide.eclipse.core.office.OfficeClassLoader
- All Implemented Interfaces:
Closeable,AutoCloseable
Special class loader to use to load OOo related classes.
This class loader is important to bootstrap LibreOffice.
-
Method Summary
Modifier and TypeMethodDescriptionstatic OfficeClassLoadergetClassLoader(IOOo ooo, ClassLoader parent) Create or load the classloader for the given LibreOffice instance.protected Class<?>Load a class in a different order than the standard one: first look in the URLs then call the parent's class loader loadClass method.Methods inherited from class java.net.URLClassLoader
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstanceMethods inherited from class java.security.SecureClassLoader
defineClass, defineClassMethods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
Method Details
-
getClassLoader
Create or load the classloader for the given LibreOffice instance.- Parameters:
ooo- the LibreOffice instance to loadparent- the parent classloader to use if the classloader has to be created.- Returns:
- the classloader corresponding to the LibreOffice instance
-
loadClass
Load a class in a different order than the standard one: first look in the URLs then call the parent's class loader loadClass method. This order is applied only if the class to load is in theorg.libreoffice.ide.eclipse.core.internal.officepackage.- Overrides:
loadClassin classClassLoader- Parameters:
name- the name of the class to loadresolve- iftruethen resolves the class- Returns:
- the loaded class
- Throws:
ClassNotFoundException- if the class cannot be found
-