KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > gcc > properties > SystemPropertyLog


1 /*
2  * Copyright 2004 The Apache Software Foundation or its licensors, as
3  * applicable.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14  * implied.
15  *
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */

19 package gcc.properties;
20
21 import gcc.*;
22
23 public class SystemPropertyLog
24 {
25     public static SystemPropertyLog getInstance(String instanceName)
26     {
27         SystemPropertyLog log = new SystemPropertyLog();
28         log.init(instanceName);
29         return log;
30     }
31
32     // -----------------------------------------------------------------------
33
// private data
34
// -----------------------------------------------------------------------
35

36     private String _instanceName;
37
38     // -----------------------------------------------------------------------
39
// public methods
40
// -----------------------------------------------------------------------
41

42     public String getInstanceName()
43     {
44         return _instanceName;
45     }
46
47     // -----------------------------------------------------------------------
48
// protected methods
49
// -----------------------------------------------------------------------
50

51     protected void init(String instanceName)
52     {
53         _instanceName = instanceName;
54     }
55
56     // -----------------------------------------------------------------------
57
// log methods
58
// -----------------------------------------------------------------------
59

60     public void debugUsingValue(String value)
61     {
62         System.out.println( "SystemPropertyLog.debugUsingValue(): value: " + value );
63     }
64
65     public void debugUsingDefaultValue(String defaultValue)
66     {
67         System.out.println( "SystemPropertyLog.debugUsingValue(): defaultValue: " + defaultValue );
68     }
69 }
70
Popular Tags