private static void getContainedGenericTypes ( CompositeType < ? > typeInfo , List < GenericTypeInfo < ? > > target ) { for ( int i = 0 ; i < typeInfo . getArity ( ) ; i ++ ) { TypeInformation < ? > type = typeInfo . getTypeAt ( i ) ; if ( type instanceof CompositeType ) { getContainedGenericTypes ( ( CompositeType < ? > ) type , target ) ; } else if ( type instanceof GenericTypeInfo ) { if ( ! target . contains ( type ) ) { target . add ( ( GenericTypeInfo < ? > ) type ) ; } } } }
Returns all GenericTypeInfos contained in a composite type .