Skip to content

Package: TagFileInfo

TagFileInfo

nameinstructionbranchcomplexitylinemethod
TagFileInfo(String, String, TagInfo)
M: 12 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
getName()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getPath()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getTagInfo()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * Copyright (c) 1997, 2020 Oracle and/or its affiliates and others.
3: * All rights reserved.
4: * Copyright 2004 The Apache Software Foundation
5: *
6: * Licensed under the Apache License, Version 2.0 (the "License");
7: * you may not use this file except in compliance with the License.
8: * 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, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */
18:
19: package jakarta.servlet.jsp.tagext;
20:
21: /**
22: * Tag information for a tag file in a Tag Library; This class is instantiated from the Tag Library Descriptor file
23: * (TLD) and is available only at translation time.
24: *
25: * @since JSP 2.0
26: */
27: public class TagFileInfo {
28:
29: /**
30: * Constructor for TagFileInfo from data in the JSP 2.0 format for TLD. This class is to be instantiated only from
31: * the TagLibrary code under request from some JSP code that is parsing a TLD (Tag Library Descriptor).
32: *
33: * Note that, since TagLibibraryInfo reflects both TLD information and taglib directive information, a TagFileInfo
34: * instance is dependent on a taglib directive. This is probably a design error, which may be fixed in the future.
35: *
36: * @param name The unique action name of this tag
37: * @param path Where to find the .tag file implementing this action, relative to the location of the TLD file.
38: * @param tagInfo The detailed information about this tag, as parsed from the directives in the tag file.
39: */
40: public TagFileInfo(String name, String path, TagInfo tagInfo) {
41: this.name = name;
42: this.path = path;
43: this.tagInfo = tagInfo;
44: }
45:
46: /**
47: * The unique action name of this tag.
48: *
49: * @return The (short) name of the tag.
50: */
51: public String getName() {
52: return name;
53: }
54:
55: /**
56: * Where to find the .tag file implementing this action.
57: *
58: * @return The path of the tag file, relative to the TLD, or "." if the tag file was defined in an implicit tag
59: * file.
60: */
61: public String getPath() {
62: return path;
63: }
64:
65: /**
66: * Returns information about this tag, parsed from the directives in the tag file.
67: *
68: * @return a TagInfo object containing information about this tag
69: */
70: public TagInfo getTagInfo() {
71: return tagInfo;
72: }
73:
74: // private fields for 2.0 info
75: private String name;
76: private String path;
77: private TagInfo tagInfo;
78: }