1 2 3 package org.apache.el.parser; 4 5 import javax.el.ELException; 6 7 import org.apache.el.lang.EvaluationContext; 8 9 10 14 public final class AstChoice extends SimpleNode { 15 public AstChoice(int id) { 16 super(id); 17 } 18 19 public Class getType(EvaluationContext ctx) 20 throws ELException { 21 Object val = this.getValue(ctx); 22 return (val != null) ? val.getClass() : null; 23 } 24 25 public Object getValue(EvaluationContext ctx) 26 throws ELException { 27 Object obj0 = this.children[0].getValue(ctx); 28 Boolean b0 = coerceToBoolean(obj0); 29 return this.children[((b0.booleanValue() ? 1 : 2))].getValue(ctx); 30 } 31 } 32 | Popular Tags |