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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
accepts(FileContext file, T context)
Checks if the plugin can be applied to the given file.R
apply(FileContext file, T context)
Applies the plugin operation.ImplicitApplyOptions
implicitApply(FileContext file, T context)
Whether to apply this plugin implicitly.
-
-
-
Method Detail
-
accepts
boolean accepts(FileContext file, T context)
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
ImplicitApplyOptions implicitApply(FileContext file, T context)
Whether to apply this plugin implicitly.- Parameters:
file
- Context filecontext
- Context objects- Returns:
- Implicit apply option
-
apply
R apply(FileContext file, T context)
Applies the plugin operation.- Parameters:
file
- Context filecontext
- Context objects- Returns:
- Return value or
Void
.
-
-