Examples of loadClass()


Examples of alt.jiapi.reflect.Loader.loadClass()

        Instrumentor createMethod =
            new CreateMethodInstrumentor(Modifier.PUBLIC + Modifier.STATIC,
                                         "bar");

        Loader loader = ctx.getLoader();
        JiapiClass sourceClass = loader.loadClass("test.Bar");
        JiapiMethod sourceMethod =
            sourceClass.getDeclaredMethod("bar", new String[0]);

        Instrumentor copyMethod
            = new CopyInstrumentor(sourceMethod.getInstructionList());
View Full Code Here

Examples of anvil.server.ZoneClassLoader.loadClass()

  private CompiledModule doLoadClass()
  {
    String classname = getClassname();
    try {
      ZoneClassLoader clsldr = _address.getZone().getClassLoader();
      Class cls = clsldr.loadClass(classname);
      CompiledModule script = (CompiledModule)cls.newInstance();
      classname   = cls.getName();
      _descriptor = classname.replace('.', '/');
      _version    = script.getVersion();
      script.init(_address);
View Full Code Here

Examples of barrysoft.utils.JarClassLoader.loadClass()

        throw new FileNotFoundException("Can't find jar file for plugin: "+
            jarFile.getAbsolutePath());
     
      JarClassLoader loader = new JarClassLoader(jarFile.getAbsolutePath());
     
      pluginClass = loader.loadClass(infos.getJarClass());
     
    } else {
     
      pluginClass = getClass().getClassLoader().
              loadClass(infos.getJarClass());
View Full Code Here

Examples of be.pw999.jape.classloader.JaPeClassLoader.loadClass()

        for (int k = 0; k < Settings.TEST_REPEAT; ++k) {
            try {
                JaPeClassLoader classLoader = new JaPeClassLoader(log.getClass().getClassLoader(), new URL[]{new File("./").toURI().toURL()});
                {
                    Class<?> runnerClazz = classLoader.loadClass("be.pw999.jape.TestRunner");
                    Class<?> settingsClass = classLoader.loadClass("be.pw999.jape.constants.Settings");
                    settingsClass.getDeclaredField("LIST_SIZE").setInt(null, Settings.LIST_SIZE * Double.valueOf(Math.pow(4.0, k)).intValue());

                    Object runner = runnerClazz.newInstance();
                    Method m = runnerClazz.getMethod("run");
View Full Code Here

Examples of cn.bran.japid.rendererloader.TemplateClassLoader.loadClass()

    ClassLoader cl = _parentClassLoader == null ? JapidRenderer.class.getClassLoader() : _parentClassLoader;
    // do I need to new instance of TemplateClassLoader for each invocation?
    // likely...
    TemplateClassLoader classReloader = new TemplateClassLoader(cl);
    try {
      Class<JapidTemplateBaseWithoutPlay> loadClass = (Class<JapidTemplateBaseWithoutPlay>) classReloader
          .loadClass(rc.getClassName());
      rc.setClz(loadClass);
      return loadClass;
    } catch (ClassNotFoundException e) {
      throw new RuntimeException(e);
View Full Code Here

Examples of cn.wensiqun.asmsupport.loader.ClassModifierClassLoader.loadClass()

  @Override
  public Class<?> startup() {
    ClassModifierClassLoader loader = new ClassModifierClassLoader(this);
   
    try {
      loader.loadClass(productClass.getName());
     
      /*ClassReader nameRefactorReader = new ClassReader(loader.getModifiedClassBytes());
      ClassWriter ernameRefactorWrit = new ClassWriter(0);
      ClassNameRefactorAdapter nameRefactorAdapter = new ClassNameRefactorAdapter(ernameRefactorWrit);
      nameRefactorReader.accept(nameRefactorAdapter, 0);
View Full Code Here

Examples of co.cask.cdap.common.lang.jar.ProgramClassLoader.loadClass()

                                                                          ApiResourceListHolder.getResourceList(),
                                                                          this.getClass().getClassLoader());
      for (Map.Entry<String, String> moduleEntry : specification.getDatasetModules().entrySet()) {
        // note: using app class loader to load module class
        @SuppressWarnings("unchecked")
        Class<?> clazz = classLoader.loadClass(moduleEntry.getValue());
        String moduleName = moduleEntry.getKey();
        try {
          // note: we can deploy module or create module from Dataset class
          // note: it seems dangerous to instantiate dataset module here, but this will be fine when we move deploy into
          //       isolated user's environment (e.g. separate yarn container)
View Full Code Here

Examples of co.cask.cdap.internal.asm.ByteCodeClassLoader.loadClass()

        ClassDefinition classDefinition = new HttpHandlerGenerator().generate(key, pathPrefix);

        ClassLoader typeClassLoader = ClassLoaders.getClassLoader(key);
        ByteCodeClassLoader classLoader = new ByteCodeClassLoader(typeClassLoader);
        classLoader.addClass(classDefinition, key.getRawType());
        return classLoader.loadClass(classDefinition.getClassName());
      }
    });
  }

  /**
 
View Full Code Here

Examples of co.cask.tigon.lang.jar.ProgramClassLoader.loadClass()

  public Program createProgram(File jarPath, String classToLoad, File jarUnpackDir) throws Exception {
    expandJar(jarPath, jarUnpackDir);
    ProgramClassLoader classLoader = ClassLoaders.newProgramClassLoader(jarUnpackDir,
                                                                        ApiResourceListHolder.getResourceList());
    Class<?> clz = classLoader.loadClass(classToLoad);
    if (!(clz.newInstance() instanceof Flow)) {
      throw new Exception("Expected Flow class");
    }
    ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
    Thread.currentThread().setContextClassLoader(classLoader);
View Full Code Here

Examples of com.bj58.spat.gaea.server.deploy.hotdeploy.DynamicURLClassLoader.loadClass()

  public void hotDeploy() throws Exception {
   
    DynamicURLClassLoader classLoader = new DynamicURLClassLoader();
    classLoader.addURL("D:/serviceframe_v2_online/lib/serviceframe/serviceframe-2.0.1.beta.jar");
    classLoader.addFolder("D:/serviceframe_v2_online/service/deploy/imc/");
    Class<?> cmCls = classLoader.loadClass("com.bj58.sfft.serviceframe.deploy.bytecode.CreateManager");
   
    Method createProxy = cmCls.getDeclaredMethod("careteProxy", new Class[] { String.class });
    IProxyFactory pf = (IProxyFactory)createProxy.invoke(cmCls.newInstance(), "D:/serviceframe_v2_online/service/deploy/imc/");
    System.out.println("pf:" + pf);
  }
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.