Clover coverage report - Code Coverage for tapestry release 4.0-beta-6
Coverage timestamp: Wed Sep 7 2005 18:41:34 EDT
file stats: LOC: 95   Methods: 9
NCLOC: 44   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
PropertySpecification.java - 100% 100% 100%
coverage
 1    // Copyright 2004, 2005 The Apache Software Foundation
 2    //
 3    // Licensed under the Apache License, Version 2.0 (the "License");
 4    // you may not use this file except in compliance with the License.
 5    // You may obtain a copy of the License at
 6    //
 7    // http://www.apache.org/licenses/LICENSE-2.0
 8    //
 9    // Unless required by applicable law or agreed to in writing, software
 10    // distributed under the License is distributed on an "AS IS" BASIS,
 11    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12    // See the License for the specific language governing permissions and
 13    // limitations under the License.
 14   
 15    package org.apache.tapestry.spec;
 16   
 17    import org.apache.hivemind.impl.BaseLocatable;
 18   
 19    /**
 20    * Defines a transient or persistant property of a component or page. A
 21    * {@link org.apache.tapestry.engine.IComponentClassEnhancer}uses this information to create a
 22    * subclass with the necessary instance variables and methods.
 23    *
 24    * @author Howard Lewis Ship
 25    * @since 3.0
 26    */
 27   
 28    public class PropertySpecification extends BaseLocatable implements IPropertySpecification
 29    {
 30    private String _name;
 31   
 32    private String _type;
 33   
 34    private String _initialValue;
 35   
 36    private String _persistence;
 37   
 38  256 public String getInitialValue()
 39    {
 40  256 return _initialValue;
 41    }
 42   
 43  262 public String getName()
 44    {
 45  262 return _name;
 46    }
 47   
 48  128 public boolean isPersistent()
 49    {
 50  128 return _persistence != null;
 51    }
 52   
 53    /**
 54    * The type of property to create, or null if no type was specified. The value is the name of a
 55    * primitive type, a fully qualified class name, or an array name for either. Type is only
 56    * specified for 3.0 DTDs, in 4.0 the only behavior is for the new property to match the type
 57    * defined by an abstract accessor, or to be java.lang.Object.
 58    */
 59  126 public String getType()
 60    {
 61  126 return _type;
 62    }
 63   
 64  256 public void setInitialValue(String initialValue)
 65    {
 66  256 _initialValue = initialValue;
 67    }
 68   
 69    /**
 70    * Sets the name of the property. This should not be changed once this IPropertySpecification is
 71    * added to a {@link org.apache.tapestry.spec.ComponentSpecification}.
 72    */
 73   
 74  130 public void setName(String name)
 75    {
 76  130 _name = name;
 77    }
 78   
 79  54 public void setType(String type)
 80    {
 81  54 _type = type;
 82    }
 83   
 84    /** @since 4.0 */
 85  20 public String getPersistence()
 86    {
 87  20 return _persistence;
 88    }
 89   
 90    /** @since 4.0 */
 91  130 public void setPersistence(String persistence)
 92    {
 93  130 _persistence = persistence;
 94    }
 95    }