KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jzonic > jlo > formatter > AbstractFormatter


1 package org.jzonic.jlo.formatter;
2 /**
3  * This is an abstract implementation of the Formatter interface.
4  * It is used to force all other implementations that extends this
5  * one to provide a constructor which takes the configuration name
6  * as argument. The configuration name must be available to every
7  * formatter in order to use the VariableManager.
8  *
9  * @author Andreas Mecky
10  * @author Terry Dye
11  */

12 public abstract class AbstractFormatter implements Formatter {
13     
14     // the current configuration name
15
private String JavaDoc configName;
16     
17     // private so noone can use it
18
private AbstractFormatter() {
19     }
20         
21     /**
22      * This is the one and only constructor.
23      *
24      * @param configName the name of the current configuration
25      * for this Formatter
26      */

27     public AbstractFormatter(String JavaDoc configName) {
28         this.configName = configName;
29     }
30     
31     /**
32      * This method returns the configuration name for
33      * the specific Formatter
34      *
35      * @return the name of the configuration
36      */

37     public String JavaDoc getConfigurationName() {
38         return configName;
39     }
40 }
41
Popular Tags