com.waveset.object
Class FormItemVisitor

java.lang.Object
  extended bycom.waveset.object.FormItemVisitor

public class FormItemVisitor
extends java.lang.Object

Class for visiting form items


Constructor Summary
FormItemVisitor(ExNodeVisitor expressionVisitor)
          Create a form item visitor which uses the given expression visitor to traverse all ExNodes in the tree.
 
Method Summary
 ExNodeVisitor getExpressionVisitor()
          Retrieves the expression visitor which we delegate to for each top-level ExNode which we find in the tree.
 void setExpressionVisitor(ExNodeVisitor visitor)
          Sets the expression visitor which we delegate to for each top-level ExNode which we find in the tree.
protected  void visitExNode(ExNode node)
          Called when a top-level ExNode is encountered.
protected  void visitExpansion(Form.Expansion expansion)
          Called for each Form.Expansion encountered.
protected  void visitExpansionGroup(Form.ExpansionGroup group)
          Called for each Form.ExpansionGroup encountered.
protected  void visitExpression(Form.Expression item)
          Called to visit a Form.Expression.
protected  void visitField(Form.Field item)
          Called for each Form.Field which it ecountered.
protected  void visitFieldDisplay(FieldDisplay fieldDisplay)
          Called for each FieldDisplay encountered.
protected  void visitFieldMap(Form.FieldMap item)
          Called to visit a Form.FieldMap
protected  void visitFieldRef(Form.FieldRef item)
          Called to visit a Form.FieldRef.
protected  void visitForm(Form item)
          Called to visit a form.
 void visitFormItem(FormItem item)
          Called to visit a form item.
protected  void visitFormRef(Form.FormRef item)
          Called to visit a Form.FormRef.
protected  void visitLoop(Form.Loop item)
          Called to visit a Form.Loop.
protected  void visitPage(Form.Page item)
          Called to visit a Form.Page.
protected  void visitProperty(Property property)
          Called for each Property object encountered.
protected  void visitReference(Form.Reference item)
          Calls to visit a reference.
protected  void visitValue(Form.Value value)
          Called for each Form.Value encountered.
protected  void visitXmlComponent(XmlComponent component)
          Called for each XmlComponent encountered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormItemVisitor

public FormItemVisitor(ExNodeVisitor expressionVisitor)
Create a form item visitor which uses the given expression visitor to traverse all ExNodes in the tree.

Method Detail

getExpressionVisitor

public ExNodeVisitor getExpressionVisitor()
Retrieves the expression visitor which we delegate to for each top-level ExNode which we find in the tree.


setExpressionVisitor

public void setExpressionVisitor(ExNodeVisitor visitor)
Sets the expression visitor which we delegate to for each top-level ExNode which we find in the tree.


visitExNode

protected void visitExNode(ExNode node)
Called when a top-level ExNode is encountered. This implementation delegates to the ExpressionVisitor if one it set.


visitProperty

protected void visitProperty(Property property)
Called for each Property object encountered. This implementation visits the property's expression.


visitXmlComponent

protected void visitXmlComponent(XmlComponent component)
Called for each XmlComponent encountered. This implementation visits each of the properties. This is called by visitFieldDisplay


visitFieldDisplay

protected void visitFieldDisplay(FieldDisplay fieldDisplay)
Called for each FieldDisplay encountered.


visitExpansion

protected void visitExpansion(Form.Expansion expansion)
Called for each Form.Expansion encountered. This method traverses the expansion's expression.


visitExpansionGroup

protected void visitExpansionGroup(Form.ExpansionGroup group)
Called for each Form.ExpansionGroup encountered. This method traverses the expansion group's expression and expansions.


visitValue

protected void visitValue(Form.Value value)
Called for each Form.Value encountered. This method traverses each of the ExpansionGroups


visitFormItem

public void visitFormItem(FormItem item)
Called to visit a form item. This method is also responsible for visiting each of the children nodes, so if you override this method, you'll probably want the overriding method to call super.visitFormItem either before or after your overriding code depending on whether you want post-order or pre-order traversal of the tree.


visitForm

protected void visitForm(Form item)
Called to visit a form. This method also traverses the form's FieldDisplay and Properties.


visitExpression

protected void visitExpression(Form.Expression item)
Called to visit a Form.Expression. This also traverses the expression's ExNode.


visitReference

protected void visitReference(Form.Reference item)
Calls to visit a reference. This also traverses the properties of the reference.


visitFieldRef

protected void visitFieldRef(Form.FieldRef item)
Called to visit a Form.FieldRef.


visitFormRef

protected void visitFormRef(Form.FormRef item)
Called to visit a Form.FormRef.


visitPage

protected void visitPage(Form.Page item)
Called to visit a Form.Page. This also traverses the FieldDisplay.


visitLoop

protected void visitLoop(Form.Loop item)
Called to visit a Form.Loop. This also traverses the in-expression.


visitFieldMap

protected void visitFieldMap(Form.FieldMap item)
Called to visit a Form.FieldMap


visitField

protected void visitField(Form.Field item)
Called for each Form.Field which it ecountered. This method handles traversing each of the objects contained by the field.