metadata
argument is used for passing data on the expectations of the clients of the factory. The client might choose not to pass any metadata at all, basically leaving it up to the factory to make its own decisions based on type information only. The client might also pass an empty {@link AnnotatedElement}.
Note the subtle difference here. Passing null
means: if you can create a {@link Codec} for this type, then please do so. Passing an empty {@link AnnotatedElement} means: pleasegive me a {@link Codec} for the given type, but only if you find an annotation that explicitly tells you to doso.
|
|