Package net.sourceforge.javautil.classloader.source

Examples of net.sourceforge.javautil.classloader.source.VirtualDirectoryClassSource$ClassFileVisitor


  protected void initialize () {
    IVirtualDirectory webInf = this.ctx.getApplication().getRoot().getDirectory("WEB-INF");
   
    if (webInf != null) {
      IVirtualDirectory classes = webInf.getDirectory("classes");
      if (classes != null) this.nonPackageResources.add( new VirtualDirectoryClassSource(classes) );
     
      IVirtualDirectory lib = webInf.getDirectory("lib");
      if (lib != null) this.nonPackageResources.add(new LibDirectoryClassSource(lib, false));
    }
  }
View Full Code Here


  }

  public static void addProjectMainTarget (CompositeClassSource ccs, ProjectObjectModel model, IVirtualDirectory root) {
    try {
      IVirtualDirectory dir = root.getDirectory( new SimplePath(model.getCompileDirectoryOrDefault()) );
      ccs.add(new VirtualDirectoryClassSource(dir));
    } catch (VirtualArtifactNotFoundException e) {
    }
  }
View Full Code Here

  }
 
  public static void addProjectTestTarget (CompositeClassSource ccs, ProjectObjectModel model, IVirtualDirectory root) {
    try{
      IVirtualDirectory dir = root.getDirectory( new SimplePath(model.getCompileTestsDirectoryOrDefault()) );
      ccs.add(new VirtualDirectoryClassSource(dir));
    } catch (VirtualArtifactNotFoundException e) {
    }
  }
View Full Code Here

  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;
    }
    throw new IllegalArgumentException("Cannot create class source from: " + artifact);
  }
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;
    }
   
View Full Code Here

TOP

Related Classes of net.sourceforge.javautil.classloader.source.VirtualDirectoryClassSource$ClassFileVisitor

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.