Interface ConfigurationFeature

All Superinterfaces:
DefaultFeature, io.micronaut.core.naming.Described, Feature, io.micronaut.core.naming.Named, OneOfFeature, io.micronaut.core.order.Ordered
All Known Implementing Classes:
Config4k, Properties, Toml, Yaml

public interface ConfigurationFeature extends OneOfFeature, DefaultFeature
Configuration feature.
  • Method Details

    • getFeatureClass

      default Class<?> getFeatureClass()
      Specified by:
      getFeatureClass in interface OneOfFeature
    • createTemplate

      Function<Configuration,Template> createTemplate(String module)
    • apply

      default void apply(GeneratorContext generatorContext)
      Description copied from interface: Feature
      If this method is called for a given feature that means the feature was explicitly selected, included by default as a result of DefaultFeature.shouldApply(io.micronaut.starter.options.Options, java.util.Set), or added explicitly by another feature through FeatureContext.addFeature(Feature). At this point the feature list is set and cannot change.
      Specified by:
      apply in interface Feature
      Parameters:
      generatorContext - THe generator context
    • addTemplatesForConfigurations

      default void addTemplatesForConfigurations(ModuleContext module, String name)
    • shouldApply

      default boolean shouldApply(Options options, Set<Feature> selectedFeatures)
      Description copied from interface: DefaultFeature
      Determines if the feature should be applied to the project. Default features do not need to be concerned if the feature was already selected and therefore is already in the list of selected features. The addition to the set is based on the identity of the feature instance and all features are singletons.
      Specified by:
      shouldApply in interface DefaultFeature
      Parameters:
      options - The options
      selectedFeatures - The features manually selected by the user
      Returns:
      True if the feature should apply
    • configurationFormat

      ConfigurationFormat configurationFormat()