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.tag.jstl.core;
20
21 import javax.el.ELContext;
22 import javax.el.PropertyNotWritableException;
23 import javax.el.ValueExpression;
24
25
26
27
28 public final class IteratedValueExpression extends ValueExpression
29 {
30
31 private static final long serialVersionUID = 1L;
32
33 private ValueExpression orig;
34
35 private Object value;
36
37 public IteratedValueExpression(ValueExpression orig, Object value)
38 {
39 this.orig = orig;
40 this.value = value;
41 }
42
43
44
45
46
47
48 public Object getValue(ELContext context)
49 {
50 return value;
51 }
52
53
54
55
56
57
58 public void setValue(ELContext context, Object value)
59 {
60 context.setPropertyResolved(false);
61 throw new PropertyNotWritableException();
62 }
63
64
65
66
67
68
69 public boolean isReadOnly(ELContext context)
70 {
71 context.setPropertyResolved(false);
72 return true;
73 }
74
75
76
77
78
79
80 public Class getType(ELContext context)
81 {
82 context.setPropertyResolved(false);
83 return Object.class;
84 }
85
86
87
88
89
90
91 public Class getExpectedType()
92 {
93 return Object.class;
94 }
95
96
97
98
99
100
101 public String getExpressionString()
102 {
103 return this.orig.getExpressionString();
104 }
105
106
107
108
109
110
111 public boolean equals(Object obj)
112 {
113 return this.orig.equals(obj);
114 }
115
116
117
118
119
120
121 public int hashCode()
122 {
123 return this.orig.hashCode();
124 }
125
126
127
128
129
130
131 public boolean isLiteralText()
132 {
133 return false;
134 }
135
136 }