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 Velocity-based {@link JClassPrinter}
18 * instances.
19 *
20 * @since 1.2.1
21 */
22 public class TemplateJClassPrinterFactory implements JClassPrinterFactory {
23
24 /**
25 * The name of the factory.
26 */
27 private static final String NAME = "velocity";
28
29 /**
30 * {@inheritDoc}
31 *
32 * @see org.exolab.castor.builder.printing.JClassPrinterFactory#getJClassPrinter()
33 */
34 public JClassPrinter getJClassPrinter() {
35 return new TemplateJClassPrinter();
36 }
37
38 /**
39 * {@inheritDoc}
40 *
41 * @see org.exolab.castor.builder.printing.JClassPrinterFactory#getName()
42 */
43 public String getName() {
44 return NAME;
45 }
46
47 }