commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scolebou...@apache.org
Subject cvs commit: jakarta-commons/lang/src/test/org/apache/commons/lang/builder StandardToStringStyleTest.java
Date Sat, 16 Aug 2003 12:56:26 GMT
scolebourne    2003/08/16 05:56:26

  Modified:    lang/src/java/org/apache/commons/lang/builder
                        ToStringStyle.java StandardToStringStyle.java
               lang/src/test/org/apache/commons/lang/builder
                        StandardToStringStyleTest.java
  Log:
  Deprecate shortClassName in favour of useShortClassName for consistency
  
  Revision  Changes    Path
  1.23      +23 -1     jakarta-commons/lang/src/java/org/apache/commons/lang/builder/ToStringStyle.java
  
  Index: ToStringStyle.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/builder/ToStringStyle.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- ToStringStyle.java	14 Aug 2003 00:10:42 -0000	1.22
  +++ ToStringStyle.java	16 Aug 2003 12:56:25 -0000	1.23
  @@ -1458,7 +1458,18 @@
       /**
        * <p>Gets whether to output short or long class names.</p>
        *
  +     * @return the current useShortClassName flag
  +     */
  +    protected boolean isUseShortClassName() {
  +        return useShortClassName;
  +    }
  +
  +    /**
  +     * <p>Gets whether to output short or long class names.</p>
  +     *
        * @return the current shortClassName flag
  +     * @deprecated Use {@link #isUseShortClassName()}
  +     *             Method will be removed in Commons Lang 3.0.
        */
       protected boolean isShortClassName() {
           return useShortClassName;
  @@ -1467,7 +1478,18 @@
       /**
        * <p>Sets whether to output short or long class names.</p>
        *
  +     * @param useShortClassName  the new useShortClassName flag
  +     */
  +    protected void setUseShortClassName(boolean useShortClassName) {
  +        this.useShortClassName = useShortClassName;
  +    }
  +
  +    /**
  +     * <p>Sets whether to output short or long class names.</p>
  +     *
        * @param shortClassName  the new shortClassName flag
  +     * @deprecated Use {@link #setUseShortClassName(boolean)}
  +     *             Method will be removed in Commons Lang 3.0.
        */
       protected void setShortClassName(boolean shortClassName) {
           this.useShortClassName = shortClassName;
  
  
  
  1.12      +25 -3     jakarta-commons/lang/src/java/org/apache/commons/lang/builder/StandardToStringStyle.java
  
  Index: StandardToStringStyle.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/builder/StandardToStringStyle.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- StandardToStringStyle.java	16 Aug 2003 12:41:23 -0000	1.11
  +++ StandardToStringStyle.java	16 Aug 2003 12:56:25 -0000	1.12
  @@ -102,19 +102,41 @@
       /**
        * <p>Gets whether to output short or long class names.</p>
        *
  +     * @return the current useShortClassName flag
  +     */
  +    public boolean isUseShortClassName() {
  +        return super.isUseShortClassName();
  +    }
  +
  +    /**
  +     * <p>Gets whether to output short or long class names.</p>
  +     *
        * @return the current shortClassName flag
  +     * @deprecated Use {@link #isUseShortClassName()}
  +     *             Method will be removed in Commons Lang 3.0.
        */
       public boolean isShortClassName() {
  -        return super.isShortClassName();
  +        return super.isUseShortClassName();
  +    }
  +
  +    /**
  +     * <p>Sets whether to output short or long class names.</p>
  +     *
  +     * @param useShortClassName  the new useShortClassName flag
  +     */
  +    public void setUseShortClassName(boolean useShortClassName) {
  +        super.setUseShortClassName(useShortClassName);
       }
   
       /**
        * <p>Sets whether to output short or long class names.</p>
        *
        * @param shortClassName  the new shortClassName flag
  +     * @deprecated Use {@link #setUseShortClassName(boolean)}
  +     *             Method will be removed in Commons Lang 3.0.
        */
       public void setShortClassName(boolean shortClassName) {
  -        super.setShortClassName(shortClassName);
  +        super.setUseShortClassName(shortClassName);
       }
   
       //---------------------------------------------------------------------
  
  
  
  1.4       +2 -2      jakarta-commons/lang/src/test/org/apache/commons/lang/builder/StandardToStringStyleTest.java
  
  Index: StandardToStringStyleTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/builder/StandardToStringStyleTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StandardToStringStyleTest.java	21 May 2003 23:49:15 -0000	1.3
  +++ StandardToStringStyleTest.java	16 Aug 2003 12:56:25 -0000	1.4
  @@ -75,7 +75,7 @@
       private static final StandardToStringStyle STYLE = new StandardToStringStyle();
       
       static {
  -        STYLE.setShortClassName(true);
  +        STYLE.setUseShortClassName(true);
           STYLE.setUseIdentityHashCode(false);
           STYLE.setArrayStart("[");
           STYLE.setArraySeparator(", ");
  
  
  

Mime
View raw message