Class ApplicationTypeFunctionFeature

java.lang.Object
io.micronaut.projectgen.micronaut.ApplicationTypeFeature
io.micronaut.projectgen.micronaut.ApplicationTypeFunctionFeature
All Implemented Interfaces:
io.micronaut.core.naming.Described, io.micronaut.core.naming.Named, io.micronaut.core.order.Ordered, RequiresRepository, DefaultFeature, Feature

@Singleton public class ApplicationTypeFunctionFeature extends ApplicationTypeFeature
Feature definition for Micronaut applications of type FUNCTION. Adds required features and ensures correct HTTP client test setup.
  • Constructor Details

    • ApplicationTypeFunctionFeature

      public ApplicationTypeFunctionFeature(MicronautCli micronautCli, MicronautTestJunit5 micronautTestJunit5, MicronautTestSpock micronautTestSpock, Logback logback, GitIgnore gitIgnore, HttpClientTest httpClientTest)
      Constructs the ApplicationTypeFunctionFeature.
      Parameters:
      micronautCli - The Micronaut CLI feature
      micronautTestJunit5 - The JUnit 5 test feature
      micronautTestSpock - The Spock test feature
      logback - The Logback logging feature
      gitIgnore - The .gitignore feature
      httpClientTest - The HTTP client test feature
  • Method Details

    • shouldApply

      public boolean shouldApply(Options options, Set<Feature> selectedFeatures)
      Determines if this feature should be applied for the selected options.
      Parameters:
      options - The selected options
      selectedFeatures - The set of selected features
      Returns:
      true if applicable
    • processSelectedFeatures

      public void processSelectedFeatures(FeatureContext featureContext)
      Processes and adds the required features for FUNCTION application type.
      Specified by:
      processSelectedFeatures in interface Feature
      Overrides:
      processSelectedFeatures in class ApplicationTypeFeature
      Parameters:
      featureContext - The feature context
    • getName

      public String getName()
      Returns the feature name.
      Returns:
      the feature name string