1 23 24 package javax.servlet.jsp.jstl.core; 25 26 import javax.el.ELContext; 27 import javax.el.ValueExpression; 28 29 33 public final class IteratedValueExpression extends ValueExpression { 34 35 private static final long serialVersionUID = 1L; 36 protected final int i; 37 protected final IteratedExpression iteratedExpression; 38 39 public IteratedValueExpression(IteratedExpression iteratedExpr, int i) { 40 this.i = i; 41 this.iteratedExpression = iteratedExpr; 42 } 43 44 public Object getValue(ELContext context) { 45 return iteratedExpression.getItem(context, i); 46 } 47 48 public void setValue(ELContext context, Object value) { 49 } 50 51 public boolean isReadOnly(ELContext context) { 52 return true; 53 } 54 55 public Class getType(ELContext context) { 56 return null; 57 } 58 59 public Class getExpectedType() { 60 return Object .class; 61 } 62 63 public String getExpressionString() { 64 return iteratedExpression.getValueExpression().getExpressionString(); 65 } 66 67 public boolean equals(Object obj) { 68 return iteratedExpression.getValueExpression().equals(obj); 69 } 70 71 public int hashCode() { 72 return iteratedExpression.getValueExpression().hashCode(); 73 } 74 75 public boolean isLiteralText() { 76 return false; 77 } 78 } 79 80 | Popular Tags |