Class ApplicationTypeFeature
java.lang.Object
io.micronaut.projectgen.micronaut.ApplicationTypeFeature
- All Implemented Interfaces:
io.micronaut.core.naming.Described, io.micronaut.core.naming.Named, io.micronaut.core.order.Ordered, RequiresRepository, DefaultFeature, Feature
- Direct Known Subclasses:
ApplicationTypeCliFeature, ApplicationTypeDefaultFeature, ApplicationTypeFunctionFeature, ApplicationTypeGrpcFeature, ApplicationTypeLibraryFeature, ApplicationTypeMessagingFeature
public abstract class ApplicationTypeFeature
extends Object
implements DefaultFeature, RequiresRepository
Base implementation for features associated with specific
ApplicationTypes.
Provides default behavior for applying essential features like logging, testing, and CLI support.
Implements DefaultFeature and RequiresRepository.-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedApplicationTypeFeature(MicronautCli micronautCli, MicronautTestJunit5 micronautTestJunit5, MicronautTestSpock micronautTestSpock, Logback logback, GitIgnore gitIgnore) -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(GeneratorContext generatorContext) If this method is called for a given feature that means the feature was explicitly selected, included by default as a result ofDefaultFeature.shouldApply(io.micronaut.starter.options.Options, java.util.Set), or added explicitly by another feature throughFeatureContext.addFeature(Feature).booleanSome features should not be visible to the user because they are a common parent of other selectable features, or they should always be applied, or any other reason.voidprocessSelectedFeatures(FeatureContext featureContext) If this method is called for a given feature then that feature was explicitly selected or was included by default as a result ofDefaultFeature.shouldApply(io.micronaut.starter.options.Options, java.util.Set).Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DefaultFeature
shouldApplyMethods inherited from interface io.micronaut.core.naming.Described
getDescriptionMethods inherited from interface Feature
getCategory, getDescription, getFrameworkDocumentation, getName, getOrder, getThirdPartyDocumentation, getTitle, isCommunity, isPreview, supports
-
Constructor Details
-
ApplicationTypeFeature
protected ApplicationTypeFeature(MicronautCli micronautCli, MicronautTestJunit5 micronautTestJunit5, MicronautTestSpock micronautTestSpock, Logback logback, GitIgnore gitIgnore)
-
-
Method Details
-
processSelectedFeatures
Description copied from interface:FeatureIf this method is called for a given feature then that feature was explicitly selected or was included by default as a result ofDefaultFeature.shouldApply(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 methodsFeatureContext.addFeature(Feature)andFeatureContext.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:
processSelectedFeaturesin interfaceFeature- Parameters:
featureContext- The feature context
-
apply
Description copied from interface:FeatureIf this method is called for a given feature that means the feature was explicitly selected, included by default as a result ofDefaultFeature.shouldApply(io.micronaut.starter.options.Options, java.util.Set), or added explicitly by another feature throughFeatureContext.addFeature(Feature). At this point the feature list is set and cannot change. -
isVisible
public boolean isVisible()Description copied from interface:FeatureSome features should not be visible to the user because they are a common parent of other selectable features, or they should always be applied, or any other reason. -
getRepositories
- Specified by:
getRepositoriesin interfaceRequiresRepository
-