public static ClassNode pickGenericType ( ClassNode type , int gtIndex ) { final GenericsType [ ] genericsTypes = type . getGenericsTypes ( ) ; if ( genericsTypes == null || genericsTypes . length < gtIndex ) { return ClassHelper . OBJECT_TYPE ; } return genericsTypes [ gtIndex ] . getType ( ) ; }
A helper method which will extract the n - th generic type from a class node .