Package org.apache.juneau.commons.bean
Class PropertyValidators
java.lang.Object
org.apache.juneau.commons.bean.PropertyValidators
Discovery helper for
PropertyValidatorFactory via ServiceLoader.
Used by the marshalling side (e.g. MarshalledPropertyPostProcessor) to obtain a validator factory at
BeanMeta construction time without taking a hard compile-time dependency on the
juneau-bean-jsonschema module.
If no factory is registered, factory() returns setFactory(PropertyValidatorFactory) as an
escape hatch for multi-classloader / OSGi environments where ServiceLoader discovery does not see provider
jars on the consumer classloader.
- Since:
- 10.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic PropertyValidatorFactoryfactory()Returns the registered factory, ornull if none is on the classpath.static voidOverrides the factory resolved viaServiceLoader.
-
Method Details
-
factory
Returns the registered factory, ornull if none is on the classpath.- Returns:
- The factory, or
null .
-
setFactory
Overrides the factory resolved viaServiceLoader.Pass
null to disable schema validation entirely.- Parameters:
value- The factory to use, ornull to disable.
-