OSDN Git Service

save
authoriga <tosiki.iga@nifty.ne.jp>
Tue, 1 Apr 2014 13:05:21 +0000 (22:05 +0900)
committeriga <tosiki.iga@nifty.ne.jp>
Tue, 1 Apr 2014 13:05:21 +0000 (22:05 +0900)
13 files changed:
jcfa/src/jp/igapyon/jcfa/JavaClassFileAnalyzer.java
jcfa/src/jp/igapyon/jcfa/util/JcfaWriteUtil.java
jcfa/src/jp/igapyon/jcfa/vo/JcfaCode.java
jcfa/testJavaClass/output/jp/igapyon/jcfa/vo/JcfaClass.jcfa
jcfa/testJavaClass/output/jp/igapyon/jcfa/vo/JcfaCode.jcfa
jcfa/testJavaClass/output/jp/igapyon/jcfa/vo/JcfaComment.jcfa
jcfa/testJavaClass/output/jp/igapyon/jcfa/vo/JcfaField.jcfa
jcfa/testJavaClass/output/jp/igapyon/jcfa/vo/JcfaMethod.jcfa
jcfa/testJavaClass/output/jp/igapyon/jcfa/vo/JcfaNode.jcfa
jcfa/testJavaClass/output/jp/igapyon/jcfa/vo/JcfaUnit.jcfa
jcfa/testJavaClass/output/test/TestJavaClass001.jcfa
jcfa/testJavaClass/output/test/TestJavaClass002.jcfa
jcfa/testJavaClass/output/test/TestJavaClass003.jcfa

index e6e7033..c6ea266 100644 (file)
@@ -1,5 +1,6 @@
 package jp.igapyon.jcfa;\r
 \r
+import java.io.ByteArrayOutputStream;\r
 import java.io.File;\r
 import java.io.IOException;\r
 \r
@@ -175,6 +176,7 @@ public class JavaClassFileAnalyzer {
                for (int pc = 0; pc < codes.length; pc++) {\r
                        final JcfaCode jcfaCode = new JcfaCode();\r
                        jcfaMethod.getCodeList().add(jcfaCode);\r
+                       jcfaCode.setJavaClass(jc);\r
 \r
                        jcfaCode.setOpcode(JcfaUtil.byte2UnsignedByte(codes[pc]));\r
                        jcfaCode.getComment()\r
@@ -194,33 +196,37 @@ public class JavaClassFileAnalyzer {
 \r
                        switch (jcfaCode.getOpcode()) {\r
                        case Constants.RETURN: {\r
-                               System.out.println("    " + pc + ": "\r
-                                               Constants.OPCODE_NAMES[jcfaCode.getOpcode()]);\r
+                               jcfaCode.getComment().getCommentList()\r
+                                               .add(Constants.OPCODE_NAMES[jcfaCode.getOpcode()]);\r
                                break;\r
                        }\r
                        case Constants.GETSTATIC: {\r
-                               System.out.println("    "\r
-                                               + pc\r
-                                               + ": "\r
-                                               + Constants.OPCODE_NAMES[jcfaCode.getOpcode()]\r
-                                               + ": "\r
-                                               + JcfaUtil.getConstantFieldrefString(jc, codes[pc + 1],\r
-                                                               codes[pc + 2]));\r
+                               jcfaCode.getComment()\r
+                                               .getCommentList()\r
+                                               .add(Constants.OPCODE_NAMES[jcfaCode.getOpcode()]\r
+                                                               + ": "\r
+                                                               + JcfaUtil.getConstantFieldrefString(jc,\r
+                                                                               codes[pc + 1], codes[pc + 2]));\r
                                break;\r
                        }\r
                        case Constants.LDC: {\r
-                               System.out.println("    " + pc + ": "\r
-                                               + Constants.OPCODE_NAMES[jcfaCode.getOpcode()] + ": "\r
-                                               + JcfaUtil.getConstantString(jc, codes[pc + 1]));\r
+                               jcfaCode.getComment()\r
+                                               .getCommentList()\r
+                                               .add(Constants.OPCODE_NAMES[jcfaCode.getOpcode()]\r
+                                                               + ": "\r
+                                                               + JcfaUtil.getConstantString(jc, codes[pc + 1]));\r
                        }\r
                                break;\r
                        case Constants.INVOKEVIRTUAL:\r
                        case Constants.INVOKESPECIAL: {\r
                                final int operand = JcfaUtil.byte2UnsignedShort(codes[pc + 1],\r
                                                codes[pc + 2]);\r
-                               System.out.println("    " + pc + ": "\r
-                                               + Constants.OPCODE_NAMES[jcfaCode.getOpcode()] + ": "\r
-                                               + JcfaUtil.getConstantMethodRefString(jc, operand));\r
+                               jcfaCode.getComment()\r
+                                               .getCommentList()\r
+                                               .add(Constants.OPCODE_NAMES[jcfaCode.getOpcode()]\r
+                                                               + ": "\r
+                                                               + JcfaUtil.getConstantMethodRefString(jc,\r
+                                                                               operand));\r
                        }\r
                                break;\r
                        case Constants.LOOKUPSWITCH:\r
@@ -237,29 +243,40 @@ public class JavaClassFileAnalyzer {
                                                .byte2Int(codes[lookupOp++], codes[lookupOp++],\r
                                                                codes[lookupOp++], codes[lookupOp++]);\r
                                for (int index = 0; index < loopCount; index++) {\r
-                                       System.out.println("      "\r
-                                                       + JcfaUtil.byte2Int(codes[lookupOp++],\r
+                                       jcfaCode.getComment()\r
+                                                       .getCommentList()\r
+                                                       .add(JcfaUtil.byte2Int(codes[lookupOp++],\r
                                                                        codes[lookupOp++], codes[lookupOp++],\r
                                                                        codes[lookupOp++])\r
-                                                       + ":"\r
-                                                       + (JcfaUtil.byte2Int(codes[lookupOp++],\r
-                                                                       codes[lookupOp++], codes[lookupOp++],\r
-                                                                       codes[lookupOp++]) + pc));\r
+                                                                       + ":"\r
+                                                                       + (JcfaUtil.byte2Int(codes[lookupOp++],\r
+                                                                                       codes[lookupOp++],\r
+                                                                                       codes[lookupOp++],\r
+                                                                                       codes[lookupOp++]) + pc));\r
                                }\r
 \r
                                short diff2 = JcfaUtil.byte2UnsignedByte(codes[lookupOp++]);\r
-                               System.out.println("  TODO skipping bytes: " + (diff2));\r
+                               jcfaCode.getComment().getCommentList()\r
+                                               .add("  TODO skipping bytes: " + (diff2));\r
 \r
                                operands += (lookupOp - pc);\r
 \r
                                break;\r
                        default: {\r
-                               System.out.println("    " + pc + ": "\r
-                                               + Constants.OPCODE_NAMES[jcfaCode.getOpcode()] + " ("\r
-                                               + operands + ")");\r
+                               jcfaCode.getComment()\r
+                                               .getCommentList()\r
+                                               .add(Constants.OPCODE_NAMES[jcfaCode.getOpcode()]\r
+                                                               + " (" + operands + ")");\r
                        }\r
                                break;\r
                        }\r
+\r
+                       {\r
+                               final ByteArrayOutputStream outStream = new ByteArrayOutputStream();\r
+                               outStream.write(codes, pc, operands + 1);\r
+                               outStream.flush();\r
+                               jcfaCode.setCodes(outStream.toByteArray());\r
+                       }\r
                        pc += operands;\r
                }\r
        }\r
index d2d437e..5e4a37c 100644 (file)
@@ -12,6 +12,9 @@ import jp.igapyon.jcfa.vo.JcfaField;
 import jp.igapyon.jcfa.vo.JcfaMethod;
 import jp.igapyon.jcfa.vo.JcfaUnit;
 
+import org.apache.bcel.Constants;
+import org.apache.bcel.classfile.JavaClass;
+
 public class JcfaWriteUtil {
        public static void writeToFile(final JcfaUnit jcfaUnit) throws IOException {
                final StringBuffer result = new StringBuffer();
@@ -32,9 +35,10 @@ public class JcfaWriteUtil {
         * 
         * @param jcfaClass
         * @param result
+        * @throws IOException
         */
        public static void writeToBuffer(final JcfaClass jcfaClass,
-                       final StringBuffer result) {
+                       final StringBuffer result) throws IOException {
 
                if (jcfaClass.isMainClass()) {
                        if (jcfaClass.getName().contains(".")) {
@@ -91,9 +95,11 @@ public class JcfaWriteUtil {
         * @param jcfaClass
         * @param jcfaMethod
         * @param result
+        * @throws IOException
         */
        public static void writeToBuffer(final JcfaClass jcfaClass,
-                       final JcfaMethod jcfaMethod, final StringBuffer result) {
+                       final JcfaMethod jcfaMethod, final StringBuffer result)
+                       throws IOException {
 
                writeToBuffer(jcfaMethod.getComment(), result);
 
@@ -118,7 +124,75 @@ public class JcfaWriteUtil {
                result.append("{");
 
                for (JcfaCode jcfaCode : jcfaMethod.getCodeList()) {
+
+                       byte[] codes = jcfaCode.getCodes();
+                       JavaClass jc = jcfaCode.getJavaClass();
+
+                       switch (jcfaCode.getOpcode()) {
+                       case Constants.RETURN: {
+                               break;
+                       }
+                       case Constants.GETSTATIC: {
+                               jcfaCode.getComment()
+                                               .getCommentList()
+                                               .add(JcfaUtil.getConstantFieldrefString(jc, codes[1],
+                                                               codes[2]));
+                               break;
+                       }
+                       case Constants.LDC: {
+                               jcfaCode.getComment().getCommentList()
+                                               .add(JcfaUtil.getConstantString(jc, codes[1]));
+                       }
+                               break;
+                       case Constants.INVOKEVIRTUAL:
+                       case Constants.INVOKESPECIAL: {
+                               final int operand = JcfaUtil.byte2UnsignedShort(codes[1],
+                                               codes[2]);
+                               jcfaCode.getComment().getCommentList()
+                                               .add(JcfaUtil.getConstantMethodRefString(jc, operand));
+                       }
+                               break;
+                       case Constants.LOOKUPSWITCH:
+                               int skipBytes = JcfaUtil.byte2Int(codes[1], codes[2], codes[3],
+                                               codes[4]);
+                               jcfaCode.getComment().getCommentList()
+                                               .add("  TODO skipping bytes: " + (skipBytes));
+
+                               int lookupOp = 5;
+
+                               short diff = JcfaUtil.byte2UnsignedByte(codes[lookupOp++]);
+                               jcfaCode.getComment().getCommentList()
+                                               .add("  TODO skipping bytes: " + (diff));
+
+                               int loopCount = JcfaUtil
+                                               .byte2Int(codes[lookupOp++], codes[lookupOp++],
+                                                               codes[lookupOp++], codes[lookupOp++]);
+                               for (int index = 0; index < loopCount; index++) {
+                                       jcfaCode.getComment()
+                                                       .getCommentList()
+                                                       .add(JcfaUtil.byte2Int(codes[lookupOp++],
+                                                                       codes[lookupOp++], codes[lookupOp++],
+                                                                       codes[lookupOp++])
+                                                                       + ":"
+                                                                       + (JcfaUtil.byte2Int(codes[lookupOp++],
+                                                                                       codes[lookupOp++],
+                                                                                       codes[lookupOp++],
+                                                                                       codes[lookupOp++])));
+                               }
+
+                               short diff2 = JcfaUtil.byte2UnsignedByte(codes[lookupOp++]);
+                               jcfaCode.getComment().getCommentList()
+                                               .add("  TODO skipping bytes: " + (diff2));
+
+                               break;
+                       default: {
+                       }
+                               break;
+                       }
+
                        writeToBuffer(jcfaCode.getComment(), result);
+
+                       // TODO and code...
                }
 
                result.append("}");
index 39d11fc..610ec50 100644 (file)
@@ -1,12 +1,34 @@
 package jp.igapyon.jcfa.vo;
 
+import org.apache.bcel.classfile.JavaClass;
+
 public class JcfaCode extends JcfaNode {
        protected short opcode;
 
+       protected JavaClass javaClass = null;
+
+       protected byte[] codes = null;
+
+       public byte[] getCodes() {
+               return codes;
+       }
+
+       public JavaClass getJavaClass() {
+               return javaClass;
+       }
+
        public short getOpcode() {
                return opcode;
        }
 
+       public void setCodes(byte[] codes) {
+               this.codes = codes;
+       }
+
+       public void setJavaClass(JavaClass javaClass) {
+               this.javaClass = javaClass;
+       }
+
        public void setOpcode(short opcode) {
                this.opcode = opcode;
        }
index 1e73113..b9aaa1e 100644 (file)
@@ -17,175 +17,310 @@ public class JcfaClass extends jp.igapyon.jcfa.vo.JcfaNode {
 
        /** Default constructor. */
        public JcfaClass() {
-               /* 0: aload_0 */
-
-               /* 1: invokespecial */
-
-               /* 4: aload_0 */
-
-               /* 5: ldc */
-
-               /* 7: putfield */
-
-               /* 10: aload_0 */
-
-               /* 11: iconst_1 */
-
-               /* 12: putfield */
-
-               /* 15: aload_0 */
-
-               /* 16: new */
-
-               /* 19: dup */
-
-               /* 20: invokespecial */
-
-               /* 23: putfield */
-
-               /* 26: aload_0 */
-
-               /* 27: new */
-
-               /* 30: dup */
-
-               /* 31: invokespecial */
-
-               /* 34: putfield */
-
-               /* 37: return */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 1: invokespecial invokespecial: jp/igapyon/jcfa/vo/JcfaNode#<init>()V
+                * jp/igapyon/jcfa/vo/JcfaNode#<init>()V
+                */
+
+               /*
+                * 4: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 5: ldc ldc: public public
+                */
+
+               /*
+                * 7: putfield putfield (2)
+                */
+
+               /*
+                * 10: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 11: iconst_1 iconst_1 (0)
+                */
+
+               /*
+                * 12: putfield putfield (2)
+                */
+
+               /*
+                * 15: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 16: new new (2)
+                */
+
+               /*
+                * 19: dup dup (0)
+                */
+
+               /*
+                * 20: invokespecial invokespecial: java/util/ArrayList#<init>()V
+                * java/util/ArrayList#<init>()V
+                */
+
+               /*
+                * 23: putfield putfield (2)
+                */
+
+               /*
+                * 26: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 27: new new (2)
+                */
+
+               /*
+                * 30: dup dup (0)
+                */
+
+               /*
+                * 31: invokespecial invokespecial: java/util/ArrayList#<init>()V
+                * java/util/ArrayList#<init>()V
+                */
+
+               /*
+                * 34: putfield putfield (2)
+                */
+
+               /*
+                * 37: return return
+                */
        }
 
        /** Method. */
        public java.lang.String getAccess() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /** Method. */
        public java.lang.String getExtendsName() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /** Method. */
        public java.util.List getFieldList() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /** Method. */
        public java.lang.String getLocalName() {
-               /* 0: aload_0 */
-
-               /* 1: getfield */
-
-               /* 4: ldc */
-
-               /* 6: invokevirtual */
-
-               /* 9: astore_1 */
-
-               /* 10: aload_1 */
-
-               /* 11: aload_1 */
-
-               /* 12: arraylength */
-
-               /* 13: iconst_1 */
-
-               /* 14: isub */
-
-               /* 15: aaload */
-
-               /* 16: areturn */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 1: getfield getfield (2)
+                */
+
+               /*
+                * 4: ldc ldc: \. \.
+                */
+
+               /*
+                * 6: invokevirtual invokevirtual:
+                * java/lang/String#split(Ljava/lang/String;)[Ljava/lang/String;
+                * java/lang/String#split(Ljava/lang/String;)[Ljava/lang/String;
+                */
+
+               /*
+                * 9: astore_1 astore_1 (0)
+                */
+
+               /*
+                * 10: aload_1 aload_1 (0)
+                */
+
+               /*
+                * 11: aload_1 aload_1 (0)
+                */
+
+               /*
+                * 12: arraylength arraylength (0)
+                */
+
+               /*
+                * 13: iconst_1 iconst_1 (0)
+                */
+
+               /*
+                * 14: isub isub (0)
+                */
+
+               /*
+                * 15: aaload aaload (0)
+                */
+
+               /*
+                * 16: areturn areturn (0)
+                */
        }
 
        /** Method. */
        public java.util.List getMethodList() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /** Method. */
        public java.lang.String getName() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /** Method. */
        public boolean isMainClass() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: ireturn */
+               /*
+                * 4: ireturn ireturn (0)
+                */
        }
 
        /**
         * Method. java.lang.String
         */
        public void setAccess(java.lang.String arg0) {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: aload_1 */
+               /*
+                * 1: aload_1 aload_1 (0)
+                */
 
-               /* 2: putfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 5: return */
+               /*
+                * 5: return return
+                */
        }
 
        /**
         * Method. java.lang.String
         */
        public void setExtendsName(java.lang.String arg0) {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: aload_1 */
+               /*
+                * 1: aload_1 aload_1 (0)
+                */
 
-               /* 2: putfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 5: return */
+               /*
+                * 5: return return
+                */
        }
 
        /**
         * Method. boolean
         */
        public void setMainClass(boolean arg0) {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: iload_1 */
+               /*
+                * 1: iload_1 iload_1 (0)
+                */
 
-               /* 2: putfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 5: return */
+               /*
+                * 5: return return
+                */
        }
 
        /**
         * Method. java.lang.String
         */
        public void setName(java.lang.String arg0) {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: aload_1 */
+               /*
+                * 1: aload_1 aload_1 (0)
+                */
 
-               /* 2: putfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 5: return */
+               /*
+                * 5: return return
+                */
        }
 }
\ No newline at end of file
index ab75194..68003cf 100644 (file)
@@ -4,35 +4,156 @@ package jp.igapyon.jcfa.vo;
 public class JcfaCode extends jp.igapyon.jcfa.vo.JcfaNode {
        /**  */
        protected short opcode;
+       /**  */
+       protected org.apache.bcel.classfile.JavaClass javaClass;
+       /**  */
+       protected byte[] codes;
 
        /** Default constructor. */
        public JcfaCode() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 1: invokespecial invokespecial: jp/igapyon/jcfa/vo/JcfaNode#<init>()V
+                * jp/igapyon/jcfa/vo/JcfaNode#<init>()V
+                */
+
+               /*
+                * 4: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 5: aconst_null aconst_null (0)
+                */
+
+               /*
+                * 6: putfield putfield (2)
+                */
+
+               /*
+                * 9: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 10: aconst_null aconst_null (0)
+                */
+
+               /*
+                * 11: putfield putfield (2)
+                */
+
+               /*
+                * 14: return return
+                */
+       }
+
+       /** Method. */
+       public byte[] getCodes() {
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 1: getfield getfield (2)
+                */
+
+               /*
+                * 4: areturn areturn (0)
+                */
+       }
 
-               /* 1: invokespecial */
+       /** Method. */
+       public org.apache.bcel.classfile.JavaClass getJavaClass() {
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: return */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /** Method. */
        public short getOpcode() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 1: getfield getfield (2)
+                */
+
+               /*
+                * 4: ireturn ireturn (0)
+                */
+       }
+
+       /**
+        * Method. byte[]
+        */
+       public void setCodes(byte[] arg0) {
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 1: aload_1 aload_1 (0)
+                */
+
+               /*
+                * 2: putfield putfield (2)
+                */
+
+               /*
+                * 5: return return
+                */
+       }
+
+       /**
+        * Method. org.apache.bcel.classfile.JavaClass
+        */
+       public void setJavaClass(org.apache.bcel.classfile.JavaClass arg0) {
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 1: aload_1 aload_1 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 4: ireturn */
+               /*
+                * 5: return return
+                */
        }
 
        /**
         * Method. short
         */
        public void setOpcode(short arg0) {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: iload_1 */
+               /*
+                * 1: iload_1 iload_1 (0)
+                */
 
-               /* 2: putfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 5: return */
+               /*
+                * 5: return return
+                */
        }
 }
\ No newline at end of file
index 0c484f0..ce3b764 100644 (file)
@@ -9,70 +9,122 @@ public class JcfaComment {
 
        /** Default constructor. */
        public JcfaComment() {
-               /* 0: aload_0 */
-
-               /* 1: invokespecial */
-
-               /* 4: aload_0 */
-
-               /* 5: iconst_0 */
-
-               /* 6: putfield */
-
-               /* 9: aload_0 */
-
-               /* 10: new */
-
-               /* 13: dup */
-
-               /* 14: invokespecial */
-
-               /* 17: putfield */
-
-               /* 20: return */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 1: invokespecial invokespecial: java/lang/Object#<init>()V
+                * java/lang/Object#<init>()V
+                */
+
+               /*
+                * 4: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 5: iconst_0 iconst_0 (0)
+                */
+
+               /*
+                * 6: putfield putfield (2)
+                */
+
+               /*
+                * 9: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 10: new new (2)
+                */
+
+               /*
+                * 13: dup dup (0)
+                */
+
+               /*
+                * 14: invokespecial invokespecial: java/util/ArrayList#<init>()V
+                * java/util/ArrayList#<init>()V
+                */
+
+               /*
+                * 17: putfield putfield (2)
+                */
+
+               /*
+                * 20: return return
+                */
        }
 
        /** Method. */
        public java.util.List getCommentList() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /** Method. */
        public boolean isJavaDoc() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: ireturn */
+               /*
+                * 4: ireturn ireturn (0)
+                */
        }
 
        /**
         * Method. java.util.List
         */
        public void setCommentList(java.util.List arg0) {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: aload_1 */
+               /*
+                * 1: aload_1 aload_1 (0)
+                */
 
-               /* 2: putfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 5: return */
+               /*
+                * 5: return return
+                */
        }
 
        /**
         * Method. boolean
         */
        public void setJavaDoc(boolean arg0) {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: iload_1 */
+               /*
+                * 1: iload_1 iload_1 (0)
+                */
 
-               /* 2: putfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 5: return */
+               /*
+                * 5: return return
+                */
        }
 }
\ No newline at end of file
index 3f9d529..207825c 100644 (file)
@@ -13,98 +13,161 @@ public class JcfaField extends jp.igapyon.jcfa.vo.JcfaNode {
 
        /** Default constructor. */
        public JcfaField() {
-               /* 0: aload_0 */
-
-               /* 1: invokespecial */
-
-               /* 4: return */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 1: invokespecial invokespecial: jp/igapyon/jcfa/vo/JcfaNode#<init>()V
+                * jp/igapyon/jcfa/vo/JcfaNode#<init>()V
+                */
+
+               /*
+                * 4: return return
+                */
        }
 
        /** Method. */
        public java.lang.String getAccess() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /** Method. */
        public java.lang.String getConstantValue() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /** Method. */
        public java.lang.String getName() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /** Method. */
        public java.lang.String getType() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /**
         * Method. java.lang.String
         */
        public void setAccess(java.lang.String arg0) {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: aload_1 */
+               /*
+                * 1: aload_1 aload_1 (0)
+                */
 
-               /* 2: putfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 5: return */
+               /*
+                * 5: return return
+                */
        }
 
        /**
         * Method. java.lang.String
         */
        public void setConstantValue(java.lang.String arg0) {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: aload_1 */
+               /*
+                * 1: aload_1 aload_1 (0)
+                */
 
-               /* 2: putfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 5: return */
+               /*
+                * 5: return return
+                */
        }
 
        /**
         * Method. java.lang.String
         */
        public void setName(java.lang.String arg0) {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: aload_1 */
+               /*
+                * 1: aload_1 aload_1 (0)
+                */
 
-               /* 2: putfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 5: return */
+               /*
+                * 5: return return
+                */
        }
 
        /**
         * Method. java.lang.String
         */
        public void setType(java.lang.String arg0) {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: aload_1 */
+               /*
+                * 1: aload_1 aload_1 (0)
+                */
 
-               /* 2: putfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 5: return */
+               /*
+                * 5: return return
+                */
        }
 }
\ No newline at end of file
index 174348e..aa31932 100644 (file)
@@ -15,114 +15,197 @@ public class JcfaMethod extends jp.igapyon.jcfa.vo.JcfaNode {
 
        /** Default constructor. */
        public JcfaMethod() {
-               /* 0: aload_0 */
-
-               /* 1: invokespecial */
-
-               /* 4: aload_0 */
-
-               /* 5: new */
-
-               /* 8: dup */
-
-               /* 9: invokespecial */
-
-               /* 12: putfield */
-
-               /* 15: aload_0 */
-
-               /* 16: new */
-
-               /* 19: dup */
-
-               /* 20: invokespecial */
-
-               /* 23: putfield */
-
-               /* 26: return */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 1: invokespecial invokespecial: jp/igapyon/jcfa/vo/JcfaNode#<init>()V
+                * jp/igapyon/jcfa/vo/JcfaNode#<init>()V
+                */
+
+               /*
+                * 4: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 5: new new (2)
+                */
+
+               /*
+                * 8: dup dup (0)
+                */
+
+               /*
+                * 9: invokespecial invokespecial: java/util/ArrayList#<init>()V
+                * java/util/ArrayList#<init>()V
+                */
+
+               /*
+                * 12: putfield putfield (2)
+                */
+
+               /*
+                * 15: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 16: new new (2)
+                */
+
+               /*
+                * 19: dup dup (0)
+                */
+
+               /*
+                * 20: invokespecial invokespecial: java/util/ArrayList#<init>()V
+                * java/util/ArrayList#<init>()V
+                */
+
+               /*
+                * 23: putfield putfield (2)
+                */
+
+               /*
+                * 26: return return
+                */
        }
 
        /** Method. */
        public java.lang.String getAccess() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /** Method. */
        public java.util.List getArugumentTypeList() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /** Method. */
        public java.util.List getCodeList() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /** Method. */
        public java.lang.String getName() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /** Method. */
        public java.lang.String getType() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /**
         * Method. java.lang.String
         */
        public void setAccess(java.lang.String arg0) {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: aload_1 */
+               /*
+                * 1: aload_1 aload_1 (0)
+                */
 
-               /* 2: putfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 5: return */
+               /*
+                * 5: return return
+                */
        }
 
        /**
         * Method. java.lang.String
         */
        public void setName(java.lang.String arg0) {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: aload_1 */
+               /*
+                * 1: aload_1 aload_1 (0)
+                */
 
-               /* 2: putfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 5: return */
+               /*
+                * 5: return return
+                */
        }
 
        /**
         * Method. java.lang.String
         */
        public void setType(java.lang.String arg0) {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: aload_1 */
+               /*
+                * 1: aload_1 aload_1 (0)
+                */
 
-               /* 2: putfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 5: return */
+               /*
+                * 5: return return
+                */
        }
 }
\ No newline at end of file
index d91b964..99c919a 100644 (file)
@@ -7,42 +7,75 @@ public class JcfaNode {
 
        /** Default constructor. */
        public JcfaNode() {
-               /* 0: aload_0 */
-
-               /* 1: invokespecial */
-
-               /* 4: aload_0 */
-
-               /* 5: new */
-
-               /* 8: dup */
-
-               /* 9: invokespecial */
-
-               /* 12: putfield */
-
-               /* 15: return */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 1: invokespecial invokespecial: java/lang/Object#<init>()V
+                * java/lang/Object#<init>()V
+                */
+
+               /*
+                * 4: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 5: new new (2)
+                */
+
+               /*
+                * 8: dup dup (0)
+                */
+
+               /*
+                * 9: invokespecial invokespecial:
+                * jp/igapyon/jcfa/vo/JcfaComment#<init>()V
+                * jp/igapyon/jcfa/vo/JcfaComment#<init>()V
+                */
+
+               /*
+                * 12: putfield putfield (2)
+                */
+
+               /*
+                * 15: return return
+                */
        }
 
        /** Method. */
        public jp.igapyon.jcfa.vo.JcfaComment getComment() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /**
         * Method. jp.igapyon.jcfa.vo.JcfaComment
         */
        public void setComment(jp.igapyon.jcfa.vo.JcfaComment arg0) {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: aload_1 */
+               /*
+                * 1: aload_1 aload_1 (0)
+                */
 
-               /* 2: putfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 5: return */
+               /*
+                * 5: return return
+                */
        }
 }
\ No newline at end of file
index d2d3126..6b5d6dd 100644 (file)
@@ -11,73 +11,125 @@ public class JcfaUnit extends jp.igapyon.jcfa.vo.JcfaNode {
 
        /** Default constructor. */
        public JcfaUnit() {
-               /* 0: aload_0 */
-
-               /* 1: invokespecial */
-
-               /* 4: aload_0 */
-
-               /* 5: new */
-
-               /* 8: dup */
-
-               /* 9: invokespecial */
-
-               /* 12: putfield */
-
-               /* 15: return */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 1: invokespecial invokespecial: jp/igapyon/jcfa/vo/JcfaNode#<init>()V
+                * jp/igapyon/jcfa/vo/JcfaNode#<init>()V
+                */
+
+               /*
+                * 4: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 5: new new (2)
+                */
+
+               /*
+                * 8: dup dup (0)
+                */
+
+               /*
+                * 9: invokespecial invokespecial: java/util/ArrayList#<init>()V
+                * java/util/ArrayList#<init>()V
+                */
+
+               /*
+                * 12: putfield putfield (2)
+                */
+
+               /*
+                * 15: return return
+                */
        }
 
        /** Method. */
        public java.util.List getClassList() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /** Method. */
        public java.lang.String getName() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /** Method. */
        public java.io.File getTargetFile() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: getfield */
+               /*
+                * 1: getfield getfield (2)
+                */
 
-               /* 4: areturn */
+               /*
+                * 4: areturn areturn (0)
+                */
        }
 
        /**
         * Method. java.lang.String
         */
        public void setName(java.lang.String arg0) {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: aload_1 */
+               /*
+                * 1: aload_1 aload_1 (0)
+                */
 
-               /* 2: putfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 5: return */
+               /*
+                * 5: return return
+                */
        }
 
        /**
         * Method. java.io.File
         */
        public void setTargetFile(java.io.File arg0) {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: aload_1 */
+               /*
+                * 1: aload_1 aload_1 (0)
+                */
 
-               /* 2: putfield */
+               /*
+                * 2: putfield putfield (2)
+                */
 
-               /* 5: return */
+               /*
+                * 5: return return
+                */
        }
 }
\ No newline at end of file
index abb94e4..f685b48 100644 (file)
@@ -4,23 +4,42 @@ package test;
 public class TestJavaClass001 {
        /** Default constructor. */
        public TestJavaClass001() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: invokespecial */
+               /*
+                * 1: invokespecial invokespecial: java/lang/Object#<init>()V
+                * java/lang/Object#<init>()V
+                */
 
-               /* 4: return */
+               /*
+                * 4: return return
+                */
        }
 
        /**
         * Method. java.lang.String[]
         */
        public void main(java.lang.String[] arg0) {
-               /* 0: getstatic */
+               /*
+                * 0: getstatic getstatic: java.lang.System#out
+                * type:Ljava/io/PrintStream; java.lang.System#out
+                * type:Ljava/io/PrintStream;
+                */
 
-               /* 3: ldc */
+               /*
+                * 3: ldc ldc: Hello jcfa world! Hello jcfa world!
+                */
 
-               /* 5: invokevirtual */
+               /*
+                * 5: invokevirtual invokevirtual:
+                * java/io/PrintStream#println(Ljava/lang/String;)V
+                * java/io/PrintStream#println(Ljava/lang/String;)V
+                */
 
-               /* 8: return */
+               /*
+                * 8: return return
+                */
        }
 }
\ No newline at end of file
index 23f05ca..38cad84 100644 (file)
@@ -14,16 +14,29 @@ public class TestJavaClass002 {
 
        /** Default constructor. */
        public TestJavaClass002() {
-               /* 0: aload_0 */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
 
-               /* 1: invokespecial */
+               /*
+                * 1: invokespecial invokespecial: java/lang/Object#<init>()V
+                * java/lang/Object#<init>()V
+                */
 
-               /* 4: aload_0 */
+               /*
+                * 4: aload_0 aload_0 (0)
+                */
 
-               /* 5: iconst_3 */
+               /*
+                * 5: iconst_3 iconst_3 (0)
+                */
 
-               /* 6: putfield */
+               /*
+                * 6: putfield putfield (2)
+                */
 
-               /* 9: return */
+               /*
+                * 9: return return
+                */
        }
 }
\ No newline at end of file
index f697743..2a6a097 100644 (file)
@@ -19,52 +19,101 @@ public class TestJavaClass003 {
 
        /** Default constructor. */
        public TestJavaClass003() {
-               /* 0: aload_0 */
-
-               /* 1: invokespecial */
-
-               /* 4: aload_0 */
-
-               /* 5: iconst_1 */
-
-               /* 6: putfield */
-
-               /* 9: aload_0 */
-
-               /* 10: iconst_2 */
-
-               /* 11: putfield */
-
-               /* 14: aload_0 */
-
-               /* 15: iconst_3 */
-
-               /* 16: putfield */
-
-               /* 19: aload_0 */
-
-               /* 20: iconst_4 */
-
-               /* 21: putfield */
-
-               /* 24: aload_0 */
-
-               /* 25: iconst_5 */
-
-               /* 26: putfield */
-
-               /* 29: aload_0 */
-
-               /* 30: bipush */
-
-               /* 32: putfield */
-
-               /* 35: aload_0 */
-
-               /* 36: bipush */
-
-               /* 38: putfield */
-
-               /* 41: return */
+               /*
+                * 0: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 1: invokespecial invokespecial: java/lang/Object#<init>()V
+                * java/lang/Object#<init>()V
+                */
+
+               /*
+                * 4: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 5: iconst_1 iconst_1 (0)
+                */
+
+               /*
+                * 6: putfield putfield (2)
+                */
+
+               /*
+                * 9: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 10: iconst_2 iconst_2 (0)
+                */
+
+               /*
+                * 11: putfield putfield (2)
+                */
+
+               /*
+                * 14: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 15: iconst_3 iconst_3 (0)
+                */
+
+               /*
+                * 16: putfield putfield (2)
+                */
+
+               /*
+                * 19: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 20: iconst_4 iconst_4 (0)
+                */
+
+               /*
+                * 21: putfield putfield (2)
+                */
+
+               /*
+                * 24: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 25: iconst_5 iconst_5 (0)
+                */
+
+               /*
+                * 26: putfield putfield (2)
+                */
+
+               /*
+                * 29: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 30: bipush bipush (1)
+                */
+
+               /*
+                * 32: putfield putfield (2)
+                */
+
+               /*
+                * 35: aload_0 aload_0 (0)
+                */
+
+               /*
+                * 36: bipush bipush (1)
+                */
+
+               /*
+                * 38: putfield putfield (2)
+                */
+
+               /*
+                * 41: return return
+                */
        }
 }
\ No newline at end of file