Refactor the getPossibleType method in JsonEncoderDecoderClassCreator. I
created a kind of JsonTypeInfo.Id visitor that can be reused for other
matters. I extracted the code from the JsonEncoderDecoderClassCreator to
put it in the visitor.