KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > servlet > jsp > tagext > TagFileInfo


1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */

17
18  
19 package javax.servlet.jsp.tagext;
20
21 /**
22  * Tag information for a tag file in a Tag Library;
23  * This class is instantiated from the Tag Library Descriptor file (TLD)
24  * and is available only at translation time.
25  *
26  * @since 2.0
27  */

28 public class TagFileInfo {
29
30     /**
31      * Constructor for TagFileInfo from data in the JSP 2.0 format for TLD.
32      * This class is to be instantiated only from the TagLibrary code
33      * under request from some JSP code that is parsing a
34      * TLD (Tag Library Descriptor).
35      *
36      * Note that, since TagLibraryInfo reflects both TLD information
37      * and taglib directive information, a TagFileInfo instance is
38      * dependent on a taglib directive. This is probably a
39      * design error, which may be fixed in the future.
40      *
41      * @param name The unique action name of this tag
42      * @param path Where to find the .tag file implementing this
43      * action, relative to the location of the TLD file.
44      * @param tagInfo The detailed information about this tag, as parsed
45      * from the directives in the tag file.
46      */

47     public TagFileInfo( String JavaDoc name, String JavaDoc path, TagInfo JavaDoc tagInfo ) {
48         this.name = name;
49         this.path = path;
50         this.tagInfo = tagInfo;
51     }
52
53     /**
54      * The unique action name of this tag.
55      *
56      * @return The (short) name of the tag.
57      */

58     public String JavaDoc getName() {
59         return name;
60     }
61
62     /**
63      * Where to find the .tag file implementing this action.
64      *
65      * @return The path of the tag file, relative to the TLD, or "." if
66      * the tag file was defined in an implicit tag file.
67      */

68     public String JavaDoc getPath() {
69         return path;
70     }
71
72     /**
73      * Returns information about this tag, parsed from the directives
74      * in the tag file.
75      *
76      * @return a TagInfo object containing information about this tag
77      */

78     public TagInfo JavaDoc getTagInfo() {
79         return tagInfo;
80     }
81
82     // private fields for 2.0 info
83
private String JavaDoc name;
84     private String JavaDoc path;
85     private TagInfo JavaDoc tagInfo;
86 }
87
Popular Tags