*/
@Override
public String toString() {
- StringBuffer sbuf = new StringBuffer();
+ StringBuilder sbuf = new StringBuilder();
TypeParameter.toString(sbuf, params);
sbuf.append(" extends ").append(superClass);
* Returns the encoded string representing the method type signature.
*/
public String encode() {
- StringBuffer sbuf = new StringBuffer();
+ StringBuilder sbuf = new StringBuilder();
if (params.length > 0) {
sbuf.append('<');
for (int i = 0; i < params.length; i++)
*/
@Override
public String toString() {
- StringBuffer sbuf = new StringBuffer();
+ StringBuilder sbuf = new StringBuilder();
TypeParameter.toString(sbuf, typeParams);
sbuf.append(" (");
* Returns the encoded string representing the method type signature.
*/
public String encode() {
- StringBuffer sbuf = new StringBuffer();
+ StringBuilder sbuf = new StringBuilder();
if (typeParams.length > 0) {
sbuf.append('<');
for (int i = 0; i < typeParams.length; i++)
return sbuf.toString();
}
- static void toString(StringBuffer sbuf, TypeParameter[] tp) {
+ static void toString(StringBuilder sbuf, TypeParameter[] tp) {
sbuf.append('<');
for (int i = 0; i < tp.length; i++) {
if (i > 0)
sbuf.append('>');
}
- void encode(StringBuffer sb) {
+ void encode(StringBuilder sb) {
sb.append(name);
if (superClass == null)
sb.append(":Ljava/lang/Object;");
return "? super " + type;
}
- static void encode(StringBuffer sb, TypeArgument[] args) {
+ static void encode(StringBuilder sb, TypeArgument[] args) {
sb.append('<');
for (int i = 0; i < args.length; i++) {
TypeArgument ta = args[i];
* Primitive types and object types.
*/
public static abstract class Type {
- abstract void encode(StringBuffer sb);
- static void toString(StringBuffer sbuf, Type[] ts) {
+ abstract void encode(StringBuilder sb);
+ static void toString(StringBuilder sbuf, Type[] ts) {
for (int i = 0; i < ts.length; i++) {
if (i > 0)
sbuf.append(", ");
}
@Override
- void encode(StringBuffer sb) {
+ void encode(StringBuilder sb) {
sb.append(descriptor);
}
}
* Returns the encoded string representing the object type signature.
*/
public String encode() {
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
encode(sb);
return sb.toString();
}
}
@Override
- void encode(StringBuffer sb) {
+ void encode(StringBuilder sb) {
sb.append('L');
encode2(sb);
sb.append(';');
}
- void encode2(StringBuffer sb) {
+ void encode2(StringBuilder sb) {
ClassType parent = getDeclaringClass();
if (parent != null) {
parent.encode2(sb);
}
@Override
- void encode(StringBuffer sb) {
+ void encode(StringBuilder sb) {
for (int i = 0; i < dim; i++)
sb.append('[');
}
@Override
- void encode(StringBuffer sb) {
+ void encode(StringBuilder sb) {
sb.append('T').append(name).append(';');
}
}