public static Class < ? > getCollectionClass ( Class < ? > clazz ) { if ( Streamable . class . isAssignableFrom ( clazz ) ) { // the class is natively streamable, let's ignore it return null ; } for ( Class < ? > collClass : BasicStreamers . CollectionStreamer . SPECIFICITY_ORDER ) { if ( collClass . isAssignableFrom ( clazz ) ) { return collClass ; } } return null ; }
If the specified class is not Streamable and is a Collection type return the most specific supported Collection interface type ; otherwise return null .