class SampleClass<VWXZ> {
private String sampleField;
- public Generic<Integer,String,Double,Short,Float> setSampleField(Class<VWXZ> clazz, List<String> listString, Map<Integer,String> mapString,
+ public Generic<Integer,String,Double,Short,Float> setSampleField(Class<?> clazz, List<String> listString, Map<Integer,String> mapString,
Generic<Integer,String,Double,Short,Float> test,
String sampleField, int one, short two, double three, Object obj) {
this.sampleField = sampleField;
return test;
}
-
+
/*public String getSampleField() {
return sampleField;
Method[] methods = Class.class.getMethods();
Method method = null;
for(Method mth : methods) {
- if (mth.getName().equals("isAnnotationPresent")) {
+ if (mth.getName().equals("isAssignableFrom")) {
method = mth;
}
}
public String[] getArgumentGenericTypeNames () {
// TODO: We need to double check but for some reason Groovy has a type of generic signature with "<*>"
// TODO: in the class file.
- if (genericSignature == null || genericSignature.equals("") || genericSignature.contains("<*>"))
+ if (genericSignature == null || genericSignature.equals(""))
return getArgumentTypeNames();
// We need to first find the start of the method parameters in the signature
String methodParameters = genericSignature.substring(genericSignature.indexOf('('));
int semicolon = signature.indexOf(';', idx);
// TODO: Fix for Groovy's model-checking
// Check if this is a generic!
- if (signature.substring(idx,semicolon).indexOf('<') != -1) {
- int generic = signature.indexOf('>', semicolon);
- if (generic != -1) {
- // Advance one character past the ';'
- semicolon = generic + 1;
+ int genericStart = signature.substring(idx,semicolon).indexOf('<');
+ if (genericStart != -1) {
+ if (signature.charAt(genericStart + 2) == '*') {
+ semicolon = genericStart + 4;
+ } else {
+ int generic = signature.indexOf('>', semicolon);
+ if (generic != -1) {
+ // Advance one character past the ';'
+ semicolon = generic + 1;
+ }
}
}