Class AbstractGeneratorTemplateRenderer<R,S>
- java.lang.Object
-
- science.aist.gtf.transformation.renderer.AbstractConditionalTransformationRenderer<R,GeneratorTemplate,S>
-
- science.aist.gtf.template.impl.renderer.AbstractGeneratorTemplateRenderer<R,S>
-
- All Implemented Interfaces:
GeneratorTemplateRenderer<R,S>,TransformationRender<Optional<R>,R,GeneratorTemplate,S>
- Direct Known Subclasses:
DeleteFileRenderer,DirectoryCopyRenderer,DirectoryCreateRenderer,FileOperationRenderer,GeneratorTemplateRendererImpl,InstantiateTemplateRenderer,ShellCommandRenderer
public abstract class AbstractGeneratorTemplateRenderer<R,S> extends AbstractConditionalTransformationRenderer<R,GeneratorTemplate,S> implements GeneratorTemplateRenderer<R,S>
Abstract generator template renderer
- Since:
- 1.0
- Author:
- Andreas Pointner, Andreas Schuler
-
-
Constructor Summary
Constructors Constructor Description AbstractGeneratorTemplateRenderer(RendererCondition<S> rendererCondition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RcreateElement()Creates a new element same as the one which is renderedRexecuteTask(R taskResult, GeneratorTemplate container, S task)Executes a given taskRmapProperties(R r, GeneratorTemplate generatorTemplate, S currentElement)maps propertiesOptional<R>renderElement(GeneratorTemplate container, S currentElement)Renders a given element
-
-
-
Constructor Detail
-
AbstractGeneratorTemplateRenderer
public AbstractGeneratorTemplateRenderer(RendererCondition<S> rendererCondition)
-
-
Method Detail
-
executeTask
public R executeTask(R taskResult, GeneratorTemplate container, S task)
Description copied from interface:GeneratorTemplateRendererExecutes a given task- Specified by:
executeTaskin interfaceGeneratorTemplateRenderer<R,S>- Parameters:
taskResult- the task resultcontainer- the generator templatetask- the task that should be executed- Returns:
- the result of the task
-
createElement
public R createElement()
Description copied from interface:TransformationRenderCreates a new element same as the one which is rendered- Specified by:
createElementin interfaceTransformationRender<Optional<R>,R,GeneratorTemplate,S>- Returns:
- the new element
-
mapProperties
public R mapProperties(R r, GeneratorTemplate generatorTemplate, S currentElement)
Description copied from interface:TransformationRendermaps properties- Specified by:
mapPropertiesin interfaceTransformationRender<Optional<R>,R,GeneratorTemplate,S>- Parameters:
r- the element, same as which is renderedgeneratorTemplate- the containercurrentElement- the current element- Returns:
- the rendered element
-
renderElement
public Optional<R> renderElement(GeneratorTemplate container, S currentElement)
Description copied from interface:TransformationRenderRenders a given element- Specified by:
renderElementin interfaceTransformationRender<Optional<R>,R,GeneratorTemplate,S>- Overrides:
renderElementin classAbstractConditionalTransformationRenderer<R,GeneratorTemplate,S>- Parameters:
container- the containercurrentElement- the current element- Returns:
- the rendered element
-
-