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