1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
package org.apache.myfaces.view.facelets.compiler; |
20 | |
|
21 | |
import javax.faces.view.facelets.FaceletHandler; |
22 | |
import javax.faces.view.facelets.Tag; |
23 | |
import javax.faces.view.facelets.TagConfig; |
24 | |
|
25 | |
import org.apache.myfaces.view.facelets.tag.TagLibrary; |
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
class TagUnit extends CompilationUnit implements TagConfig |
33 | |
{ |
34 | |
|
35 | |
private final TagLibrary library; |
36 | |
|
37 | |
private final String id; |
38 | |
|
39 | |
private final Tag tag; |
40 | |
|
41 | |
private final String namespace; |
42 | |
|
43 | |
private final String name; |
44 | |
|
45 | |
public TagUnit(TagLibrary library, String namespace, String name, Tag tag, String id) |
46 | 0 | { |
47 | 0 | this.library = library; |
48 | 0 | this.tag = tag; |
49 | 0 | this.namespace = namespace; |
50 | 0 | this.name = name; |
51 | 0 | this.id = id; |
52 | 0 | } |
53 | |
|
54 | |
public FaceletHandler createFaceletHandler() |
55 | |
{ |
56 | 0 | return this.library.createTagHandler(this.namespace, this.name, this); |
57 | |
} |
58 | |
|
59 | |
public FaceletHandler getNextHandler() |
60 | |
{ |
61 | 0 | return this.getNextFaceletHandler(); |
62 | |
} |
63 | |
|
64 | |
public Tag getTag() |
65 | |
{ |
66 | 0 | return this.tag; |
67 | |
} |
68 | |
|
69 | |
public String getTagId() |
70 | |
{ |
71 | 0 | return this.id; |
72 | |
} |
73 | |
|
74 | |
public String toString() |
75 | |
{ |
76 | 0 | return this.tag.toString(); |
77 | |
} |
78 | |
|
79 | |
} |