ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/TemplateClass.java
Revision: 1.8
Committed: Fri Dec 8 11:44:34 2000 UTC (23 years, 5 months ago) by ajm
Branch: MAIN
Changes since 1.7: +26 -6 lines
Log Message:
tidied up toString and commented more.  Added a reference to the friendly name and the logger.

File Contents

# Content
1 //---PACKAGE DECLARATION---
2
3 //---IMPORTS---
4 import uk.ac.ukc.iscream.util.NameFormat;
5 import uk.ac.ukc.iscream.util.ReferenceManager;
6
7 /**
8 * <ONE LINE DESCRIPTION>
9 * <DETAILED DESCRIPTION>
10 *
11 * @author $Author: tdb1 $
12 * @version $Id: TemplateClass.java,v 1.7 2000/12/07 21:16:10 tdb1 Exp $
13 */
14 class TemplateClass {
15
16 //---FINAL ATTRIBUTES---
17
18 /**
19 * The current CVS revision of this class
20 */
21 public static final String REVISION = "$Revision: 1.7 $";
22
23 //---STATIC METHODS---
24
25 //---CONSTRUCTORS---
26
27 //---PUBLIC METHODS---
28
29 /**
30 * Overrides the {@link java.lang.Object#toString() Object.toString()}
31 * method to provide clean logging (every class should have this).
32 *
33 * This uses the uk.ac.ukc.iscream.util.NameFormat class
34 * to format the toString()
35 *
36 * @return the name of this class and its CVS revision
37 */
38 public String toString() {
39 return NameFormat.getName(
40 _name,
41 this.getClass().getName(),
42 REVISION);
43 }
44
45 //---PRIVATE METHODS---
46
47 //---ACCESSOR/MUTATOR METHODS---
48
49 //---ATTRIBUTES---
50
51 /**
52 * This is the friendly identifier of the
53 * component this class is running in.
54 * eg, a Filter may be called "filter1",
55 * If this class does not have an owning
56 * component, a name from the configuration
57 * can be placed here. This name could also
58 * be changed to null for utility classes.
59 */
60 _name = <!THIS SHOULD CALL A STATIC NAME IN THE COMPONENT CLASS FOR THIS OBJECT!>;
61
62 /**
63 * This holds a reference to the
64 * system logger that is being used.
65 */
66 _logger = ReferenceManager.getLogger();
67
68 //---STATIC ATTRIBUTES---
69
70 }