UDK 3.2.0 Java API Reference

com.sun.star.lib.unoloader
クラス UnoClassLoader

java.lang.Object
  拡張java.lang.ClassLoader
      拡張java.security.SecureClassLoader
          拡張java.net.URLClassLoader
              拡張com.sun.star.lib.unoloader.UnoClassLoader

public final class UnoClassLoader
extends URLClassLoader

The root UNO class loader.

This class loader is able to load all published URE classes, including the classes representing the published URE UNO types. For consistency, it is important that within each Java UNO environment there is one instance of this class loader that is the defining class loader of all published URE classes (and hence of all unpublished URE classes, too) and of all classes representing UNO types (the published URE UNO types, any unpublished URE UNO types, and any additional UNO types introduced by components; for the latter, URLClassLoader.addURL(java.net.URL) may be necessary).

This is an internal, unstable class of the Uno Runtime Environment; it should not be used by client code.

導入されたバージョン:
UDK 3.2.1

コンストラクタの概要
UnoClassLoader(URL base, ClassLoader parent)
          Instantiates the root UNO class loader.
 
メソッドの概要
 void execute(URL jar, String[] arguments)
          Executes a UNO JAR.
 ClassLoader getClassLoader(URL jar, Attributes mainAttributes)
          Obtains a class loader for a UNO JAR.
static Attributes getJarMainAttributes(URL jar)
          Obtains the main section of the manifest of a JAR.
 
クラス java.net.URLClassLoader から継承したメソッド
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
 
クラス java.security.SecureClassLoader から継承したメソッド
defineClass
 
クラス java.lang.ClassLoader から継承したメソッド
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

UnoClassLoader

public UnoClassLoader(URL base,
                      ClassLoader parent)
               throws MalformedURLException
Instantiates the root UNO class loader.

パラメータ:
base - a base URL relative to which the URE JARs (java_uno.jar, juh.jar, jurt.jar, ridl.jar) can be found; must not be null.
parent - the parent class loader for delegation.
例外:
MalformedURLException - if the given base URL is malformed.
メソッドの詳細

getClassLoader

public ClassLoader getClassLoader(URL jar,
                                  Attributes mainAttributes)
                           throws MalformedURLException
Obtains a class loader for a UNO JAR.

パラメータ:
jar - the URL of a UNO JAR; must not be null.
mainAttributes - represents the main section of the manifest of the given JAR jar; null if the given JAR does not have a manifest. (This redundant parameter is there for performance reasons, as typically the caller of this method already has this information available.)
戻り値:
an appropriate class loader; will never be null.
例外:
MalformedURLException - if the given jar URL or any of the UNO-Type-Path URLs specified in the given JAR are malformed.

execute

public void execute(URL jar,
                    String[] arguments)
             throws IOException,
                    ClassNotFoundException,
                    NoSuchMethodException,
                    InvocationTargetException
Executes a UNO JAR.

パラメータ:
jar - the URL of a UNO JAR that specifies a Main-Class; must not be null.
arguments - any arguments passed to the main method of the specified Main-Class of the given JAR jar; must not be null.
例外:
IOException - if there are any problems processing the given JAR jar.
ClassNotFoundException - if the given JAR jar does not specify a Main-Class, or if the specified Main-Class cannot be found.
NoSuchMethodException - if the specified Main-Class of the given JAR jar does not have an appropriate main method.
InvocationTargetException - if an exception occurs while executing the main method of the specified Main-Class of the given JAR jar.

getJarMainAttributes

public static Attributes getJarMainAttributes(URL jar)
                                       throws IOException
Obtains the main section of the manifest of a JAR.

パラメータ:
jar - the URL of a JAR; must not be null.
戻り値:
the representation of the main section of the manifest of the given JAR jar, or null if the given JAR does not have a manifest.
例外:
IOException - if there are any problems processing the given JAR jar.

UDK 3.2.0 Java API Reference