public static UnresolvedType forGenericTypeSignature(String sig, String declaredGenericSig) {
UnresolvedType ret = UnresolvedType.forSignature(sig);
ret.typeKind = TypeKind.GENERIC;
ClassSignature csig = new GenericSignatureParser().parseAsClassSignature(declaredGenericSig);
GenericSignature.FormalTypeParameter[] ftps = csig.formalTypeParameters;
ret.typeVariables = new TypeVariable[ftps.length];
for (int i = 0; i < ftps.length; i++) {
GenericSignature.FormalTypeParameter parameter = ftps[i];