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
Generic plugin interface all other plugins extend from that are called for a generated file.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaccepts(FileContext file, T context) Checks if the plugin can be applied to the given file.apply(FileContext file, T context) Applies the plugin operation.implicitApply(FileContext file, T context) Whether to apply this plugin implicitly.
-
Method Details
-
accepts
Checks if the plugin can be applied to the given file.- Parameters:
file- Context filecontext- Context objects- Returns:
- true when the plugin can be applied to the given file.
-
implicitApply
Whether to apply this plugin implicitly.- Parameters:
file- Context filecontext- Context objects- Returns:
- Implicit apply option
-
apply
Applies the plugin operation.- Parameters:
file- Context filecontext- Context objects- Returns:
- Return value or
Void.
-