1 23 24 package com.sun.el.parser; 25 26 import java.math.BigInteger ; 27 28 import javax.el.ELException; 29 30 import com.sun.el.lang.EvaluationContext; 31 32 36 public final class AstInteger extends SimpleNode { 37 public AstInteger(int id) { 38 super(id); 39 } 40 41 private Number number; 42 43 protected Number getInteger() { 44 if (this.number == null) { 45 try { 46 this.number = new Long (this.image); 47 } catch (ArithmeticException e1) { 48 this.number = new BigInteger (this.image); 49 } 50 } 51 return number; 52 } 53 54 public Class getType(EvaluationContext ctx) 55 throws ELException { 56 return this.getInteger().getClass(); 57 } 58 59 public Object getValue(EvaluationContext ctx) 60 throws ELException { 61 return this.getInteger(); 62 } 63 } 64 | Popular Tags |