}
else if (args[i].getType() instanceof SignatureAttribute.TypeVariable)
{
SignatureAttribute.TypeVariable tv = (SignatureAttribute.TypeVariable) args[i].getType();
Object[] bounds = new Object[] {Object.class};
bound = new TypeVariableImpl(bounds, targetClass, tv.getName());
}
}
typeArgs[i] = new WildcardTypeImpl(bound, args[i].getKind());
}
else if (args[i].getType() instanceof SignatureAttribute.ClassType)
{
typeArgs[i] = Class.forName(((SignatureAttribute.ClassType) args[i].getType()).getName());
}
else if (args[i].getType() instanceof SignatureAttribute.TypeVariable)
{
SignatureAttribute.TypeVariable tv = (SignatureAttribute.TypeVariable) args[i].getType();
Object[] bounds = new Object[] {Object.class};
typeArgs[i] = new TypeVariableImpl(bounds, targetClass, tv.getName());
}
else
{
throw new RuntimeException("Invalid argument type " + args[i].getType());
}
}
}
return new ParameterizedTypeImpl(type.toString(), targetClass, ownerType, typeArgs);
}
}
else if (type instanceof SignatureAttribute.TypeVariable)
{
SignatureAttribute.TypeVariable tv = (SignatureAttribute.TypeVariable)type;
Object [] bounds = new Object[]{Object.class};
return new TypeVariableImpl(bounds, targetClass, tv.getName());
}
else if (type instanceof SignatureAttribute.ArrayType)
{
SignatureAttribute.ArrayType arrayType = (SignatureAttribute.ArrayType)type;
return new GenericArrayTypeImpl(arrayType.getComponentType(), arrayType.getDimension(), arrayType.toString());