From b14eef7eed8703824773467606f3be0c03a04b33 Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Thu, 5 Aug 2010 23:46:34 +0200 Subject: Created utility class to casually inspect class files on the usage of classes, fields and methods --- test/bytecode/resource/Bar.java | 3 +++ test/bytecode/resource/Baz.java | 2 ++ test/bytecode/resource/Buux.java | 10 ++++++++++ test/bytecode/resource/Foo.java | 9 +++++++++ 4 files changed, 24 insertions(+) create mode 100644 test/bytecode/resource/Bar.java create mode 100644 test/bytecode/resource/Baz.java create mode 100644 test/bytecode/resource/Buux.java create mode 100644 test/bytecode/resource/Foo.java (limited to 'test/bytecode/resource') diff --git a/test/bytecode/resource/Bar.java b/test/bytecode/resource/Bar.java new file mode 100644 index 00000000..13cbf425 --- /dev/null +++ b/test/bytecode/resource/Bar.java @@ -0,0 +1,3 @@ +public interface Bar extends java.util.RandomAccess, java.util.Map { + String getName(); +} \ No newline at end of file diff --git a/test/bytecode/resource/Baz.java b/test/bytecode/resource/Baz.java new file mode 100644 index 00000000..2525ed00 --- /dev/null +++ b/test/bytecode/resource/Baz.java @@ -0,0 +1,2 @@ +public interface Baz { +} \ No newline at end of file diff --git a/test/bytecode/resource/Buux.java b/test/bytecode/resource/Buux.java new file mode 100644 index 00000000..33b352e2 --- /dev/null +++ b/test/bytecode/resource/Buux.java @@ -0,0 +1,10 @@ +public class Buux extends java.util.ArrayList { + public Buux() { + super(7); + addSomething(); + } + + public void addSomething() { + super.add("H\u3404l\0"); + } +} \ No newline at end of file diff --git a/test/bytecode/resource/Foo.java b/test/bytecode/resource/Foo.java new file mode 100644 index 00000000..95a2c820 --- /dev/null +++ b/test/bytecode/resource/Foo.java @@ -0,0 +1,9 @@ +public class Foo implements java.util.RandomAccess { + private static final String ONE = "Eén"; + + { + String value = toString(); + System.out.print(value); + System.out.print("Two" + "Four"); + } +} \ No newline at end of file -- cgit From 2683c24ee96fd7228198512f5cfcb2fd0b0cfabd Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Sat, 7 Aug 2010 22:27:32 +0200 Subject: Fixed some bugs in reading the constant pool and added tests --- test/bytecode/resource/Foo.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/bytecode/resource') diff --git a/test/bytecode/resource/Foo.java b/test/bytecode/resource/Foo.java index 95a2c820..2726026c 100644 --- a/test/bytecode/resource/Foo.java +++ b/test/bytecode/resource/Foo.java @@ -1,5 +1,16 @@ public class Foo implements java.util.RandomAccess { + private static final long LONG = 123L; private static final String ONE = "Eén"; + private static final int INT = 123; + private static final double DOUBLE = 1.23; + private static final double DOUBLE_NAN = Double.NaN; + private static final double DOUBLE_INF = Double.POSITIVE_INFINITY; + private static final double DOUBLE_NEG_INF = Double.NEGATIVE_INFINITY; + + private static final float FLOAT = 1.23F; + private static final float FLOAT_NAN = Float.NaN; + private static final float FLOAT_INF = Float.POSITIVE_INFINITY; + private static final float FLOAT_NEG_INF = Float.NEGATIVE_INFINITY; { String value = toString(); -- cgit