Class Config4k

java.lang.Object
io.micronaut.starter.feature.config.Config4k
All Implemented Interfaces:
io.micronaut.core.naming.Described, io.micronaut.core.naming.Named, io.micronaut.core.order.Ordered, ConfigurationFeature, Feature, KotlinSpecificFeature, LanguageSpecificFeature, OneOfFeature

@Singleton public class Config4k extends Object implements ConfigurationFeature, KotlinSpecificFeature
  • Constructor Details

    • Config4k

      public Config4k()
  • Method Details

    • getName

      @NonNull public @NonNull String getName()
      Description copied from interface: Feature
      The name of the feature. It must be unique.
      Specified by:
      getName in interface Feature
      Specified by:
      getName in interface io.micronaut.core.naming.Named
      Returns:
      the name of the feature
    • getTitle

      @NonNull public @NonNull String getTitle()
      Specified by:
      getTitle in interface Feature
      Returns:
      The title of the feature
    • processSelectedFeatures

      public void processSelectedFeatures(FeatureContext featureContext)
      Description copied from interface: Feature
      If this method is called for a given feature then that feature was explicitly selected or was included by default as a result of DefaultFeature.shouldApply(ApplicationType, io.micronaut.starter.options.Options, java.util.Set). This method can be implemented to allow features to modify the list of features that will apply to the project. The methods FeatureContext.addFeature(Feature) and FeatureContext.exclude(FeaturePredicate) are the primary ways to add and remove features from the context. FeatureContext.isPresent(Class) can be used to determine the existence of other features in order to make decisions.
      Specified by:
      processSelectedFeatures in interface Feature
      Parameters:
      featureContext - The feature context
    • getDescription

      @NonNull public @NonNull String getDescription()
      Specified by:
      getDescription in interface io.micronaut.core.naming.Described
      Specified by:
      getDescription in interface Feature
    • getOrder

      public int getOrder()
      Description copied from interface: Feature
      The order of a feature controls the order in which it applies. The order of a feature is important to ensure that any previous work done by other features that may be required is done. See FeaturePhase for a list of phases to choose from.
      Specified by:
      getOrder in interface Feature
      Specified by:
      getOrder in interface io.micronaut.core.order.Ordered
      Returns:
      The order of the feature
    • supports

      public boolean supports(ApplicationType applicationType)
      Description copied from interface: Feature
      This method must be implemented to ensure it is only selectable for the desired application types. This method is not used for determining if a default feature should be applied.
      Specified by:
      supports in interface Feature
      Parameters:
      applicationType - The application type
      Returns:
      True if the feature can be selected by the user
    • createTemplate

      public Function<Configuration,Template> createTemplate()
      Specified by:
      createTemplate in interface ConfigurationFeature