aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/bytecode/SignatureAttribute.java
diff options
context:
space:
mode:
authorchibash <chiba@javassist.org>2014-09-11 01:03:51 +0900
committerchibash <chiba@javassist.org>2014-09-11 01:03:51 +0900
commit1663f10c67920394f6cc42d723d99326c0801b9d (patch)
treeb1366884b8e0a963dda441be086143c612f6950a /src/main/javassist/bytecode/SignatureAttribute.java
parent4cdb575d4ea4ebed471f691d60f9d40b372a9fd1 (diff)
downloadjavassist-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.java20
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) {