1 /*
2 * Copyright 2005-2008 Werner Guttmann
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 * in compliance with the License. You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software distributed under the License
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 * or implied. See the License for the specific language governing permissions and limitations under
12 * the License.
13 */
14 package org.exolab.castor.builder.printing;
15
16 /**
17 * {@link JClassPrinterFactory} instance that returns standard 'Writer'-based {@link JClassPrinter}
18 * instances. This is currently the default {@link JClassPrinterFactory} instance used for code
19 * generation, but will be replaced in the foreseeable future.
20 *
21 * @since 1.2.1
22 */
23 public class StandardJClassPrinterFactory implements JClassPrinterFactory {
24
25 /**
26 * The name of the factory.
27 */
28 private static final String NAME = "standard";
29
30 /**
31 * {@inheritDoc}
32 *
33 * @see org.exolab.castor.builder.printing.JClassPrinterFactory#getJClassPrinter()
34 */
35 public JClassPrinter getJClassPrinter() {
36 return new WriterJClassPrinter();
37 }
38
39 /**
40 * {@inheritDoc}
41 *
42 * @see org.exolab.castor.builder.printing.JClassPrinterFactory#getName()
43 */
44 public String getName() {
45 return NAME;
46 }
47
48 }