org.javagen.agile.core.visitor
Class IndexBuilderVisitor
java.lang.Object
org.javagen.agile.core.visitor.DefaultVisitor
org.javagen.agile.core.visitor.IndexBuilderVisitor
- All Implemented Interfaces:
- Generator, Visit, Visitor
public class IndexBuilderVisitor
- extends DefaultVisitor
Create a ID map for each Model instance and optionaly place resulting index in root node.
- Author:
- Richard Easterling
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IndexBuilderVisitor
public IndexBuilderVisitor()
gen
public Model gen(Model model)
- Description copied from interface:
Generator
- Entry point for generation task.
- Specified by:
gen in interface Generator- Overrides:
gen in class DefaultVisitor
- Parameters:
model - the model instance to generate on - parent nodes will be ignored.
- Returns:
- the result of the task - usualy the same as the input model.
visit
public void visit(Model model)
- Description copied from interface:
Visit
- Called to perform a specific process on a model instance.
- Specified by:
visit in interface Visit- Specified by:
visit in interface Visitor- Overrides:
visit in class DefaultVisitor
- Parameters:
model - instance to visit.
getIndex
public Map<String,Model> getIndex()
setIndex
public void setIndex(Map<String,Model> index)
isPlaceIndexInRootNode
public boolean isPlaceIndexInRootNode()
- If true puts resulting index map into context of root model node
under
modelIdIndex key. Default is true.
setPlaceIndexInRootNode
public void setPlaceIndexInRootNode(boolean placeIndexInRootNode)
Copyright 2006-2006-2007 Outsource Cafe Inc.. All Rights Reserved.