Class ValidationExecutorFactory

    • Constructor Detail

      • ValidationExecutorFactory

        public ValidationExecutorFactory​(ClassLoader classLoader)
        Creates a new instance with ValidatorFactory instances being created via the ServiceLoader being used with the given classloader.
        classLoader - the class loader to be used with the service loader
    • Method Detail

      • createValidationExecutor

        public @Nullable ValidationExecutor createValidationExecutor​(@NotNull
                                                                     @NotNull ValidationContext context,
                                                                     boolean isSubPackage,
                                                                     boolean enforceSubpackageValidation,
                                                                     Map<String,​? extends ValidatorSettings> validatorSettingsById)
        Creates a ValidationExecutor for the given context.
        context - the validation context given to the validators
        isSubPackage - true in case this is a subpackage, otherwise false
        enforceSubpackageValidation - true in case all validators should be also applied in any case to the sub package (independent of their ValidatorFactory.shouldValidateSubpackages() return value)
        validatorSettingsById - a map of ValidatorSettings. The key is the validator id. May be null.
        either null or an executor (if at least one validator is registered)