org.richfaces.cdk.templatecompiler.el.node
Class AbstractBinaryOperationTreeNode

java.lang.Object
  extended by org.richfaces.cdk.templatecompiler.el.node.AbstractTreeNode
      extended by org.richfaces.cdk.templatecompiler.el.node.AbstractBinaryOperationTreeNode
All Implemented Interfaces:
ITreeNode
Direct Known Subclasses:
BinaryArithmeticIntegerOperationTreeNode, BinaryArithmeticOperationTreeNode, BinaryBooleanOperationTreeNode, BinaryBooleanResultOperationTreeNode

public abstract class AbstractBinaryOperationTreeNode
extends AbstractTreeNode

Abstract class for all binary (having two operands) operation expression nodes

For operands A and B and operator x output is (A x B)

Author:
Nick Belaevski

Constructor Summary
AbstractBinaryOperationTreeNode(org.jboss.el.parser.Node node, java.lang.String operatorString)
           
 
Method Summary
protected abstract  java.lang.String getCoercedChildOutput(int childIndex, ELVisitor visitor)
           
protected abstract  ELType getOperationType(ELType firstArgumentType, ELType secondArgumentType)
           
 void visit(java.lang.StringBuilder sb, ELVisitor visitor)
          Return child of wrapped node by specified index.
 
Methods inherited from class org.richfaces.cdk.templatecompiler.el.node.AbstractTreeNode
coerceToBoolean, getChild, getChildOutput, getChildrenCount, getNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBinaryOperationTreeNode

public AbstractBinaryOperationTreeNode(org.jboss.el.parser.Node node,
                                       java.lang.String operatorString)
Method Detail

getOperationType

protected abstract ELType getOperationType(ELType firstArgumentType,
                                           ELType secondArgumentType)

getCoercedChildOutput

protected abstract java.lang.String getCoercedChildOutput(int childIndex,
                                                          ELVisitor visitor)
                                                   throws ParsingException
Throws:
ParsingException

visit

public void visit(java.lang.StringBuilder sb,
                  ELVisitor visitor)
           throws ParsingException
Description copied from class: AbstractTreeNode
Return child of wrapped node by specified index. Abstract operation to override in subclasses.

Specified by:
visit in interface ITreeNode
Specified by:
visit in class AbstractTreeNode
visitor - - ELVisitor
Throws:
ParsingException - - if error occurred(child not found).


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.