Coverage Report - javax.faces.view.facelets.Tag
 
Classes in this File Line Coverage Branch Coverage Complexity
Tag
0%
0/15
N/A
1
 
 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one
 3  
  * or more contributor license agreements.  See the NOTICE file
 4  
  * distributed with this work for additional information
 5  
  * regarding copyright ownership.  The ASF licenses this file
 6  
  * to you under the Apache License, Version 2.0 (the
 7  
  * "License"); you may not use this file except in compliance
 8  
  * with the License.  You may obtain a copy of the License at
 9  
  *
 10  
  *   http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing,
 13  
  * software distributed under the License is distributed on an
 14  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 15  
  * KIND, either express or implied.  See the License for the
 16  
  * specific language governing permissions and limitations
 17  
  * under the License.
 18  
  */
 19  
 package javax.faces.view.facelets;
 20  
 
 21  
 import javax.faces.view.Location;
 22  
 
 23  
 /**
 24  
  * Representation of a Tag in the Facelet definition
 25  
  */
 26  
 public final class Tag
 27  
 {
 28  
     private final TagAttributes attributes;
 29  
 
 30  
     private final Location location;
 31  
 
 32  
     private final String namespace;
 33  
 
 34  
     private final String localName;
 35  
 
 36  
     private final String qName;
 37  
 
 38  
     public Tag(Location location, String namespace, String localName, String qName, TagAttributes attributes)
 39  0
     {
 40  0
         this.location = location;
 41  0
         this.namespace = namespace;
 42  0
         this.localName = localName;
 43  0
         this.qName = qName;
 44  0
         this.attributes = attributes;
 45  0
     }
 46  
 
 47  
     public Tag(Tag orig, TagAttributes attributes)
 48  
     {
 49  0
         this(orig.getLocation(), orig.getNamespace(), orig.getLocalName(), orig.getQName(), attributes);
 50  0
     }
 51  
 
 52  
     /**
 53  
      * All TagAttributes specified
 54  
      * 
 55  
      * @return all TagAttributes specified
 56  
      */
 57  
     public TagAttributes getAttributes()
 58  
     {
 59  0
         return attributes;
 60  
     }
 61  
 
 62  
     /**
 63  
      * Local name of the tag <my:tag /> would be "tag"
 64  
      * 
 65  
      * @return local name of the tag
 66  
      */
 67  
     public String getLocalName()
 68  
     {
 69  0
         return localName;
 70  
     }
 71  
 
 72  
     /**
 73  
      * Location of the Tag in the Facelet file
 74  
      * 
 75  
      * @return location of the Tag in the Facelet file
 76  
      */
 77  
     public Location getLocation()
 78  
     {
 79  0
         return location;
 80  
     }
 81  
 
 82  
     /**
 83  
      * The resolved Namespace for this tag
 84  
      * 
 85  
      * @return the resolved namespace for this tag
 86  
      */
 87  
     public String getNamespace()
 88  
     {
 89  0
         return namespace;
 90  
     }
 91  
 
 92  
     /**
 93  
      * Get the qualified name for this tag <my:tag /> would be "my:tag"
 94  
      * 
 95  
      * @return qualified name of the tag
 96  
      */
 97  
     public String getQName()
 98  
     {
 99  0
         return qName;
 100  
     }
 101  
 
 102  
     /*
 103  
      * (non-Javadoc)
 104  
      * 
 105  
      * @see java.lang.Object#toString()
 106  
      */
 107  
     public String toString()
 108  
     {
 109  0
         return this.location + " <" + this.qName + ">";
 110  
     }
 111  
 }