1 23 24 package com.sun.el.parser; 25 26 import javax.el.ELException; 27 28 import com.sun.el.lang.EvaluationContext; 29 30 34 public final class AstChoice extends SimpleNode { 35 public AstChoice(int id) { 36 super(id); 37 } 38 39 public Class getType(EvaluationContext ctx) 40 throws ELException { 41 Object val = this.getValue(ctx); 42 return (val != null) ? val.getClass() : null; 43 } 44 45 public Object getValue(EvaluationContext ctx) 46 throws ELException { 47 Object obj0 = this.children[0].getValue(ctx); 48 Boolean b0 = coerceToBoolean(obj0); 49 return this.children[((b0.booleanValue() ? 1 : 2))].getValue(ctx); 50 } 51 } 52 | Popular Tags |