public static final class PojoCodecProvider.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
PojoCodecProvider.Builder |
automatic(boolean automatic)
Sets whether the provider should automatically try to create a
ClassModel for any class that is requested. |
PojoCodecProvider |
build()
Creates the PojoCodecProvider with the classes or packages that configured and registered.
|
PojoCodecProvider.Builder |
conventions(List<Convention> conventions)
Sets the conventions to use when creating
ClassModels from classes or packages. |
PojoCodecProvider.Builder |
register(Class<?>... classes)
Registers a classes with the builder for inclusion in the Provider.
|
PojoCodecProvider.Builder |
register(ClassModel<?>... classModels)
Registers classModels for inclusion in the Provider.
|
PojoCodecProvider.Builder |
register(String... packageNames)
Registers the packages of the given classes with the builder for inclusion in the Provider.
|
public PojoCodecProvider build()
register(Class...)public PojoCodecProvider.Builder automatic(boolean automatic)
ClassModel for any class that is requested.
Note: As Java Beans are convention based, when using automatic settings the provider should be the last provider in the registry.
automatic - whether to automatically create ClassModels or not.public PojoCodecProvider.Builder conventions(List<Convention> conventions)
ClassModels from classes or packages.conventions - a list of conventionspublic PojoCodecProvider.Builder register(Class<?>... classes)
Note: Uses reflection for the property mapping. If no conventions are configured on the builder the
Conventions.DEFAULT_CONVENTIONS will be used.
classes - the classes to registerpublic PojoCodecProvider.Builder register(ClassModel<?>... classModels)
classModels - the classModels to registerpublic PojoCodecProvider.Builder register(String... packageNames)
Note: Uses reflection for the field mapping. If no conventions are configured on the builder the
Conventions.DEFAULT_CONVENTIONS will be used.
packageNames - the package names to register