public static boolean isConcrete ( Type t ) { if ( t instanceof Class ) { final Class < ? > c = ( Class < ? > ) t ; return ! c . isInterface ( ) && ! Modifier . isAbstract ( c . getModifiers ( ) ) ; } if ( t instanceof ParameterizedType ) { final ParameterizedType p = ( ParameterizedType ) t ; return isConcrete ( p . getRawType ( ) ) ; } return false ; }
Test if type is concrete that is is not interface or abstract . If type to test is parameterized uses its raw type . If type to test is null returns false .