Examples of ClassPath


Examples of co.cask.cdap.common.internal.guava.ClassPath

          if (!classPathSeen.add(classPathUrl)) {
            return true;
          }

          try {
            ClassPath classPath = ClassPath.from(classPathUrl.toURI(), ClassLoader.getSystemClassLoader());
            for (ClassPath.ResourceInfo resourceInfo : classPath.getResources()) {
              result.add(resourceInfo.getResourceName());
            }
          } catch (Exception e) {
            // If fail to get classes/resources from the classpath, ignore this classpath.
          }
View Full Code Here

Examples of co.cask.tigon.internal.guava.ClassPath

          if (!classPathSeen.add(classPathUrl)) {
            return true;
          }

          try {
            ClassPath classPath = ClassPath.from(classPathUrl.toURI(), ClassLoader.getSystemClassLoader());
            for (ClassPath.ResourceInfo resourceInfo : classPath.getResources()) {
              result.add(resourceInfo.getResourceName());
            }
          } catch (Exception e) {
            // If fail to get classes/resources from the classpath, ignore this classpath.
          }
View Full Code Here

Examples of com.alphacsp.cit.path.ClassPath

        }

        Properties properties = loadMavenProperties();

        javaLauncher.setMainClass(getMainClassName());
        ClassPath classpath = new ClassPath();
        File classworldsJar;
        classworldsJar = getClassworldsJar();
        classpath.addPathElement(classworldsJar.getAbsolutePath());
        javaLauncher.setClasspath(classpath);
        File localRepo = getLocalRepository();
        if (localRepo != null && localRepo.exists()) {
            addMavenOpts("maven.repo.local", localRepo.getAbsolutePath());
        }
View Full Code Here

Examples of com.cedarsoft.codegen.parser.Classpath

    return new File( testResources.get( 0 ).getDirectory() );
  }

  @NotNull
  protected Classpath buildClassPath() throws MojoExecutionException {
    Classpath classpath = new Classpath();

    try {
      for ( String classpathElement : getCompileClasspathElements() ) {
        File element = new File( classpathElement );
        getLog().debug( "Adding classpath element: " + element.getAbsolutePath() );
        classpath.add( element );
      }
    } catch ( DependencyResolutionRequiredException e ) {
      throw new MojoExecutionException( e.getMessage(), e );
    }
View Full Code Here

Examples of com.cloudera.cdk.morphline.shaded.com.google.common.reflect.ClassPath

   * of guava without issues.
   */
  <T> Collection<Class<T>> getTopLevelClasses(Iterable<String> importSpecs, Class<T> iface) {   
    HashMap<String,Class<T>> classes = new LinkedHashMap();
    for (ClassLoader loader : getClassLoaders()) {
      ClassPath classPath;
      try {
        classPath = ClassPath.from(loader);
      } catch (IOException e) {
        continue;
      }
      for (String importSpec : importSpecs) {
        Set<ClassInfo> classInfos = null;
        if (importSpec.endsWith(".**")) {
          String packageName = importSpec.substring(0, importSpec.length() - ".**".length());
          classInfos = classPath.getTopLevelClassesRecursive(packageName);
        } else if (importSpec.endsWith(".*")) {
          String packageName = importSpec.substring(0, importSpec.length() - ".*".length());
          classInfos = classPath.getTopLevelClasses(packageName);
        } else { // importSpec is assumed to be a fully qualified class name
          Class clazz;
          try {
            //clazz = Class.forName(importSpec, true, loader);
            clazz = loader.loadClass(importSpec);
View Full Code Here

Examples of com.dhemery.runtimesuite.internal.Classpath

  @Override
  public Collection<Class<?>> find() {
    log.trace("> find()");
    Set<Class<?>> testClasses = new HashSet<Class<?>>();
    for(String path : classpathList.split(File.pathSeparator)) {
      Classpath classpath = new Classpath(path);
      testClasses.addAll(classpath.classes(withTestMethods));
    }
    return testClasses;
  }
View Full Code Here

Examples of com.google.classpath.ClassPath

  private SourceReportGenerator report;
  private MetricComputer computer;

  protected void setUp() throws Exception {
    super.setUp();
    ClassPath classPath =
        new ClassPathFactory().createFromPaths("src/test/java", "core/src/test/java");
    SourceLoader loader = new SourceLoader(classPath);
    report = new SourceReportGenerator(new GradeCategories(0, 0), loader, null, new CostModel(),
            new Date(), 10, new Configuration());
    computer = new MetricComputer(new JavaClassRepository(), null,
View Full Code Here

Examples of com.google.classpath.ClassPath

    String[] classPaths = getClassPaths(javaProject, projectLocation);

    List<String> allJavaPackages = javaProjectHelper.getAllJavaPackages(javaProject);

    ClassPathFactory classPathFactory = new ClassPathFactory();
    ClassPath classPath = classPathFactory.createFromPaths(classPaths);

    IPath pluginStateLocation = Activator.getDefault().getStateLocation();
    String baseReportDirectoryString =
      configuration.getAttribute(TestabilityConstants.CONFIGURATION_ATTR_REPORT_FOLDER_NAME, "");
    if ("".equals(baseReportDirectoryString)) {
View Full Code Here

Examples of com.google.classpath.ClassPath

    assertTrue(err.toString().startsWith("WARNING: can not analyze class "));
  }


  private JavaTestabilityRunner runnerFor(String path) {
    ClassPath classPath = new ClassPathFactory().createFromPaths(path, "core/" + path);
    ClassRepository classRepository = new JavaClassRepository(classPath);
    MetricComputer computer = new MetricComputer(classRepository, errStream, whiteList, 0);
    return new JavaTestabilityRunner(report, classPath, classRepository, computer,
        allEntryList, whiteList, new PrintStream(err));
  }
View Full Code Here

Examples of com.google.common.reflect.ClassPath

  private ArrayList<Class> blockClasses = new ArrayList<Class>();
  private HashMap<Class, ArrayList<Block>> blockRegistry = new HashMap<Class, ArrayList<Block>>();

  public void registerClasses() {
    try {
      ClassPath classPath = ClassPath.from(this.getClass().getClassLoader());
      for (ClassPath.ClassInfo classInfo : classPath.getTopLevelClassesRecursive("thaumic.tinkerer.common.block")) {
        if (ITTinkererBlock.class.isAssignableFrom(classInfo.load()) && !Modifier.isAbstract(classInfo.load().getModifiers())) {
          blockClasses.add(classInfo.load());
        }
      }
      for (ClassPath.ClassInfo classInfo : classPath.getTopLevelClassesRecursive("thaumic.tinkerer.common.item")) {
        if (ITTinkererItem.class.isAssignableFrom(classInfo.load()) && !ItemBlock.class.isAssignableFrom(classInfo.load()) && !Modifier.isAbstract(classInfo.load().getModifiers())) {
          itemClasses.add(classInfo.load());
        }
      }
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.