• R/O
  • HTTP
  • SSH
  • HTTPS

jcfa: Commit

JavaClassFileAnalyzer (jcfa) のメインリポジトリです。


Commit MetaInfo

Revision063b8e86d92761fd94a2ab0f8086e41c6fd38a61 (tree)
Time2014-04-03 06:21:28
Authoriga <tosiki.iga@nift...>
Commiteriga

Log Message

save

Change Summary

Incremental Difference

--- a/jcfa/.classpath
+++ b/jcfa/.classpath
@@ -2,6 +2,7 @@
22 <classpath>
33 <classpathentry kind="src" path="src"/>
44 <classpathentry kind="src" path="testJavaClass/src"/>
5+ <classpathentry kind="src" path="src.generated"/>
56 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
67 <classpathentry kind="lib" path="lib/apache/bcel-5.2.jar"/>
78 <classpathentry kind="lib" path="lib/eclipse/org.eclipse.core.contenttype_3.4.200.v20130326-1255.jar"/>
--- /dev/null
+++ b/jcfa/src.generated/jp/igapyon/jcfa/JcfaVersionConstants.java
@@ -0,0 +1,9 @@
1+package jp.igapyon.jcfa;
2+
3+public class JcfaVersionConstants {
4+ public static final String VERSION = "I201404030619";
5+
6+ public static final String getVersion() {
7+ return VERSION;
8+ }
9+}
\ No newline at end of file
--- a/jcfa/src/jp/igapyon/jcfa/JavaClassFileAnalyzer.java
+++ b/jcfa/src/jp/igapyon/jcfa/JavaClassFileAnalyzer.java
@@ -8,6 +8,9 @@ import jp.igapyon.jcfa.vo.JcfaUnit;
88
99 public class JavaClassFileAnalyzer {
1010 public static final void main(final String[] args) throws IOException {
11+ System.err.println("JavaClassFileAnalyzer ("
12+ + JcfaVersionConstants.getVersion() + ")");
13+
1114 new JavaClassFileAnalyzer().parseDir(new File("./bin/test"));
1215 new JavaClassFileAnalyzer().parseDir(new File(
1316 "./bin/jp/igapyon/jcfa/vo"));
--- a/jcfa/src/jp/igapyon/jcfa/JcfaConstants.java
+++ b/jcfa/src/jp/igapyon/jcfa/JcfaConstants.java
@@ -1,7 +1,40 @@
11 package jp.igapyon.jcfa;
22
3+import java.io.BufferedWriter;
4+import java.io.FileOutputStream;
5+import java.io.IOException;
6+import java.io.OutputStreamWriter;
7+import java.text.SimpleDateFormat;
8+import java.util.Date;
9+
10+import jp.igapyon.jcfa.util.JcfaEclipseUtil;
11+
312 public class JcfaConstants {
413 public static final String VERSION_PREFIX = "I";
514
615 public static final String VERSION_FORMAT = "yyyyMMddHHmm";
16+
17+ public static final void main(final String[] args) throws IOException {
18+ System.err.println("Update version source.");
19+
20+ final StringBuffer source = new StringBuffer();
21+ source.append("package jp.igapyon.jcfa;");
22+ source.append("public class JcfaVersionConstants {");
23+ source.append("public static final String VERSION = \""
24+ + VERSION_PREFIX
25+ + new SimpleDateFormat(VERSION_FORMAT).format(new Date())
26+ + "\";");
27+ source.append("public static final String getVersion() {");
28+ source.append("return VERSION;");
29+ source.append("}");
30+ source.append("}");
31+
32+ final BufferedWriter writer = new BufferedWriter(
33+ new OutputStreamWriter(
34+ new FileOutputStream(
35+ "./src.generated/jp/igapyon/jcfa/JcfaVersionConstants.java"),
36+ "UTF-8"));
37+ writer.write(JcfaEclipseUtil.formatSource(source.toString()));
38+ writer.close();
39+ }
740 }
Show on old repository browser