diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2004-06-05 16:05:18 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2004-06-05 16:05:18 +0000 |
commit | 134ee70a9fd4959cbf6b9b6f3b9d1498247ec1e5 (patch) | |
tree | a285eba6f305608f805b36bcb89fecd6e6b00ca9 /src/main/javassist/bytecode/Descriptor.java | |
parent | fa03e04037cdfed164d5cab7025e1b2f9fe03a22 (diff) | |
download | javassist-134ee70a9fd4959cbf6b9b6f3b9d1498247ec1e5.tar.gz javassist-134ee70a9fd4959cbf6b9b6f3b9d1498247ec1e5.zip |
Changed subclasses of javassist.expr.Expr so that $_ is always initialized.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@109 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/bytecode/Descriptor.java')
-rw-r--r-- | src/main/javassist/bytecode/Descriptor.java | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/src/main/javassist/bytecode/Descriptor.java b/src/main/javassist/bytecode/Descriptor.java index b3cc5a8c..9590d632 100644 --- a/src/main/javassist/bytecode/Descriptor.java +++ b/src/main/javassist/bytecode/Descriptor.java @@ -46,22 +46,20 @@ public class Descriptor { return classname.replace('/', '.'); } - /** - * Converts to a classname from a descriptor - */ - public static String fromDescriptor(String descriptor) - { - String newname = toJavaName(descriptor).substring(1); - return newname.substring(0, newname.length() - 1); - } - - /** - * Converts to a descriptor from a classname - */ - public static String toDescriptor(String classname) - { - return "L" + toJvmName(classname) + ";"; - } + /** + * Converts to a classname from a descriptor + */ + public static String fromDescriptor(String descriptor) { + String newname = toJavaName(descriptor).substring(1); + return newname.substring(0, newname.length() - 1); + } + + /** + * Converts to a descriptor from a classname + */ + public static String toDescriptor(String classname) { + return "L" + toJvmName(classname) + ";"; + } /** * Returns the internal representation of the class name in the @@ -179,8 +177,6 @@ public class Descriptor { return sbuf.toString(); } - - private static void toDescriptor(StringBuffer desc, CtClass type) { if (type.isArray()) { desc.append('['); |