Interface TemplateVisitor<T>
- Type Parameters:
- T- The return type of this visitor
public interface TemplateVisitor<T>
For code generating from a template, use a `TemplateVisitor`. Template visitor is written to enable optimized
 behavior for static templates with no dynamic components.
- 
Method SummaryModifier and TypeMethodDescriptionInvoked at the conclusion of visiting a multipart template like `https://{Region}.{dnsSuffix}`.Invoked prior to visiting a multipart template like `https://{Region}.{dnsSuffix}`.visitDynamicElement(Expr value) Visit a dynamic element within a multipart template.visitSingleDynamicTemplate(Expr value) The template contains a single dynamic element, eg.visitStaticElement(String value) Visit a static element within a multipart template.visitStaticTemplate(String value) The template contains a single static string, eg.
- 
Method Details- 
visitStaticTemplate
- 
visitSingleDynamicTemplate
- 
visitStaticElementVisit a static element within a multipart template. This will only be called afterstartMultipartTemplate()has been invoked.- Parameters:
- value- A static element within a larger template
- Returns:
- T
 
- 
visitDynamicElementVisit a dynamic element within a multipart template. This will only be called afterstartMultipartTemplate()has been invoked.- Parameters:
- value- The dynamic template value
- Returns:
- T
 
- 
startMultipartTemplateT startMultipartTemplate()Invoked prior to visiting a multipart template like `https://{Region}.{dnsSuffix}`. This function will be followed by invocations ofvisitStaticTemplate(String)andvisitDynamicElement(Expr).- Returns:
- T
 
- 
finishMultipartTemplateT finishMultipartTemplate()Invoked at the conclusion of visiting a multipart template like `https://{Region}.{dnsSuffix}`. This allows implementations to do something like call `string.join()` or `stringbuilder.toString()`.- Returns:
- T
 
 
-