/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This source file is part of SableVM classlib-stubs. * * * * See the file "LICENSE" for the copyright information and for * * the terms and conditions for copying, distribution and * * modification of this source file. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ package java.lang; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.nio.ByteBuffer; import java.security.ProtectionDomain; import java.util.Enumeration; import org.sablevm.annotations.ImplementedInVM; public abstract class ClassLoader extends Object { protected ClassLoader(ClassLoader parent) { } protected ClassLoader() { } @ImplementedInVM native public Class loadClass(String name) throws ClassNotFoundException; @ImplementedInVM native protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException; @ImplementedInVM native protected Class findClass(String name) throws ClassNotFoundException; @Deprecated @ImplementedInVM native protected final Class defineClass(byte[] b, int off, int len) throws ClassFormatError; @ImplementedInVM native protected final Class defineClass(String name, byte[] b, int off, int len) throws ClassFormatError; @ImplementedInVM native protected final Class defineClass(String name, byte[] b, int off, int len, ProtectionDomain protectionDomain) throws ClassFormatError; @ImplementedInVM native protected final Class defineClass(String name, ByteBuffer b, ProtectionDomain protectionDomain) throws ClassFormatError; @ImplementedInVM native protected final void resolveClass(Class c); @ImplementedInVM native protected final Class findSystemClass(String name) throws ClassNotFoundException; @ImplementedInVM native protected final Class findLoadedClass(String name); @ImplementedInVM native protected final void setSigners(Class c, Object[] signers); @ImplementedInVM native public URL getResource(String name); @ImplementedInVM native public Enumeration getResources(String name) throws IOException; @ImplementedInVM native protected URL findResource(String name); @ImplementedInVM native protected Enumeration findResources(String name) throws IOException; @ImplementedInVM native public static URL getSystemResource(String name); @ImplementedInVM native public static Enumeration getSystemResources(String name) throws IOException; @ImplementedInVM native public InputStream getResourceAsStream(String name); @ImplementedInVM native public static InputStream getSystemResourceAsStream(String name); @ImplementedInVM native public final ClassLoader getParent(); @ImplementedInVM native public static ClassLoader getSystemClassLoader(); @ImplementedInVM native protected Package definePackage(String name, String specTitle, String specVersion, String specVendor, String implTitle, String implVersion, String implVendor, URL sealBase) throws IllegalArgumentException; @ImplementedInVM native protected Package getPackage(String name); @ImplementedInVM native protected Package[] getPackages(); @ImplementedInVM native protected String findLibrary(String libname); @ImplementedInVM native public void setDefaultAssertionStatus(boolean enabled); @ImplementedInVM native public void setPackageAssertionStatus(String packageName, boolean enabled); @ImplementedInVM native public void setClassAssertionStatus(String className, boolean enabled); @ImplementedInVM native public void clearAssertionStatus(); }