KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.util.HashMap JavaDoc;
18 import java.util.Map JavaDoc;
19
20 import com.sun.facelets.FaceletHandler;
21 import com.sun.facelets.tag.TagLibrary;
22
23 /**
24  *
25  * @author Jacob Hookom
26  * @version $Id: NamespaceUnit.java,v 1.3 2005/08/24 04:38:54 jhook Exp $
27  */

28 final class NamespaceUnit extends CompilationUnit {
29
30     private final Map JavaDoc ns = new HashMap JavaDoc();
31     private final TagLibrary library;
32     
33     public NamespaceUnit(TagLibrary library) {
34         this.library = library;
35     }
36
37     public FaceletHandler createFaceletHandler() {
38         FaceletHandler next = this.getNextFaceletHandler();
39         return new NamespaceHandler(next, this.library, this.ns);
40     }
41     
42     public void setNamespace(String JavaDoc prefix, String JavaDoc uri) {
43         this.ns.put(prefix, uri);
44     }
45
46 }
47
Popular Tags