private boolean strategySupportsNormalizer ( NormalizerSerializerStrategy strategy , NormalizerType normalizerType , Class < ? extends Normalizer > normalizerClass ) { if ( ! strategy . getSupportedType ( ) . equals ( normalizerType ) ) { return false ; } if ( strategy . getSupportedType ( ) . equals ( NormalizerType . CUSTOM ) ) { // Strategy should be instance of CustomSerializerStrategy if ( ! ( strategy instanceof CustomSerializerStrategy ) ) { throw new IllegalArgumentException ( "Strategies supporting CUSTOM opType must be instance of CustomSerializerStrategy, got" + strategy . getClass ( ) ) ; } return ( ( CustomSerializerStrategy ) strategy ) . getSupportedClass ( ) . equals ( normalizerClass ) ; } return true ; }
Check if a serializer strategy supports a normalizer . If the normalizer is a custom opType it checks if the supported normalizer class matches .