if (type instanceof GenericArrayType) {
GenericArrayType arrayType = (GenericArrayType)type;
return "[" + getSignature(arrayType.getGenericComponentType());
}
if (type instanceof WildcardType) {
WildcardType wType = (WildcardType)type;
Type[] types = wType.getUpperBounds();
StringBuffer sb = new StringBuffer();
if (types.length == 0 || !(types.length == 1 && types[0] == Object.class)) {
sb.append('+');
for (Type t : types) {
sb.append(getSignature(t));
}
}
types = wType.getLowerBounds();
if (types.length != 0) {
sb.append('-');
for (Type t : wType.getLowerBounds()) {
sb.append(getSignature(t));
}
}
if (sb.length() == 0) {
return "*";