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: 74   Methods: 4
NCLOC: 31   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ComponentClassProviderContext.java - 100% 100% 100%
coverage
 1    // Copyright 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.pageload;
 16   
 17    import org.apache.hivemind.util.Defense;
 18    import org.apache.tapestry.INamespace;
 19    import org.apache.tapestry.spec.IComponentSpecification;
 20   
 21    /**
 22    * Contains information needed when trying to determine the name of a page or component class.
 23    *
 24    * @author Howard M. Lewis Ship
 25    * @since 4.0
 26    */
 27    public class ComponentClassProviderContext
 28    {
 29    private INamespace _namespace;
 30   
 31    private String _name;
 32   
 33    private IComponentSpecification _specification;
 34   
 35  1112 public ComponentClassProviderContext(String pageName,
 36    IComponentSpecification pageSpecification, INamespace namespace)
 37    {
 38  1112 Defense.notNull(pageName, "pageName");
 39  1112 Defense.notNull(pageSpecification, "pageSpecification");
 40  1112 Defense.notNull(namespace, "namespace");
 41   
 42  1112 _name = pageName;
 43  1112 _specification = pageSpecification;
 44  1112 _namespace = namespace;
 45    }
 46   
 47    /**
 48    * Returns the simple, unqualifed name of the page, or the type of the component. There will not
 49    * be a namespace prefix, but there may be one or more folders (i.e., "admin/Menu").
 50    */
 51   
 52  83 public String getName()
 53    {
 54  83 return _name;
 55    }
 56   
 57    /**
 58    * Returns the namespace containing the page.
 59    */
 60   
 61  127 public INamespace getNamespace()
 62    {
 63  127 return _namespace;
 64    }
 65   
 66    /**
 67    * Returns the specification defining the page.
 68    */
 69  1110 public IComponentSpecification getSpecification()
 70    {
 71  1110 return _specification;
 72    }
 73   
 74    }