public static Object findAndBuildGenericType ( final Class < ? > mainClass , final Class < ? > assignableClass , final Class < ? > excludedClass , final Object ... parameters ) throws CoreException { Object object = null ; final Class < ? > objectClass = ClassUtility . findGenericClass ( mainClass , assignableClass ) ; if ( objectClass != null && ( excludedClass == null || ! excludedClass . equals ( objectClass ) ) ) { object = buildGenericType ( mainClass , new Class < ? > [ ] { assignableClass } , parameters ) ; } return object ; }
Find and Build the generic type according to assignable and excluded classes .