Created
October 9, 2012 16:26
Revisions
-
skRyo revised this gist
Oct 9, 2012 . 1 changed file with 22 additions and 23 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,29 +2,28 @@ public class Main { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub //解析対象ファイル File javaFile = new File("/Users/ryo/Documents/workspace/CountjavaFile/src/test.java"); //↓コンソールから入力する場合 //File javaFile = new File(args[0]); FileAnalyze FileAnalyze = new FileAnalyze(javaFile); //結果出力 //全ライン数 System.out.println("全ライン数 : " + StepCount.getAllStep() + "件"); //実コードライン数 System.out.println("実コードライン数 : " + StepCount.getCodeStep() + "件"); //コメントライン数 System.out.println("コメントライン数 : " + StepCount.getCommentStep() + "件"); //空白ライン数 System.out.println("空白ライン数 : " + StepCount.getEmptyStep() + "件"); } } -
skRyo created this gist
Oct 9, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ import java.io.File; public class Main { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub //解析対象ファイル File javaFile = new File("/Users/hoge/Documents/workspace/CountjavaFile/src/test.java"); //↓コンソールから入力する場合 //File javaFile = new File(args[0]); FileAnalyze FileAnalyze = new FileAnalyze(javaFile); //結果出力 //全ライン数 System.out.println("全ライン数 : " + StepCount.getAllStep() + "件"); //実コードライン数 System.out.println("実コードライン数 : " + StepCount.getCodeStep() + "件"); //コメントライン数 System.out.println("コメントライン数 : " + StepCount.getCommentStep() + "件"); //空白ライン数 System.out.println("空白ライン数 : " + StepCount.getEmptyStep() + "件"); } }