code: public static X509CertChainValidatorExt buildCertificateValidator(
      String trustAnchorsDir, ValidationErrorListener validationErrorListener,
      StoreUpdateListener storeUpdateListener, long updateInterval,
      NamespaceCheckingMode namespaceChecks, CrlCheckingMode crlChecks,
      OCSPCheckingMode ocspChecks, boolean lazy) {
  
      CertificateValidatorBuilder builder = new CertificateValidatorBuilder();
  
      return builder.trustAnchorsDir(trustAnchorsDir)
        .validationErrorListener(validationErrorListener)
        .storeUpdateListener(storeUpdateListener)
        .trustAnchorsUpdateInterval(updateInterval)
        .namespaceChecks(namespaceChecks).crlChecks(crlChecks)
        .ocspChecks(ocspChecks).lazyAnchorsLoading(lazy).build();
    }
docs: Builds an Openssl-style certificate validator configured as specified in
  the parameters
  
  @param trustAnchorsDir
  the directory where trust anchors are loaded from
  @param validationErrorListener
  the listener that will receive notification about validation
  errors
  @param storeUpdateListener
  the listener that will receive notifications about trust store
  update events
  @param updateInterval
  the trust anchor store update interval
  @param namespaceChecks
  the namespace checking policy
  @param crlChecks
  the crl checking policy
  @param ocspChecks
  the ocsp checking policy
  @param lazy
  whether the validator should be lazy in loading crls and
  certificates
  
  @return an Openssl-style certificate validator configured as specified in
  the parameters
  
  @deprecated Create a {@link CertificateValidatorBuilder} object instead.