Created
October 9, 2012 16:26
-
-
Save skRyo/3859872 to your computer and use it in GitHub Desktop.
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 characters
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/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() + "件"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment