Examples of JarLoader


Examples of appeng.recipes.loader.JarLoader

    ItemMultiMaterial.instance.makeUnique();

    if ( AEConfig.instance.isFeatureEnabled( AEFeature.CustomRecipes ) )
      recipeHandler.parseRecipes( new ConfigLoader( AppEng.instance.getConfigPath() ), "index.recipe" );
    else
      recipeHandler.parseRecipes( new JarLoader( "/assets/appliedenergistics2/recipes/" ), "index.recipe" );

    IPartHelper ph = AEApi.instance().partHelper();
    ph.registerNewLayer( "appeng.parts.layers.LayerISidedInventory", "net.minecraft.inventory.ISidedInventory" );
    ph.registerNewLayer( "appeng.parts.layers.LayerIFluidHandler", "net.minecraftforge.fluids.IFluidHandler" );
    ph.registerNewLayer( "appeng.parts.layers.LayerITileStorageMonitorable", "appeng.api.implementations.tiles.ITileStorageMonitorable" );
View Full Code Here

Examples of jarLoader.JarLoader

    button_control_ = new ButtonController(this);
    filter_control_ = new FilterMenuController(this);
    filter_menu_ = new FilterMenu("Filters");
    imgpan = null;
    tabpan_ = new JTabbedPane();
    loader_ = new JarLoader();
    this.getContentPane().add(tabpan_, BorderLayout.CENTER);

    this.setSize(800, 600);
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
View Full Code Here

Examples of net.laubenberger.bogatyr.misc.JarLoader

          final URL[] urls = new URL[cm.getJars().size()];
          for (int ii = 0; ii < cm.getJars().size(); ii++) {
            urls[ii] = new URL("file:" + file.getParent() + '/' + cm.getJars().get(ii)); //$NON-NLS-1$
          }

          final JarLoader jl = new JarLoader(urls);

          try {
              if (null != cm.getProperties()) {
//                  cm.setProperty(new PropertyImpl(jl.getResourceAsStream(cm.getProperties())));
                  cm.setProperty(new PropertyImpl(new File(file.getParent(), cm.getProperties())));
              }

              cm.setLocalizer(new LocalizerFile(cm.getLocalizerBase(), jl, new EncodingControl()));
            cm.getLocalizer().setLocale(data.getLanguage().getLocale());

            // read data for the module
            final File tmd = new File(data.getDirectoryData(), cm.getUUID() + FileType.DATA.getExtension());
            try {
              ModuleData md = new ModuleDataImpl();
              if (tmd.exists()) {
                md = HelperXml.deserialize(tmd, ModuleDataImpl.class);
              }
              final ModuleAbstract module = (ModuleAbstract) jl.createInstance(cm.getModuleClass(), HelperArray
                  .getArray(ModuleConfig.class, ModuleData.class, Callback.class, ScalableIcon.class,
                      File.class), HelperArray.getArray(cm, md, controller,
                  new ScalableIconImpl(cm.getLogo(), cm.getLogoLarge(), jl), data.getDirectoryDB())); // TODO
                                                                          // add
                                                                          // large
View Full Code Here

Examples of org.voltdb.utils.InMemoryJarfile.JarLoader

            // out fragments
            CatalogAndIds catalogStuff = null;
            try {
                catalogStuff = CatalogUtil.getCatalogFromZK(VoltDB.instance().getHostMessenger().getZK());
                InMemoryJarfile testjar = new InMemoryJarfile(catalogStuff.catalogBytes);
                JarLoader testjarloader = testjar.getLoader();
                for (String classname : testjarloader.getClassNames()) {
                    try {
                        Class.forName(classname, true, testjarloader);
                    }
                    // LinkageError catches most of the various class loading errors we'd
                    // care about here.
View Full Code Here

Examples of org.voltdb.utils.InMemoryJarfile.JarLoader

        // Add a class file that we know has inner classes
        // Someday this seems like it should be an operation directly on InMemoryJarfile
        VoltCompiler comp = new VoltCompiler();
        // This will pull in all the inner classes (currently 4 of them), but check anyway
        comp.addClassToJar(dut, org.voltdb_testprocs.updateclasses.InnerClassesTestProc.class);
        JarLoader loader = dut.getLoader();
        assertEquals(5, loader.getClassNames().size());
        System.out.println(loader.getClassNames());
        assertTrue(loader.getClassNames().contains("org.voltdb_testprocs.updateclasses.InnerClassesTestProc$InnerNotPublic"));
        assertTrue(dut.get("org/voltdb_testprocs/updateclasses/InnerClassesTestProc$InnerNotPublic.class") != null);

        // Now, remove the outer class and verify that all the inner classes go away.
        dut.removeClassFromJar("org.voltdb_testprocs.updateclasses.InnerClassesTestProc");
        assertTrue(loader.getClassNames().isEmpty());
        assertTrue(dut.get("org/voltdb_testprocs/updateclasses/InnerClassesTestProc$InnerNotPublic.class") == null);
    }
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.