Clover coverage report - Code Coverage for tapestry release 4.0-beta-12
Coverage timestamp: Sun Oct 30 2005 16:22:01 EST
file stats: LOC: 61   Methods: 3
NCLOC: 30   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
BeanSetPropertySetter.java 100% 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.parse;
 16   
 17    import org.apache.hivemind.impl.BaseLocatable;
 18    import org.apache.tapestry.bean.BindingBeanInitializer;
 19    import org.apache.tapestry.spec.IBeanSpecification;
 20   
 21    /**
 22    * Holds the data from a <set-property> element while the body is being parsed.
 23    *
 24    * @author Howard Lewis Ship
 25    */
 26    class BeanSetPropertySetter extends BaseLocatable
 27    {
 28    private IBeanSpecification _beanSpecification;
 29   
 30    private BindingBeanInitializer _initializer;
 31   
 32    private String _bindingReference;
 33   
 34    private String _prefix;
 35   
 36  5 BeanSetPropertySetter(IBeanSpecification beanSpecification, BindingBeanInitializer initializer,
 37    String prefix, String expression)
 38    {
 39  5 _beanSpecification = beanSpecification;
 40  5 _initializer = initializer;
 41  5 _prefix = prefix;
 42  5 _bindingReference = expression;
 43    }
 44   
 45  5 void applyBindingReference(String bindingReference)
 46    {
 47  5 String fullBindingReference = _prefix == null ? bindingReference : _prefix
 48    + bindingReference;
 49   
 50  5 _initializer.setBindingReference(fullBindingReference);
 51   
 52  5 _beanSpecification.setLocation(getLocation());
 53  5 _beanSpecification.addInitializer(_initializer);
 54    }
 55   
 56  5 public String getBindingReference()
 57    {
 58  5 return _bindingReference;
 59    }
 60   
 61    }