Package com.vaadin.hilla.parser.utils
Interface ConfigList<Item>
- Type Parameters:
Item- a type of option
- All Known Implementing Classes:
GeneratorConfiguration.Plugins,NonnullPluginConfig,ParserConfiguration.Plugins
public interface ConfigList<Item>
A basic structure for configuring a plugin. It assumes that the plugin have
some list of default options that could be disabled by the user. Also, the
user is able to add their own options.
The implementation class is assumed to be used with the reflection approach
of tools like Jackson or Maven.
For Maven configuration, it could look like the following:
<configuration>
<annotations>
<disableAllDefaults>false</disableAllDefaults>
<disable>
<annotation>jakarta.annotations.Nonnull</annotation>
</disable>
<use>
<annotation>io.github.my.annotations.Nonnull</annotation>
</use>
</annotations>
</configuration>
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAnalyzer for the ConfigList class. -
Method Summary
Modifier and TypeMethodDescriptionGets a list of default options the user wants to disable.Gets a list of custom options the user wants to use.booleanIndicates if the user wants to disable all default options.
-
Method Details
-
getDisabledOptions
Collection<Item> getDisabledOptions()Gets a list of default options the user wants to disable.- Returns:
- a list of disabled options.
-
getUsedOptions
Collection<Item> getUsedOptions()Gets a list of custom options the user wants to use.- Returns:
- a list of used options.
-
shouldAllDefaultsBeDisabled
boolean shouldAllDefaultsBeDisabled()Indicates if the user wants to disable all default options.- Returns:
- a flag of disabling all the default options.
-