Class AddingVisitor<T extends Visitable>
- java.lang.Object
-
- org.linuxforhealth.fhir.model.visitor.DefaultVisitor
-
- org.linuxforhealth.fhir.model.visitor.CopyingVisitor<T>
-
- org.linuxforhealth.fhir.path.util.AddingVisitor<T>
-
- All Implemented Interfaces:
Visitor
class AddingVisitor<T extends Visitable> extends CopyingVisitor<T>
-
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.model.visitor.DefaultVisitor
visitChildren
-
-
Constructor Summary
Constructors Constructor Description AddingVisitor(Visitable parent, java.lang.String parentPath, java.lang.String elementName, Visitable value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doVisitEnd(java.lang.String elementName, int elementIndex, Resource resource)
protected void
doVisitEnd(java.lang.String elementName, int elementIndex, Element element)
protected void
doVisitListEnd(java.lang.String elementName, java.util.List<? extends Visitable> visitables, java.lang.Class<?> type)
boolean
visit(java.lang.String elementName, int index, Visitable value)
Subclasses can override this method to provide a default action for all visit methods.-
Methods inherited from class org.linuxforhealth.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 org.linuxforhealth.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
-
-
-
-
Constructor Detail
-
AddingVisitor
public AddingVisitor(Visitable parent, java.lang.String parentPath, java.lang.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- Throws:
java.lang.IllegalArgumentException
-
-
Method Detail
-
doVisitListEnd
protected void doVisitListEnd(java.lang.String elementName, java.util.List<? extends Visitable> visitables, java.lang.Class<?> type)
- Overrides:
doVisitListEnd
in classCopyingVisitor<T extends Visitable>
-
visit
public boolean visit(java.lang.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(java.lang.String elementName, int elementIndex, Resource resource)
- Overrides:
doVisitEnd
in classCopyingVisitor<T extends Visitable>
-
doVisitEnd
protected void doVisitEnd(java.lang.String elementName, int elementIndex, Element element)
- Overrides:
doVisitEnd
in classCopyingVisitor<T extends Visitable>
-
-