Package com.google.classpath

Examples of com.google.classpath.ClassPathFactory


  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,
            new RegExpWhiteList(), 1);
View Full Code Here


    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

    // We actually do this work in configure, since we want to bind the parsed command line
    // options at this time
    try {
      parser.parseArgument(args);
      config.validate();
      bind(ClassPath.class).toInstance(new ClassPathFactory().createFromPath(config.cp));
      bind(ReportFormat.class).toInstance(config.format);     
    } catch (CmdLineException e) {
      err.println(e.getMessage() + "\n");
      parser.setUsageWidth(120);
      parser.printUsage(err);
View Full Code Here

    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

    this.testabilityExplorerMojo = testabilityExplorerMojo;
  }

  @Override
  protected void configure() {
    bind(ClassPath.class).toInstance(new ClassPathFactory().createFromPath(
        testabilityExplorerMojo.mavenProject.getBuild().getOutputDirectory()));
    ReportOptions options = new ReportOptions(testabilityExplorerMojo.cyclomatic,
        testabilityExplorerMojo.global, testabilityExplorerMojo.constructor,
        testabilityExplorerMojo.maxExcellentCost,
        testabilityExplorerMojo.maxAcceptableCost,
View Full Code Here

    try {
      compileClasspathElements = mavenProject.getCompileClasspathElements();
    } catch (DependencyResolutionRequiredException e) {
      throw new RuntimeException(e);
    }
    return new ClassPathFactory().createFromPaths(
        compileClasspathElements.toArray(new String[compileClasspathElements.size()]));
  }
View Full Code Here

   
    Thread t = new Thread(new Runnable() {

      public void run() {
        try {
          factory = new ClassPathFactory();

          StringBuffer tehPath = new StringBuffer(System
              .getProperty("java.class.path"));
          if(Base.isMacOS()){
            // rt.jar equivalent on OS X is JAVA_HOME/bundle/Classes/classes.jar
View Full Code Here

TOP

Related Classes of com.google.classpath.ClassPathFactory

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.