KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > facelets > compiler > TagUnit


1 /**
2  * Licensed under the Common Development and Distribution License,
3  * you may not use this file except in compliance with the License.
4  * You may obtain a copy of the License at
5  *
6  * http://www.sun.com/cddl/
7  *
8  * Unless required by applicable law or agreed to in writing, software
9  * distributed under the License is distributed on an "AS IS" BASIS,
10  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
11  * implied. See the License for the specific language governing
12  * permissions and limitations under the License.
13  */

14
15 package com.sun.facelets.compiler;
16
17 import com.sun.facelets.FaceletHandler;
18 import com.sun.facelets.tag.Tag;
19 import com.sun.facelets.tag.TagConfig;
20 import com.sun.facelets.tag.TagLibrary;
21
22 /**
23  *
24  * @author Jacob Hookom
25  * @version $Id: TagUnit.java,v 1.6 2005/08/24 04:38:54 jhook Exp $
26  */

27 class TagUnit extends CompilationUnit implements TagConfig {
28
29     private final TagLibrary library;
30
31     private final String JavaDoc id;
32
33     private final Tag tag;
34     
35     private final String JavaDoc namespace;
36     
37     private final String JavaDoc name;
38
39     public TagUnit(TagLibrary library, String JavaDoc namespace, String JavaDoc name, Tag tag, String JavaDoc id) {
40         this.library = library;
41         this.tag = tag;
42         this.namespace = namespace;
43         this.name = name;
44         this.id = id;
45     }
46
47     public FaceletHandler createFaceletHandler() {
48         return this.library.createTagHandler(this.namespace, this.name, this);
49     }
50
51     public FaceletHandler getNextHandler() {
52         return this.getNextFaceletHandler();
53     }
54
55     public Tag getTag() {
56         return this.tag;
57     }
58
59     public String JavaDoc getTagId() {
60         return this.id;
61     }
62
63     public String JavaDoc toString() {
64         return this.tag.toString();
65     }
66
67 }
68
Popular Tags