Package com.ibm.fhir.path.util
Class AddingVisitor<T extends Visitable>
- java.lang.Object
-
- com.ibm.fhir.model.visitor.DefaultVisitor
-
- com.ibm.fhir.model.visitor.CopyingVisitor<T>
-
- com.ibm.fhir.path.util.AddingVisitor<T>
-
- All Implemented Interfaces:
Visitor
class AddingVisitor<T extends Visitable> extends CopyingVisitor<T>
-
-
Field Summary
-
Fields inherited from class com.ibm.fhir.model.visitor.DefaultVisitor
visitChildren
-
-
Constructor Summary
Constructors Constructor Description AddingVisitor(Visitable parent, String parentPath, String elementName, Visitable value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doVisitEnd(String elementName, int elementIndex, Resource resource)
protected void
doVisitEnd(String elementName, int elementIndex, Element element)
protected void
doVisitListEnd(String elementName, List<? extends Visitable> visitables, Class<?> type)
boolean
visit(String elementName, int index, Visitable value)
Subclasses can override this method to provide a default action for all visit methods.-
Methods inherited from class com.ibm.fhir.model.visitor.CopyingVisitor
convertToCodeSubtype, delete, doVisitListStart, doVisitStart, doVisitStart, getBuilder, getList, getPath, getResult, markDirty, markListDirty, postVisit, postVisit, replace, replace, reset, visitEnd, visitEnd, visitEnd, visitStart, visitStart, visitStart
-
Methods inherited from class com.ibm.fhir.model.visitor.DefaultVisitor
preVisit, preVisit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
-
-
-
Constructor Detail
-
AddingVisitor
public AddingVisitor(Visitable parent, String parentPath, String elementName, Visitable value)
- Parameters:
parent
- the resource or element to add toparentPath
- a "simple" FHIRPath path to the parent of the element being addedelementName
- the name of the element to addvalue
- the element to add
-
-
Method Detail
-
doVisitListEnd
protected void doVisitListEnd(String elementName, List<? extends Visitable> visitables, Class<?> type)
- Overrides:
doVisitListEnd
in classCopyingVisitor<T extends Visitable>
-
visit
public boolean visit(String elementName, int index, Visitable value)
Description copied from class:DefaultVisitor
Subclasses can override this method to provide a default action for all visit methods.- Specified by:
visit
in interfaceVisitor
- Overrides:
visit
in classDefaultVisitor
- Returns:
- whether to visit the children of this resource; returns the value of the
visitChildren
boolean by default
-
doVisitEnd
protected void doVisitEnd(String elementName, int elementIndex, Resource resource)
- Overrides:
doVisitEnd
in classCopyingVisitor<T extends Visitable>
-
doVisitEnd
protected void doVisitEnd(String elementName, int elementIndex, Element element)
- Overrides:
doVisitEnd
in classCopyingVisitor<T extends Visitable>
-
-