class PerThreadDocumentBuilderProvider implements DocumentBuilderProvider {

    public DocumentBuilder getDocumentBuilder(final boolean validating) throws ParserConfigurationException {
        return validating ? validatingDBCache.getInstanceForCurrentThread()
                          : nonValidatingDBCache.getInstanceForCurrentThread();
    }

      PerThreadDocumentBuilderProvider(final DocumentBuilderProvider delegate, final int maxSize);
      PerThreadDocumentBuilderProvider(final DocumentBuilderProvider delegate);

}