public static < K > void validateConfiguredTypes ( CacheConfig cacheConfig , K key ) throws ClassCastException { Class keyType = cacheConfig . getKeyType ( ) ; validateConfiguredKeyType ( keyType , key ) ; }
Validates that the configured key matches the provided key .