Clover coverage report - Code Coverage for tapestry release 4.0-beta-9
Coverage timestamp: Sat Oct 1 2005 08:36:20 EDT
file stats: LOC: 161   Methods: 13
NCLOC: 60   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  66 public ILibrarySpecification createLibrarySpecification()
 56    {
 57  66 return new LibrarySpecification();
 58    }
 59   
 60    /**
 61    * Returns a new instance of {@link IAssetSpecification}.
 62    *
 63    * @since 3.0
 64    */
 65   
 66  44 public IAssetSpecification createAssetSpecification()
 67    {
 68  44 return new AssetSpecification();
 69    }
 70   
 71    /**
 72    * Creates a new instance of {@link IBeanSpecification}.
 73    *
 74    * @since 3.0
 75    */
 76   
 77  34 public IBeanSpecification createBeanSpecification()
 78    {
 79  34 return new BeanSpecification();
 80    }
 81   
 82  356 public IBindingSpecification createBindingSpecification()
 83    {
 84  356 return new BindingSpecification();
 85    }
 86   
 87    /**
 88    * Creates a new concrete instance of {@link IListenerBindingSpecification}for the given
 89    * language (which is option) and script.
 90    *
 91    * @since 3.0
 92    */
 93   
 94  4 public IListenerBindingSpecification createListenerBindingSpecification()
 95    {
 96  4 return new ListenerBindingSpecification();
 97    }
 98   
 99    /**
 100    * Creates a concrete instance of {@link IComponentSpecification}.
 101    */
 102   
 103  442 public IComponentSpecification createComponentSpecification()
 104    {
 105  442 return new ComponentSpecification();
 106    }
 107   
 108    /**
 109    * Creates a concrete instance of {@link IContainedComponent}.
 110    */
 111   
 112  274 public IContainedComponent createContainedComponent()
 113    {
 114  274 return new ContainedComponent();
 115    }
 116   
 117    /**
 118    * Creates a concrete instance of {@link ParameterSpecification}.
 119    */
 120   
 121  1107 public IParameterSpecification createParameterSpecification()
 122    {
 123  1107 return new ParameterSpecification();
 124    }
 125   
 126   
 127    /** @since 4.0 */
 128  9 public BindingBeanInitializer createBindingBeanInitializer(BindingSource source)
 129    {
 130  9 return new BindingBeanInitializer(source);
 131    }
 132   
 133    /**
 134    * Creates a concrete instance of {@link org.apache.tapestry.spec.IExtensionSpecification}.
 135    *
 136    * @since 2.2
 137    */
 138   
 139  10 public IExtensionSpecification createExtensionSpecification(ClassResolver resolver,
 140    ValueConverter valueConverter)
 141    {
 142  10 return new ExtensionSpecification(resolver, valueConverter);
 143    }
 144   
 145    /**
 146    * Creates a concrete instance of {@link org.apache.tapestry.spec.IPropertySpecification}.
 147    *
 148    * @since 3.0
 149    */
 150   
 151  125 public IPropertySpecification createPropertySpecification()
 152    {
 153  125 return new PropertySpecification();
 154    }
 155   
 156    /** @since 4.0 */
 157  374 public InjectSpecification createInjectSpecification()
 158    {
 159  374 return new InjectSpecificationImpl();
 160    }
 161    }