1 16 17 package org.apache.taglibs.standard.lang.jpath.expression; 18 19 import javax.servlet.jsp.PageContext ; 20 21 import org.apache.taglibs.standard.lang.jpath.adapter.IterationContext; 22 23 30 public class IntrospectionOperator extends SimpleNode 31 implements Introspectable { 32 33 40 public IntrospectionOperator(int id) { 41 super(id); 42 } 43 44 52 public IntrospectionOperator(Parser p, int id) { 53 super(p, id); 54 } 55 56 66 public String toNormalizedString() { 67 68 String normalized = ""; 69 70 normalized = jjtGetChild(0).toNormalizedString() 71 + getTokenImage(ParserConstants.INTROSPECT) 72 + jjtGetChild(1).toNormalizedString(); 73 74 return normalized; 75 } 76 77 94 public Object evaluate(PageContext pageContext, IterationContext icontext) 95 throws EvaluationException { 96 97 Object leftSide = jjtGetChild(0).evaluate(pageContext, icontext); 98 Object result = 99 ((Introspectable) jjtGetChild(1)).evaluate(pageContext, icontext, 100 leftSide); 101 102 return result; 103 } 104 105 118 public Object evaluate( 119 PageContext pageContext, IterationContext icontext, int scope) 120 throws EvaluationException { 121 122 Object leftSide = ((Identifier) jjtGetChild(0)).evaluate(pageContext, 123 icontext, scope); 124 Object result = 125 ((Introspectable) jjtGetChild(1)).evaluate(pageContext, icontext, 126 leftSide); 127 128 return result; 129 } 130 131 144 public Object evaluate( 145 PageContext pageContext, IterationContext icontext, Object parent) 146 throws EvaluationException { 147 148 Object leftSide = 149 ((Introspectable) jjtGetChild(0)).evaluate(pageContext, icontext, 150 parent); 151 Object result = 152 ((Introspectable) jjtGetChild(1)).evaluate(pageContext, icontext, 153 leftSide); 154 155 return result; 156 } 157 } 158 | Popular Tags |