Interface FileContentRenderer

  • All Known Implementing Classes:
    FileRenderer

    public interface FileContentRenderer
    • Method Summary

      Modifier and Type Method Description
      default boolean canRender​(java.nio.file.Path p)  
      java.nio.file.Path getRenderedTargetName​(java.nio.file.Path sourceName)  
      java.nio.file.Path getSourcePath​(java.nio.file.Path targetName)
      Return the matching source path, but only if the target name matches the target extension.
      java.util.regex.Pattern getSourcePattern()  
      java.util.regex.Pattern getTargetPattern()  
      default VirtualFile getVirtualFile​(java.nio.file.Path target)  
      default boolean hasSource​(java.nio.file.Path p)  
      default boolean matchesSource​(java.nio.file.Path p)  
      default boolean matchesTarget​(java.nio.file.Path p)  
      java.nio.ByteBuffer render​(java.nio.file.Path source, java.nio.file.Path target, java.nio.ByteBuffer input)  
    • Method Detail

      • getSourcePattern

        java.util.regex.Pattern getSourcePattern()
        Returns:
        a pattern that can be used to match path names which serve as the source data of rendered files.
      • getTargetPattern

        java.util.regex.Pattern getTargetPattern()
        Returns:
        a pattern that can be used to match path names which are to be dynamically rendered from source file content.
      • matchesSource

        default boolean matchesSource​(java.nio.file.Path p)
      • matchesTarget

        default boolean matchesTarget​(java.nio.file.Path p)
      • hasSource

        default boolean hasSource​(java.nio.file.Path p)
      • canRender

        default boolean canRender​(java.nio.file.Path p)
      • getSourcePath

        java.nio.file.Path getSourcePath​(java.nio.file.Path targetName)
        Return the matching source path, but only if the target name matches the target extension.
        Parameters:
        targetName - The target Path which represents the intended to be rendered
        Returns:
        A source path, or null if the target name does not match for this renderer
      • getRenderedTargetName

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

        java.nio.ByteBuffer render​(java.nio.file.Path source,
                                   java.nio.file.Path target,
                                   java.nio.ByteBuffer input)
      • getVirtualFile

        default VirtualFile getVirtualFile​(java.nio.file.Path target)