return signature;
}
- // Check that the first and the second halves are the same, e.g., TT for Class<T>
- int halfPos = cleanSig.length()/2;
- String firstHalf = cleanSig.substring(0, halfPos);
- String secondHalf = cleanSig.substring(halfPos, cleanSig.length());
- if (firstHalf.equals(secondHalf)) {
- return firstHalf;
- } else {
- // This is probably a class, e.g., +java.lang.Class
+ // Check if this is not a class name, e.g., +java.lang.Class
+ if (cleanSig.contains(".")) {
return signature;
}
+
+ // Just return the second half of the signature to get the Type parameter
+ int halfPos = cleanSig.length()/2;
+ //String firstHalf = cleanSig.substring(0, halfPos);
+ String secondHalf = cleanSig.substring(halfPos, cleanSig.length());
+ return secondHalf;
}
// TODO: Fix for Groovy's model-checking
}