--- projects/cms/source/TemplateClass.java 2000/12/07 21:16:10 1.7 +++ projects/cms/source/TemplateClass.java 2000/12/08 11:44:34 1.8 @@ -1,15 +1,15 @@ //---PACKAGE DECLARATION--- //---IMPORTS--- -import uk.ac.ukc.iscream.util.IscreamNamer; +import uk.ac.ukc.iscream.util.NameFormat; import uk.ac.ukc.iscream.util.ReferenceManager; /** * * * - * @author $Author: tdb $ - * @version $Id: TemplateClass.java,v 1.7 2000/12/07 21:16:10 tdb Exp $ + * @author $Author: ajm $ + * @version $Id: TemplateClass.java,v 1.8 2000/12/08 11:44:34 ajm Exp $ */ class TemplateClass { @@ -18,7 +18,7 @@ class TemplateClass { /** * The current CVS revision of this class */ - public static final String REVISION = "$Revision: 1.7 $"; + public static final String REVISION = "$Revision: 1.8 $"; //---STATIC METHODS--- @@ -30,11 +30,14 @@ class TemplateClass { * Overrides the {@link java.lang.Object#toString() Object.toString()} * method to provide clean logging (every class should have this). * + * This uses the uk.ac.ukc.iscream.util.NameFormat class + * to format the toString() + * * @return the name of this class and its CVS revision */ public String toString() { - return uk.ac.ukc.iscream.util.IscreamNamer.formatName( - uk.ac.ukc.iscream.util.ReferenceManager.getInstance().getName(), + return NameFormat.getName( + _name, this.getClass().getName(), REVISION); } @@ -44,6 +47,23 @@ class TemplateClass { //---ACCESSOR/MUTATOR METHODS--- //---ATTRIBUTES--- + + /** + * This is the friendly identifier of the + * component this class is running in. + * eg, a Filter may be called "filter1", + * If this class does not have an owning + * component, a name from the configuration + * can be placed here. This name could also + * be changed to null for utility classes. + */ + _name = ; + + /** + * This holds a reference to the + * system logger that is being used. + */ + _logger = ReferenceManager.getLogger(); //---STATIC ATTRIBUTES---