org.apache.commons.jexl.parser

Class ASTSizeMethod

public class ASTSizeMethod extends SimpleNode

Size Method, e.g. size().

Version: $Id: ASTSizeMethod.java 398324 2006-04-30 12:20:24Z dion $

Constructor Summary
ASTSizeMethod(int id)
Create the node given an id.
ASTSizeMethod(Parser p, int id)
Create a node with the given parser and id.
Method Summary
Objectexecute(Object obj, JexlContext jc)
evaluate size as part of an expression on a base object. foo.bar.size
ObjectjjtAccept(ParserVisitor visitor, Object data)

Constructor Detail

ASTSizeMethod

public ASTSizeMethod(int id)
Create the node given an id.

Parameters: id node id.

ASTSizeMethod

public ASTSizeMethod(Parser p, int id)
Create a node with the given parser and id.

Parameters: p a parser. id node id.

Method Detail

execute

public Object execute(Object obj, JexlContext jc)
evaluate size as part of an expression on a base object. foo.bar.size

Parameters: jc the JexlContext to evaluate against. obj not used.

Returns: the value of the array expression.

Throws: Exception on any error

jjtAccept

public Object jjtAccept(ParserVisitor visitor, Object data)
{@inheritDoc }
Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.