Clover coverage report - Code Coverage for tapestry release 4.0.2
Coverage timestamp: Thu Apr 13 2006 10:52:06 EDT
file stats: LOC: 148   Methods: 12
NCLOC: 56   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
SpecFactory.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.ClassResolver;
 18    import org.apache.tapestry.bean.BindingBeanInitializer;
 19    import org.apache.tapestry.binding.BindingSource;
 20    import org.apache.tapestry.coerce.ValueConverter;
 21   
 22    /**
 23    * A Factory used by {@link org.apache.tapestry.parse.SpecificationParser}  to create Tapestry
 24    * domain objects.
 25    * <p>
 26    * The default implementation here creates the expected runtime instances of classes in packages:
 27    * <ul>
 28    * <li>org.apache.tapestry.spec</li>
 29    * <li>org.apache.tapestry.bean</li>
 30    * </ul>
 31    * <p>
 32    * This class is extended by Spindle - the Eclipse Plugin for Tapestry
 33    *
 34    * @author GWL
 35    * @since 1.0.9
 36    */
 37   
 38    public class SpecFactory
 39    {
 40    /**
 41    * Creates a concrete instance of {@link ApplicationSpecification}.
 42    */
 43   
 44  41 public IApplicationSpecification createApplicationSpecification()
 45    {
 46  41 return new ApplicationSpecification();
 47    }
 48   
 49    /**
 50    * Creates an instance of {@link LibrarySpecification}.
 51    *
 52    * @since 2.2
 53    */
 54   
 55  64 public ILibrarySpecification createLibrarySpecification()
 56    {
 57  64 return new LibrarySpecification();
 58    }
 59   
 60    /**
 61    * Returns a new instance of {@link IAssetSpecification}.
 62    *
 63    * @since 3.0
 64    */
 65   
 66  42 public IAssetSpecification createAssetSpecification()
 67    {
 68  42 return new AssetSpecification();
 69    }
 70   
 71    /**
 72    * Creates a new instance of {@link IBeanSpecification}.
 73    *
 74    * @since 3.0
 75    */
 76   
 77  30 public IBeanSpecification createBeanSpecification()
 78    {
 79  30 return new BeanSpecification();
 80    }
 81   
 82  321 public IBindingSpecification createBindingSpecification()
 83    {
 84  321 return new BindingSpecification();
 85    }
 86   
 87    /**
 88    * Creates a concrete instance of {@link IComponentSpecification}.
 89    */
 90   
 91  414 public IComponentSpecification createComponentSpecification()
 92    {
 93  414 return new ComponentSpecification();
 94    }
 95   
 96    /**
 97    * Creates a concrete instance of {@link IContainedComponent}.
 98    */
 99   
 100  249 public IContainedComponent createContainedComponent()
 101    {
 102  249 return new ContainedComponent();
 103    }
 104   
 105    /**
 106    * Creates a concrete instance of {@link ParameterSpecification}.
 107    */
 108   
 109  1164 public IParameterSpecification createParameterSpecification()
 110    {
 111  1164 return new ParameterSpecification();
 112    }
 113   
 114    /** @since 4.0 */
 115  6 public BindingBeanInitializer createBindingBeanInitializer(BindingSource source)
 116    {
 117  6 return new BindingBeanInitializer(source);
 118    }
 119   
 120    /**
 121    * Creates a concrete instance of {@link org.apache.tapestry.spec.IExtensionSpecification}.
 122    *
 123    * @since 2.2
 124    */
 125   
 126  10 public IExtensionSpecification createExtensionSpecification(ClassResolver resolver,
 127    ValueConverter valueConverter)
 128    {
 129  10 return new ExtensionSpecification(resolver, valueConverter);
 130    }
 131   
 132    /**
 133    * Creates a concrete instance of {@link org.apache.tapestry.spec.IPropertySpecification}.
 134    *
 135    * @since 3.0
 136    */
 137   
 138  117 public IPropertySpecification createPropertySpecification()
 139    {
 140  117 return new PropertySpecification();
 141    }
 142   
 143    /** @since 4.0 */
 144  356 public InjectSpecification createInjectSpecification()
 145    {
 146  356 return new InjectSpecificationImpl();
 147    }
 148    }