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 java.io.IOException;
22 import java.util.Arrays;
23
24 import javax.faces.context.FacesContext;
25
26 import org.apache.myfaces.view.facelets.el.ELText;
27
28 final class UIInstructions extends UILeaf
29 {
30
31 private final ELText txt;
32
33 private final Instruction[] instructions;
34
35 public UIInstructions(ELText txt, Instruction[] instructions)
36 {
37 this.txt = txt;
38 this.instructions = instructions;
39 }
40
41 public void encodeBegin(FacesContext context) throws IOException
42 {
43 int size = this.instructions.length;
44 for (int i = 0; i < size; i++)
45 {
46 this.instructions[i].write(context);
47 }
48 }
49
50 public String toString()
51 {
52 return (this.txt != null) ? this.txt.toString() : "UIInstructions[" + Arrays.asList(instructions) + "]";
53 }
54
55 }