aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2006-01-01 14:55:28 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2006-01-01 14:55:28 +0000
commit23e4e9827e54ab6cd1980787a293f9957264e024 (patch)
tree530f718c0baa51d92f7c266d43f28fca1acd3458
parent07eda55dcc1b4e4e9f9d54beb5722709bd92e4f5 (diff)
downloadjavassist-23e4e9827e54ab6cd1980787a293f9957264e024.tar.gz
javassist-23e4e9827e54ab6cd1980787a293f9957264e024.zip
changed to generate more javap-friendly code
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@228 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
-rw-r--r--.classpath6
-rw-r--r--.project10
-rw-r--r--src/main/javassist/bytecode/ConstPool.java16
3 files changed, 29 insertions, 3 deletions
diff --git a/.classpath b/.classpath
index 9a7217cb..a838c8dc 100644
--- a/.classpath
+++ b/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry excluding="sample/hotswap/logging/|src/main/|sample/evolve/|sample/hotswap/|sample/|tutorial/" kind="src" path=""/>
- <classpathentry excluding="javassist/tool/HotSwapper.java" kind="src" path="src/main"/>
+ <classpathentry kind="src" path="src/main"/>
+ <classpathentry kind="src" path="local/src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="output" path="build/classes"/>
</classpath>
diff --git a/.project b/.project
index 704e76bb..20b52261 100644
--- a/.project
+++ b/.project
@@ -10,6 +10,16 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ <dictionary>
+ <key>LaunchConfigHandle</key>
+ <value>&lt;project&gt;/.externalToolBuilders/Ant.launch</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
diff --git a/src/main/javassist/bytecode/ConstPool.java b/src/main/javassist/bytecode/ConstPool.java
index 3a3443d1..83159d21 100644
--- a/src/main/javassist/bytecode/ConstPool.java
+++ b/src/main/javassist/bytecode/ConstPool.java
@@ -905,6 +905,15 @@ public final class ConstPool {
--n;
}
}
+
+ int i = 1;
+ while (true) {
+ ConstInfo info = (ConstInfo)items.elementAt(i++);
+ if (info == null)
+ break;
+ else
+ info.makeHashtable(this);
+ }
}
private int readOne(DataInputStream in) throws IOException {
@@ -997,6 +1006,8 @@ abstract class ConstInfo {
public abstract void write(DataOutputStream out) throws IOException;
public abstract void print(PrintWriter out);
+ void makeHashtable(ConstPool cp) {} // called after read() finishes in ConstPool.
+
public String toString() {
ByteArrayOutputStream bout = new ByteArrayOutputStream();
PrintWriter out = new PrintWriter(bout);
@@ -1087,6 +1098,11 @@ class ClassInfo extends ConstInfo {
out.print("Class #");
out.println(name);
}
+
+ void makeHashtable(ConstPool cp) {
+ String name = Descriptor.toJavaName(getClassName(cp));
+ cp.classes.put(name, this);
+ }
}
class NameAndTypeInfo extends ConstInfo {