private static String obtainGenericContent(String structure){
  String item=structure.substring(structure.indexOf("<") + 1,structure.indexOf(">"));
  int internalGeneric=item.indexOf("<");
  if (internalGeneric != -1)   item=item.substring(0,internalGeneric);
  return item.equals("?") ? "java.lang.Object" : item;
}

private static String obtainGenericContent ( String structure ) { String item = structure . substring ( structure . indexOf ( "<" ) + 1 , structure . indexOf ( ">" ) ) ; int internalGeneric = item . indexOf ( "<" ) ; if ( internalGeneric != - 1 ) item = item . substring ( 0 , internalGeneric ) ; return item . equals ( "?" ) ? "java.lang.Object" : item ; }
if the generics written is ? returns the object class name .
