Coverage Report - org.apache.tapestry5.internal.parser.ComponentTemplate
 
Classes in this File Line Coverage Branch Coverage Complexity
ComponentTemplate
N/A
N/A
0
 
 1  
 // Copyright 2006, 2008, 2009 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.tapestry5.internal.parser;
 16  
 
 17  
 import org.apache.tapestry5.ioc.Location;
 18  
 import org.apache.tapestry5.ioc.Resource;
 19  
 
 20  
 import java.util.List;
 21  
 import java.util.Map;
 22  
 
 23  
 /**
 24  
  * A parsed component template, containing all the tokens parsed from the template.
 25  
  */
 26  
 public interface ComponentTemplate
 27  
 {
 28  
     /**
 29  
      * Returns true if no template could be found for the component.
 30  
      */
 31  
     boolean isMissing();
 32  
 
 33  
     /**
 34  
      * Returns true if this component template is an extension of its parent class' template.
 35  
      *
 36  
      * @since 5.1.0.1
 37  
      */
 38  
     boolean isExtension();
 39  
 
 40  
     /**
 41  
      * Returns a list of tokens associated with an extension point, or null if this template neither defines the
 42  
      * extension point nor overrides it.
 43  
      *
 44  
      * @param extensionPointId
 45  
      * @return list of tokens provided in this template, or null
 46  
      * @since 5.1.0.1
 47  
      */
 48  
     List<TemplateToken> getExtensionPointTokens(String extensionPointId);
 49  
 
 50  
     /**
 51  
      * Returns the resource that was parsed to form the template.
 52  
      */
 53  
     Resource getResource();
 54  
 
 55  
     /**
 56  
      * Returns a list of tokens that were parsed from the template. The caller should not modify this list.
 57  
      */
 58  
     List<TemplateToken> getTokens();
 59  
 
 60  
     /**
 61  
      * Identifies     {@link org.apache.tapestry5.internal.parser.StartComponentToken}s with a non-blank id, mapping the
 62  
      * id to its location (within the template). This is used to report unmatched ids (where the component, or its
 63  
      * super-classes, do not define an embedded component).
 64  
      *
 65  
      * @see org.apache.tapestry5.annotations.Component (used to define an embedded component)
 66  
      */
 67  
     Map<String, Location> getComponentIds();
 68  
 }