28 import java.util.Properties;
29
30 /**
31 * An instance of this abstract class can transform a
32 * source tree into a result tree.
33 *
34 * <p>An instance of this class can be obtained with the
35 * {@link TransformerFactory#newTransformer TransformerFactory.newTransformer}
36 * method. This instance may then be used to process XML from a
37 * variety of sources and write the transformation output to a
38 * variety of sinks.</p>
39 *
40 * <p>An object of this class may not be used in multiple threads
41 * running concurrently. Different Transformers may be used
42 * concurrently by different threads.</p>
43 *
44 * <p>A <code>Transformer</code> may be used multiple times. Parameters and
45 * output properties are preserved across transformations.</p>
46 *
47 * @author <a href="Jeff.Suttor@Sun.com">Jeff Suttor</a>
48 */
49 public abstract class Transformer {
50
51 /**
52 * Default constructor is protected on purpose.
53 */
54 protected Transformer() { }
55
56 /**
57 * <p>Reset this <code>Transformer</code> to its original configuration.</p>
58 *
59 * <p><code>Transformer</code> is reset to the same state as when it was created with
60 * {@link TransformerFactory#newTransformer()},
61 * {@link TransformerFactory#newTransformer(Source source)} or
62 * {@link Templates#newTransformer()}.
63 * <code>reset()</code> is designed to allow the reuse of existing <code>Transformer</code>s
64 * thus saving resources associated with the creation of new <code>Transformer</code>s.</p>
65 *
66 * <p>The reset <code>Transformer</code> is not guaranteed to have the same {@link URIResolver}
67 * or {@link ErrorListener} <code>Object</code>s, e.g. {@link Object#equals(Object obj)}.
|
28 import java.util.Properties;
29
30 /**
31 * An instance of this abstract class can transform a
32 * source tree into a result tree.
33 *
34 * <p>An instance of this class can be obtained with the
35 * {@link TransformerFactory#newTransformer TransformerFactory.newTransformer}
36 * method. This instance may then be used to process XML from a
37 * variety of sources and write the transformation output to a
38 * variety of sinks.</p>
39 *
40 * <p>An object of this class may not be used in multiple threads
41 * running concurrently. Different Transformers may be used
42 * concurrently by different threads.</p>
43 *
44 * <p>A <code>Transformer</code> may be used multiple times. Parameters and
45 * output properties are preserved across transformations.</p>
46 *
47 * @author <a href="Jeff.Suttor@Sun.com">Jeff Suttor</a>
48 * @since 1.4
49 */
50 public abstract class Transformer {
51
52 /**
53 * Default constructor is protected on purpose.
54 */
55 protected Transformer() { }
56
57 /**
58 * <p>Reset this <code>Transformer</code> to its original configuration.</p>
59 *
60 * <p><code>Transformer</code> is reset to the same state as when it was created with
61 * {@link TransformerFactory#newTransformer()},
62 * {@link TransformerFactory#newTransformer(Source source)} or
63 * {@link Templates#newTransformer()}.
64 * <code>reset()</code> is designed to allow the reuse of existing <code>Transformer</code>s
65 * thus saving resources associated with the creation of new <code>Transformer</code>s.</p>
66 *
67 * <p>The reset <code>Transformer</code> is not guaranteed to have the same {@link URIResolver}
68 * or {@link ErrorListener} <code>Object</code>s, e.g. {@link Object#equals(Object obj)}.
|