ASTAddNode (Velocity 1.7 API)
Keywords: org.apache.velocity.runtime.parser.node.ASTAddNode class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.velocity.runtime.parser.node
Class ASTAddNode

    java.lang.Object
      org.apache.velocity.runtime.parser.node.SimpleNode
          org.apache.velocity.runtime.parser.node.ASTMathNode
              org.apache.velocity.runtime.parser.node.ASTAddNode

All Implemented Interfaces:
  Node, Renderable

public class ASTAddNode
extends ASTMathNode

Handles number addition of nodes.
Please look at the Parser.jjt file which is what controls the generation of this class.

Version:
  $Id: ASTAddNode.java 712887 2008-11-11 00:27:50Z nbubna $
Author:
  Will Glass-Husain, Peter Romianowski, Jason van Zyl, Geir Magnusson Jr.

Field Summary

Fields inherited from class org.apache.velocity.runtime.parser.node.ASTMathNode
`strictMode`

Fields inherited from class org.apache.velocity.runtime.parser.node.SimpleNode
`children, first, id, info, invalid, last, log, parent, parser, rsvc, state, templateName`

Constructor Summary
`ASTAddNode(int id)`
`ASTAddNode(Parser p, int id)`

Method Summary
`protected Object` | `handleSpecial(Object left, Object right, InternalContextAdapter context)` Extension hook to allow special behavior by subclasses If this method returns a non-null value, that is returned, rather than the result of the math operation.
`Number` | `perform(Number left, Number right, InternalContextAdapter context)` Performs the math operation represented by this node.

Methods inherited from class org.apache.velocity.runtime.parser.node.ASTMathNode
`init, jjtAccept, value`

Methods inherited from class org.apache.velocity.runtime.parser.node.SimpleNode
`childrenAccept, dump, evaluate, execute, getColumn, getFirstToken, getInfo, getLastToken, getLine, getLocation, getRuntimeServices, getTemplateName, getType, isInvalid, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, literal, render, setFirstToken, setInfo, setInvalid, toString, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ASTAddNode

    public ASTAddNode(int id)

Parameters:
  `id` -

### ASTAddNode

    public ASTAddNode(Parser p,
                      int id)

Parameters:
  `p` -
  `id` -

Method Detail

### handleSpecial

    protected Object handleSpecial(Object left,
                                   Object right,
                                   InternalContextAdapter context)

  Description copied from class: `ASTMathNode`
  Extension hook to allow special behavior by subclasses If this method returns a non-null value, that is returned, rather than the result of the math operation.

  Overrides:
    `handleSpecial` in class `ASTMathNode`
  See Also:
    `handleSpecial(java.lang.Object, java.lang.Object, org.apache.velocity.context.InternalContextAdapter)`

### perform

    public Number perform(Number left,
                          Number right,
                          InternalContextAdapter context)

  Description copied from class: `ASTMathNode`
  Performs the math operation represented by this node.

  Specified by:
    `perform` in class `ASTMathNode`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.