diff options
author | chibash <chiba@javassist.org> | 2014-09-11 01:03:51 +0900 |
---|---|---|
committer | chibash <chiba@javassist.org> | 2014-09-11 01:03:51 +0900 |
commit | 1663f10c67920394f6cc42d723d99326c0801b9d (patch) | |
tree | b1366884b8e0a963dda441be086143c612f6950a /src/main/javassist/bytecode/SignatureAttribute.java | |
parent | 4cdb575d4ea4ebed471f691d60f9d40b372a9fd1 (diff) | |
download | javassist-1663f10c67920394f6cc42d723d99326c0801b9d.tar.gz javassist-1663f10c67920394f6cc42d723d99326c0801b9d.zip |
fixed a bug of accesses to annotation arguments (cont.).
did minor refactoring.
Diffstat (limited to 'src/main/javassist/bytecode/SignatureAttribute.java')
-rw-r--r-- | src/main/javassist/bytecode/SignatureAttribute.java | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/main/javassist/bytecode/SignatureAttribute.java b/src/main/javassist/bytecode/SignatureAttribute.java index 0e05f24e..1e148085 100644 --- a/src/main/javassist/bytecode/SignatureAttribute.java +++ b/src/main/javassist/bytecode/SignatureAttribute.java @@ -736,6 +736,10 @@ public class SignatureAttribute extends AttributeInfo { if (parent != null) sbuf.append(parent.toString()).append('.'); + return toString2(sbuf); + } + + private String toString2(StringBuffer sbuf) { sbuf.append(name); if (arguments != null) { sbuf.append('<'); @@ -764,21 +768,7 @@ public class SignatureAttribute extends AttributeInfo { if (parent != null) sbuf.append(parent.jvmTypeName()).append('$'); - sbuf.append(name); - if (arguments != null) { - sbuf.append('<'); - int n = arguments.length; - for (int i = 0; i < n; i++) { - if (i > 0) - sbuf.append(", "); - - sbuf.append(arguments[i].toString()); - } - - sbuf.append('>'); - } - - return sbuf.toString(); + return toString2(sbuf); } void encode(StringBuffer sb) { |