}
public String toGenericString()
{
// 128 is a reasonable buffer initial size for constructor
CPStringBuilder sb = new CPStringBuilder(128);
Modifier.toString(getModifiers(), sb).append(' ');
Constructor.addTypeParameters(sb, getTypeParameters());
sb.append(getGenericReturnType()).append(' ');
sb.append(getDeclaringClass().getName()).append('.');
sb.append(getName()).append('(');
Type[] types = getGenericParameterTypes();
if (types.length > 0)
{
sb.append(types[0]);
for (int i = 1; i < types.length; i++)
sb.append(',').append(types[i]);
}
sb.append(')');
types = getGenericExceptionTypes();
if (types.length > 0)
{
sb.append(" throws ").append(types[0]);
for (int i = 1; i < types.length; i++)
sb.append(',').append(types[i]);
}
return sb.toString();
}