File Source: RuntimeConfigProperty.java

         /* 
    P/P   *  Method: void readObject(ObjectInputStream)
          * 
          *  Preconditions:
          *    Param_1 != null
          * 
          *  Presumptions:
          *    init'ed(org.apache.openjpa.enhance.PersistenceCapable.DESERIALIZED)
          * 
          *  Postconditions:
          *    Param_0.pcDetachedState == org.apache.openjpa.enhance.PersistenceCapable.DESERIALIZED
          *    (soft) init'ed(Param_0.pcDetachedState)
          */
     1  /*
     2   * Licensed to the Apache Software Foundation (ASF) under one or more
     3   *  contributor license agreements.  The ASF licenses this file to You
     4   * under the Apache License, Version 2.0 (the "License"); you may not
     5   * use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *
     8   *     http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.  For additional information regarding
    15   * copyright in this work, please see the NOTICE file in the top level
    16   * directory of this distribution.
    17   */
    18  
    19  package org.apache.roller.weblogger.pojos;
    20  
    21  import java.io.Serializable;
    22  import org.apache.commons.lang.builder.EqualsBuilder;
    23  import org.apache.commons.lang.builder.HashCodeBuilder;
    24  
    25  
    26  /**
    27   * This POJO represents a single property of the roller system.
    28   */
    29  public class RuntimeConfigProperty implements Serializable {
    30      
    31      public static final long serialVersionUID = 6913562779484028899L;
    32      
    33      private String name;
    34      private String value;
    35      
    36      
             /* 
    P/P       *  Method: void org.apache.roller.weblogger.pojos.RuntimeConfigProperty()
              */
    37      public RuntimeConfigProperty() {}
    38      
    39      
             /* 
    P/P       *  Method: void org.apache.roller.weblogger.pojos.RuntimeConfigProperty(String, String)
              * 
              *  Postconditions:
              *    this.name == name
              *    init'ed(this.name)
              *    this.value == value
              *    init'ed(this.value)
              */
    40      public RuntimeConfigProperty(String name, String value) {
    41          this.name = name;
    42          this.value = value;
    43      }
    44      
    45      
    46      /**
    47       * Getter for property name.
    48       *
    49       * @return Value of property name.
    50       */
    51      public String getName() {
                 /* 
    P/P           *  Method: String pcgetName()
                  * 
                  *  Preconditions:
                  *    init'ed(this.name)
                  * 
                  *  Postconditions:
                  *    return_value == this.name
                  *    init'ed(return_value)
                  */
    52          return this.name;
    53      }
    54      
    55      /**
    56       * Setter for property name.
    57       *
    58       * @param name New value of property name.
    59       */
    60      public void setName(String name) {
                 /* 
    P/P           *  Method: void pcsetName(String)
                  * 
                  *  Postconditions:
                  *    this.name == Param_1
                  *    init'ed(this.name)
                  */
    61          this.name = name;
    62      }
    63      
    64      /**
    65       * Getter for property value.
    66       *
    67       * @return Value of property value.
    68       */
    69      public String getValue() {
                 /* 
    P/P           *  Method: String pcgetValue()
                  * 
                  *  Preconditions:
                  *    init'ed(this.value)
                  * 
                  *  Postconditions:
                  *    return_value == this.value
                  *    init'ed(return_value)
                  */
    70          return this.value;
    71      }
    72      
    73      /**
    74       * Setter for property value.
    75       *
    76       * @param value New value of property value.
    77       */
    78      public void setValue(String value) {
                 /* 
    P/P           *  Method: void pcsetValue(String)
                  * 
                  *  Postconditions:
                  *    this.value == Param_1
                  *    init'ed(this.value)
                  */
    79          this.value = value;
    80      }
    81      
    82      //------------------------------------------------------- Good citizenship
    83      
    84      public String toString() {
                 /* 
    P/P           *  Method: String toString()
                  * 
                  *  Preconditions:
                  *    init'ed(this.name)
                  *    init'ed(this.value)
                  * 
                  *  Postconditions:
                  *    java.lang.StringBuilder:toString(...)._tainted == this.name._tainted | this.value._tainted
                  *    init'ed(java.lang.StringBuilder:toString(...)._tainted)
                  *    return_value == &java.lang.StringBuilder:toString(...)
                  */
    85          return (this.name + "=" + this.value);
    86      }
    87      
    88      public boolean equals(Object other) {
                 /* 
    P/P           *  Method: bool equals(Object)
                  * 
                  *  Preconditions:
                  *    (soft) init'ed(other.name)
                  *    (soft) init'ed(other.pcStateManager)
                  *    (soft) init'ed(pcInheritedFieldCount)
                  *    (soft) init'ed(this.name)
                  *    (soft) init'ed(this.pcStateManager)
                  * 
                  *  Presumptions:
                  *    org.apache.commons.lang.builder.EqualsBuilder:append(...)@92 != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  * 
                  *  Test Vectors:
                  *    other == this: {0}, {1}
                  */
    89          if (other == this) return true;
    90          if (other instanceof RuntimeConfigProperty != true) return false;
    91          RuntimeConfigProperty o = (RuntimeConfigProperty)other;
    92          return new EqualsBuilder()
    93          .append(getName(), o.getName())
    94          .isEquals();
    95      }
    96      
    97      public int hashCode() {
                 /* 
    P/P           *  Method: int hashCode()
                  * 
                  *  Preconditions:
                  *    init'ed(this.name)
                  *    init'ed(this.pcStateManager)
                  *    (soft) init'ed(pcInheritedFieldCount)
                  * 
                  *  Presumptions:
                  *    org.apache.commons.lang.builder.HashCodeBuilder:append(...)@98 != null
                  * 
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
    98          return new HashCodeBuilder()
    99          .append(getName())
   100          .toHashCode();
   101      }
   102      
   103  }
+  104  Other Messages








SofCheck Inspector Build Version : 2.18479
RuntimeConfigProperty.java 2009-Jan-02 14:25:30
RuntimeConfigProperty.class 2009-Sep-04 03:12:38