Interface Provider<T>
- Type Parameters:
T- the type of component this provider creates
- All Known Subinterfaces:
FileReviewerProvider,PrintFormatProvider<T>
- All Known Implementing Classes:
AutomaticFileReviewer,MultiLineStringPrintFormat,NoneFileReviewer,SingleLineStringPrintFormat
Implementations of this interface can be registered via
META-INF/services/org.approvej.configuration.Provider and will be automatically discovered by
the Registry.
This interface is typically implemented directly by the component class itself, allowing the
component to serve as its own provider. Use specialized sub-interfaces like
PrintFormatProvider or FileReviewerProvider which provide a default implementation for
type().
-
Method Summary
-
Method Details
-
alias
String alias()Returns the alias that can be used to reference this provider in configuration.For example, "json" or "yaml" for print formats, or "none" or "automatic" for reviewers.
- Returns:
- the alias for this provider
-
create
T create()Creates a new instance of the component.When implemented by the component class itself, this typically returns a new instance of the same class via its no-argument constructor.
- Returns:
- a new instance of the component
-
type
Returns the type of component this provider creates.Specialized sub-interfaces like
PrintFormatProviderandFileReviewerProviderprovide default implementations for this method.- Returns:
- the component type class
-