Interface FilePlugin<T,R>

Type Parameters:
T - Context object type.
R - Return type of the apply method.
All Superinterfaces:
Plugin
All Known Subinterfaces:
FileHeaderPlugin, PostProcessorPlugin, ValidatorPlugin
All Known Implementing Classes:
AbstractFileHeader, AbstractPostProcessor, ConfFileHeader, JsonFileHeader, JsonValidator, NoneFileHeader, NoneValidator, UnixShellScriptFileHeader, WindowsShellScriptFileHeader, XmlFileHeader, XmlValidator

public interface FilePlugin<T,R> extends Plugin
Generic plugin interface all other plugins extend from that are called for a generated file.
  • Method Details

    • accepts

      boolean accepts(FileContext file, T context)
      Checks if the plugin can be applied to the given file.
      Parameters:
      file - Context file
      context - Context objects
      Returns:
      true when the plugin can be applied to the given file.
    • implicitApply

      ImplicitApplyOptions implicitApply(FileContext file, T context)
      Whether to apply this plugin implicitly.
      Parameters:
      file - Context file
      context - Context objects
      Returns:
      Implicit apply option
    • apply

      R apply(FileContext file, T context)
      Applies the plugin operation.
      Parameters:
      file - Context file
      context - Context objects
      Returns:
      Return value or Void.