Class TemplateVisitor
- All Implemented Interfaces:
FileVisitor<Path>
The class TemplateVisitor visits files in a template directory to copy
regular files and process templated ones.
- Since:
- 3.0
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTemplateVisitor
(Path source, Path target, freemarker.template.Configuration configuration, DataContext data) Instantiates a new template visitor. -
Method Summary
Modifier and TypeMethodDescriptionpreVisitDirectory
(Path file, BasicFileAttributes attrs) visitFile
(Path file, BasicFileAttributes attrs) Methods inherited from class java.nio.file.SimpleFileVisitor
postVisitDirectory, visitFileFailed
-
Field Details
-
TEMPLATED_FILE_EXT
- See Also:
-
-
Constructor Details
-
TemplateVisitor
public TemplateVisitor(Path source, Path target, freemarker.template.Configuration configuration, DataContext data) Instantiates a new template visitor.- Parameters:
source
- the source directorytarget
- the target directoryconfiguration
- the freemarker configurationdata
- the data to inject
-
-
Method Details
-
preVisitDirectory
- Specified by:
preVisitDirectory
in interfaceFileVisitor<Path>
- Overrides:
preVisitDirectory
in classSimpleFileVisitor<Path>
- Throws:
IOException
-
visitFile
- Specified by:
visitFile
in interfaceFileVisitor<Path>
- Overrides:
visitFile
in classSimpleFileVisitor<Path>
- Throws:
IOException
-