ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/util/uk/org/iscream/cms/util/FormatName.java
(Generate patch)

Comparing projects/cms/source/util/uk/org/iscream/cms/util/FormatName.java (file contents):
Revision 1.2 by ajm, Fri Dec 8 11:40:08 2000 UTC vs.
Revision 1.3 by ajm, Tue Dec 12 18:24:00 2000 UTC

# Line 24 | Line 24 | public class FormatName {
24       * This is of use to the override of the toString() as
25       * implemented by most of the iscream objects.
26       *
27 +     * It has support for null friendly name and null class name
28 +     * bit NOT both at the same time.
29 +     *
30       * @param friendlyName the configured name of the instance of the calling component the class is in (eg "filter1")
31       * @param className the class name of the calling class, as obtained by getClass().getName()
32       * @param revision the CVS Revision number for the calling class
# Line 32 | Line 35 | public class FormatName {
35       */
36      public static String getName(String friendlyName, String className, String revision) {
37          if (friendlyName == null) {
38 <            return  "{"+ className + "}(" + revision.substring(11, revision.length() - 2) + ")";
38 >            return  "{"+ className + "(v" + revision.substring(11, revision.length() - 2) + ")}";
39 >        } else if (className == null) {
40 >            return friendlyName + "{static(v" + revision.substring(11, revision.length() - 2) + ")}";
41 >        } else {
42 >            return friendlyName + "{"+ className + "(v" + revision.substring(11, revision.length() - 2) + ")}";
43          }
37        return friendlyName + "{"+ className + "}(" + revision.substring(11, revision.length() - 2) + ")";
44      }
45  
46   //---CONSTRUCTORS---

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines