Package org.junithelper.core.file.impl

Examples of org.junithelper.core.file.impl.CommonsIOFileSearcher


      if (!classMeta.isAbstract) {
        dest.add(file);
      }
    } else {
      List<File> javaFiles = new ArrayList<File>();
      FileSearcher fileSearcher = new CommonsIOFileSearcher();
      javaFiles = fileSearcher.searchFilesRecursivelyByName(dirOrFile, RegExp.FileExtension.JavaFile);
      for (File file : javaFiles) {
        String encoding = UniversalDetectorUtil.getDetectedEncoding(file);
        ClassMeta classMeta = extractor.extract(IOUtil.readAsString(
            new FileInputStream(file), encoding));
        if (!classMeta.name.matches(".*Test$") && !classMeta.isAbstract) {
View Full Code Here


        try {
          Class.forName("java.lang." + typeName);
          isTypeAvailable = true;
        } catch (Exception ignore) {
          // check same package class
          List<File> files = new CommonsIOFileSearcher().searchFilesRecursivelyByName(
              config.directoryPathOfProductSourceCode + "/"
                  + callerClassPackageName.replaceAll("\\.", "/"), typeName
                  + RegExp.FileExtension.JavaFile);
          if (files != null && files.size() > 0) {
            isTypeAvailable = true;
View Full Code Here

        try {
          Class.forName("java.lang." + typeName);
          isTypeAvailable = true;
        } catch (Exception ignore) {
          // check same package class
          List<File> files = new CommonsIOFileSearcher().searchFilesRecursivelyByName(
              config.directoryPathOfProductSourceCode + "/"
                  + callerClassPackageName.replaceAll("\\.", "/"), typeName
                  + RegExp.FileExtension.JavaFile);
          if (files != null && files.size() > 0) {
            isTypeAvailable = true;
View Full Code Here

      if (!classMeta.isAbstract) {
        dest.add(file);
      }
    } else {
      List<File> javaFiles = new ArrayList<File>();
      FileSearcher fileSearcher = new CommonsIOFileSearcher();
      javaFiles = fileSearcher.searchFilesRecursivelyByName(dirOrFile, RegExp.FileExtension.JavaFile);
      for (File file : javaFiles) {
        String encoding = UniversalDetectorUtil.getDetectedEncoding(file);
        ClassMeta classMeta = extractor.extract(IOUtil.readAsString(
            new FileInputStream(file), encoding));
        if (!classMeta.name.matches(".*Test$") && !classMeta.isAbstract) {
View Full Code Here

      if (config != null && packageName != null) {
        // check same package class
        String searchPath = config.directoryPathOfProductSourceCode
            + "/" + packageName.replaceAll("\\.", "/");
        try {
          List<File> files = new CommonsIOFileSearcher().searchFilesRecursivelyByName(
              searchPath, typeName + RegExp.FileExtension.JavaFile);
          if (files != null && files.size() > 0) {
            isTypeAvailable = true;
          }
        } catch (Exception e) {
View Full Code Here

      if (!classMeta.isAbstract) {
        dest.add(file);
      }
    } else {
      List<File> javaFiles = new ArrayList<File>();
      FileSearcher fileSearcher = new CommonsIOFileSearcher();
      javaFiles = fileSearcher.searchFilesRecursivelyByName(dirOrFile, RegExp.FileExtension.JavaFile);
      for (File file : javaFiles) {
        String encoding = UniversalDetectorUtil.getDetectedEncoding(file);
        ClassMeta classMeta = extractor.extract(IOUtil.readAsString(new FileInputStream(file), encoding));
        if (!classMeta.name.matches(".*Test$") && !classMeta.isAbstract) {
          dest.add(file);
View Full Code Here

      if (config != null && packageName != null) {
        // check same package class
        String searchPath = config.directoryPathOfProductSourceCode
            + "/" + packageName.replaceAll("\\.", "/");
        try {
          List<File> files = new CommonsIOFileSearcher().searchFilesRecursivelyByName(
              searchPath, typeName + RegExp.FileExtension.JavaFile);
          if (files != null && files.size() > 0) {
            isTypeAvailable = true;
          }
        } catch (Exception e) {
View Full Code Here

        try {
          Class.forName("java.lang." + typeName);
          isTypeAvailable = true;
        } catch (Exception ignore) {
          // check same package class
          List<File> files = new CommonsIOFileSearcher().searchFilesRecursivelyByName(
              config.directoryPathOfProductSourceCode + "/"
                  + callerClassPackageName.replaceAll("\\.", "/"), typeName
                  + RegExp.FileExtension.JavaFile);
          if (files != null && files.size() > 0) {
            isTypeAvailable = true;
View Full Code Here

        try {
          Class.forName("java.lang." + typeName);
          isTypeAvailable = true;
        } catch (Exception ignore) {
          // check same package class
          List<File> files = new CommonsIOFileSearcher().searchFilesRecursivelyByName(
              config.directoryPathOfProductSourceCode + "/"
                  + callerClassPackageName.replaceAll("\\.", "/"), typeName
                  + RegExp.FileExtension.JavaFile);
          if (files != null && files.size() > 0) {
            isTypeAvailable = true;
View Full Code Here

TOP

Related Classes of org.junithelper.core.file.impl.CommonsIOFileSearcher

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.