/** Returns the <code>TransformerFactory</code>. */ protected TransformerFactory getTransformerFactory() { if (transformerFactory == null) { transformerFactory = newTransformerFactory(transformerFactoryClass); } return transformerFactory; }
/** * Instantiate a new TransformerFactory. <p>The default implementation simply calls {@link * TransformerFactory#newInstance()}. If a {@link #setTransformerFactoryClass "transformerFactoryClass"} has been * specified explicitly, the default constructor of the specified class will be called instead. <p>Can be overridden * in subclasses. * * @param transformerFactoryClass the specified factory class (if any) * @return the new TransactionFactory instance * @see #setTransformerFactoryClass * @see #getTransformerFactory() */ protected TransformerFactory newTransformerFactory(Class<? extends TransformerFactory> transformerFactoryClass) { return transformerHelper.newTransformerFactory(transformerFactoryClass); }
/** * Instantiate a new TransformerFactory. <p>The default implementation simply calls {@link * TransformerFactory#newInstance()}. If a {@link #setTransformerFactoryClass "transformerFactoryClass"} has been * specified explicitly, the default constructor of the specified class will be called instead. <p>Can be overridden * in subclasses. * * @param transformerFactoryClass the specified factory class (if any) * @return the new TransactionFactory instance * @see #setTransformerFactoryClass * @see #getTransformerFactory() */ protected TransformerFactory newTransformerFactory(Class<? extends TransformerFactory> transformerFactoryClass) { return transformerHelper.newTransformerFactory(transformerFactoryClass); }
/** * Returns the {@code TransformerFactory}. * * @return the transformer factory */ public TransformerFactory getTransformerFactory() { TransformerFactory result = transformerFactory; if (result == null) { synchronized (this) { result = transformerFactory; if (result == null) { transformerFactory = result = newTransformerFactory(transformerFactoryClass); } } } return result; }
/** * Returns the {@code TransformerFactory}. * * @return the transformer factory */ public TransformerFactory getTransformerFactory() { TransformerFactory result = transformerFactory; if (result == null) { synchronized (this) { result = transformerFactory; if (result == null) { transformerFactory = result = newTransformerFactory(transformerFactoryClass); } } } return result; }