Package net.sourceforge.javautil.classloader.resolver.impl

Examples of net.sourceforge.javautil.classloader.resolver.impl.ClassDependencyPoolImpl


  public IClassDependencyPool createPool(String name, PoolScope scope, IClassDependencyPool parent, IClassPackageDependencyReference... references) {
    return this.append(parent.createChild(name, scope), references);
  }

  public IClassDependencyPool createPool(String name, IClassPackageDependencyReference... references) {
    return this.append(new ClassDependencyPoolImpl(name), references);
  }
View Full Code Here


   * @param reference The reference to resolve and/or find
   * @param primary True if this reference is a primary reference
   * @return The {@link IClassPackage} corresponding to the reference if it could be found/resolved, otherwise null
   */
  public static IClassPackage get (IClassPackageResolver resolver, IClassPackageDependencyReference reference, boolean primary) {
    ClassDependencyPoolImpl pool = new ClassDependencyPoolImpl("Lookup Temporary: " + reference);
    append(pool, resolver, primary, reference);
   
    for (
      IClassPackageDescriptor desc = resolver.getImportableRepository().getDescriptor(resolver, reference);
      desc != null && desc.getRelocation() != null;
      desc = resolver.getImportableRepository().getDescriptor(resolver, reference)
    ) {
      reference = new ClassPackageDependencyReferenceImpl(ClassPackageReferenceImpl.getRelocation(reference, desc.getRelocation()));
    }
   
    for (IClassPackage pkg : pool.getPackages(true)) {
      if (pkg.compareTo(reference) == 0) return pkg;
    }
    return null;
  }
View Full Code Here

        pool = ClassPackageContext.getDependencyPool().createChild(name, scope);
      }
     
      return pool;
    } else {
      return parent == null ? new ClassDependencyPoolImpl(name) : (ClassDependencyPoolImpl) parent.createChild(name, scope);
    }
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.javautil.classloader.resolver.impl.ClassDependencyPoolImpl

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.