Class FileRenderer

    • Constructor Summary

      Constructors 
      Constructor Description
      FileRenderer​(java.lang.String fromext, java.lang.String toext, boolean cased, TemplateCompiler compiler)
      Create a file renderer from a source extension to a target extension, which will yield the virtual contents of the target file by applying a set of renderers to the source file data.
    • Constructor Detail

      • FileRenderer

        public FileRenderer​(java.lang.String fromext,
                            java.lang.String toext,
                            boolean cased,
                            TemplateCompiler compiler)
        Create a file renderer from a source extension to a target extension, which will yield the virtual contents of the target file by applying a set of renderers to the source file data.
        Parameters:
        fromext - The extension of the source (actual) file, including the dot and extension name.
        toext - The extension of the target (virtual) file, including the dot and extension name.
        cased - Whether or not to do case-sensitive matching against the source and target extensions.
        compiler - A lookup function which can create a renderer for a specific path as needed.
    • Method Detail

      • getVirtualPathsFor

        public java.util.List<java.nio.file.Path> getVirtualPathsFor​(java.nio.file.Path path)
      • getSourcePattern

        public java.util.regex.Pattern getSourcePattern()
      • getTargetPattern

        public java.util.regex.Pattern getTargetPattern()
      • isWrapperPath

        public boolean isWrapperPath​(java.nio.file.Path p)
      • getSourceExtension

        public java.lang.String getSourceExtension()
      • getTargetExtension

        public java.lang.String getTargetExtension()
      • getSourcePath

        public java.nio.file.Path getSourcePath​(java.nio.file.Path targetName)
      • getRenderedTargetName

        public java.nio.file.Path getRenderedTargetName​(java.nio.file.Path sourceName)
      • render

        public RenderedContent render​(java.nio.file.Path sourcePath,
                                      java.nio.file.Path targetPath,
                                      java.util.function.Supplier<java.nio.ByteBuffer> byteBuffer)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object