Examples of VmClassLoader


Examples of org.jnode.vm.classmgr.VmClassLoader

            byteCodeVisitorHolder.remove();
            byteCodeVisitor.reset(os, cm, isBootstrap, entryPoints, getMagicHelper(), getTypeSizeInfo());
        }
        cbv = byteCodeVisitor;
        if (inlineMethods) {
            final VmClassLoader loader = method.getDeclaringClass().getLoader();
            return new OptimizingBytecodeVisitor(entryPoints, cbv, loader);
        } else {
            return cbv;
        }
    }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmClassLoader

                                                            boolean isBootstrap) {
        final InlineBytecodeVisitor cbv;
        final EntryPoints entryPoints = getEntryPoints();
        cbv = new X86BytecodeVisitor(os, cm, isBootstrap, entryPoints, magicHelper, getTypeSizeInfo());
        if (inlineMethods /*&& ((X86Assembler)os).isCode32()*/) {
            final VmClassLoader loader = method.getDeclaringClass().getLoader();
            return new OptimizingBytecodeVisitor(entryPoints, cbv, loader);
        } else {
            return cbv;
        }
    }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmClassLoader

            .getStackReader();
        final VmSystemClassLoader systemLoader = VmSystem.systemLoader;
        Address f = VmMagic.getCurrentFrame();
        while (reader.isValid(f)) {
            final VmMethod method = reader.getMethod(f);
            final VmClassLoader loader = method.getDeclaringClass().getLoader();
            if ((loader != null) && (loader != systemLoader)) {
                return loader;
            } else {
                f = reader.getPrevious(f);
            }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmClassLoader

            final ClassLoader cl = reqDescr.getPluginClassLoader();
            if (cl instanceof PluginClassLoaderImpl) {
                preLoaders[i] = (PluginClassLoaderImpl) cl;
            }
        }
        final VmClassLoader currentVmClassLoader = this.vmClassLoader;
        final PrivilegedAction<Object[]> a = new PrivilegedAction<Object[]>() {
            public Object[] run() {
                if (currentVmClassLoader != null) {
                    PluginClassLoaderImpl cl = new PluginClassLoaderImpl(
                        currentVmClassLoader, registry,
View Full Code Here

Examples of org.jnode.vm.classmgr.VmClassLoader

            VmType<?> vmClass = methodRef.getConstClass()
                .getResolvedVmClass();
            vmClass.link();

            // NEW
            VmClassLoader curLoader = currentMethod.getDeclaringClass()
                .getLoader();
            methodRef.resolve(curLoader);
            return methodRef.getResolvedVmMethod();
            // END NEW
            /*
 
View Full Code Here

Examples of org.jnode.vm.classmgr.VmClassLoader

    @PrivilegedActionPragma
    public static VmType resolveClass(VmConstClass classRef) {
        if (classRef.isResolved()) {
            return classRef.getResolvedVmClass();
        } else {
            VmClassLoader curLoader = VmSystem.getContextClassLoader();
            String cname = classRef.getClassName();
            try {
                Class<?> cls = curLoader.asClassLoader().loadClass(cname);
                VmType<?> vmClass = VmType.fromClass(cls);

                /*
                 * VmClass vmClass = curLoader.loadClass(cname, true); //VmClass
                 * vmClass = Main.getBootClass(classRef); if (vmClass == null) {
View Full Code Here

Examples of org.jnode.vm.classmgr.VmClassLoader

        if (!((VmClassLoader)vmClassLoader).isSystemClassLoader()) {
            throw new IllegalArgumentException("vmClassLoader must be system classloader");
        }
    }
    private static void checkArgs0(Object vmClassLoader) {
        VmClassLoader vmcl = (VmClassLoader) vmClassLoader;
        SecurityManager sm = System.getSecurityManager();
        if (sm != null) {
            sm.checkCreateClassLoader();
            sm.checkPermission(new JNodePermission("wrapVmClassLoader"));
        }
        if (vmClassLoader == null) {
            throw new IllegalArgumentException("vmClassLoader cannot be null");
        }
        if (vmcl.isSystemClassLoader()) {
            throw new IllegalArgumentException("vmClassLoader must not be system classloader");
        }
    }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmClassLoader

        if(debug())
            System.out.println("NativeVMVirtualMachine.redefineClass()");

        String name = oldClass.getName();
        VmType old_type = VmType.fromClass(oldClass);
        VmClassLoader loader = VmType.fromClass(oldClass).getLoader();
        ProtectionDomain pd = oldClass.getProtectionDomain();
        VmType new_type = ClassDecoder.defineClass(name, ByteBuffer.wrap(classData), false, loader, pd);
        for(int i = 0; i < old_type.getNoDeclaredMethods(); i++){
            VmMethod old_method = old_type.getDeclaredMethod(i);
            if (!old_method.isNative()) {
View Full Code Here

Examples of org.jnode.vm.classmgr.VmClassLoader

   
    /**
     * @see java.lang.Class#getClassLoader0()
     */
    private static ClassLoader getClassLoader0(Class<?> instance) {
        VmClassLoader loader = VmType.fromClass(instance).getLoader();
        return loader.isSystemClassLoader() ? null : loader.asClassLoader();
    }
View Full Code Here

Examples of org.jnode.vm.classmgr.VmClassLoader

            });

        final String arrClsName = vmClass.getArrayClassName();
        final VmType<?> arrCls;
        try {
            final VmClassLoader curLoader = vmClass.getLoader();
            arrCls = curLoader.loadClass(arrClsName, true);
            if (arrCls == null) {
                throw new NoClassDefFoundError(arrClsName);
            }
        } catch (ClassNotFoundException ex) {
            throw new NoClassDefFoundError(arrClsName);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.