Package net.sourceforge.javautil.classloader.source

Examples of net.sourceforge.javautil.classloader.source.ZipClassSource


  /**
   * @return A special internal classloader for loading the MXJ classes
   */
  protected static ClassLoader createMysqlMXJClassLoader (IVirtualFile mxjJar, IVirtualFile mxjDbFileJar) {
    return new ClassContext(new StandardClassLoaderHeiarchy(),
      new ZipClassSource(mxjJar.getURL()),
      new ZipClassSource(mxjDbFileJar.getURL())
    );
  }
View Full Code Here


     
      File mainFile = new File(main);
      if (!mainFile.exists())
        printHelp("Specified main jar does not exist: " + mainFile);
     
      mainSource.add( new ZipClassSource(mainFile) );
      context = new ClassContext(new StandardClassLoaderHeiarchy(Thread.currentThread().getContextClassLoader()), mainSource);
    }
   
    Thread.currentThread().setContextClassLoader(context);
    this.setupDefaultURLStreamHandlerFactory(context);
View Full Code Here

   * @return A valid class source for the given artifact
   */
  protected ClassSource getClassSource (IClassPackageReference reference, IVirtualArtifact artifact) {
    if (artifact instanceof IVirtualFile) {
      if (artifact instanceof SystemFile && ArchiveUtil.isArchive((IVirtualFile)artifact));
        return new ZipClassSource( ((SystemFile)artifact).getRealArtifact() );
    } else if (artifact instanceof IVirtualDirectory) {
      VirtualDirectoryClassSource cs = new VirtualDirectoryClassSource( (IVirtualDirectory) artifact );
      cs.setManifest( ClassPackageUtil.createVirtualManifest(reference) );
      return cs;
    }
View Full Code Here

    if (ctx.getCurrentDependency().isSystemReference()) {
      ISystemArtifact artifact = ctx.getCurrentDependency().getSystemArtifact();
     
      ctx.setAvailable(this, null, artifact instanceof SystemDirectory ?
          new VirtualDirectoryClassSource((IVirtualDirectory)artifact) :
            new ZipClassSource(artifact.getRealArtifact()), ctx.getCurrentDependency().getSystemDescriptor());
     
      return ctx;
    }
   
    if (!this.resolveInternally(ctx)) {
View Full Code Here

TOP

Related Classes of net.sourceforge.javautil.classloader.source.ZipClassSource

Copyright © 2018 www.massapicom. 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.