Package io.micronaut.starter.cli.command
Class CodeGenCommand
java.lang.Object
io.micronaut.starter.cli.command.BaseCommand
io.micronaut.starter.cli.command.CodeGenCommand
- All Implemented Interfaces:
ConsoleOutput,Callable<Integer>
- Direct Known Subclasses:
CreateBeanCommand,CreateClientCommand,CreateCommandCommand,CreateControllerCommand,CreateGrpcServiceCommand,CreateJmsConsumer,CreateJmsProducer,CreateJobCommand,CreateKafkaListener,CreateKafkaProducer,CreateKeyPair,CreateMqttPublisher,CreateMqttSubscriber,CreateNatsListener,CreateNatsProducer,CreateProtoServiceCommand,CreateRabbitMQListener,CreateRabbitMQProducer,CreateRepositoryCommand,CreateTestCommand,CreateWebsocketClientCommand,CreateWebsocketServerCommand,DeactivateAccount,FeatureDiffCommand,UpdateCliConfigCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected io.micronaut.context.BeanContextprotected final CodeGenConfigprotected final ConsoleOutputprotected final io.micronaut.core.util.functional.ThrowingSupplier<OutputHandler,IOException> protected booleanFields inherited from class io.micronaut.starter.cli.command.BaseCommand
commonOptions, specFields inherited from interface io.micronaut.starter.io.ConsoleOutput
NOOP -
Constructor Summary
ConstructorsConstructorDescriptionCodeGenCommand(CodeGenConfig config) CodeGenCommand(CodeGenConfig config, io.micronaut.core.util.functional.ThrowingSupplier<OutputHandler, IOException> outputHandlerSupplier, ConsoleOutput consoleOutput) -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanapplies()voidprotected <T extends CodeGenCommand>
TgetCommand(Class<T> clazz) protected ProjectgetProject(String name) protected TemplateRendererprotected TemplateRenderergetTemplateRenderer(Project project) voidvoidsetBeanContext(io.micronaut.context.BeanContext beanContext) voidMethods inherited from class io.micronaut.starter.cli.command.BaseCommand
errWriter, getOperatingSystem, getSpec, green, outWriter, red, showStacktrace, verbose
-
Field Details
-
config
-
overwrite
protected boolean overwrite -
outputHandlerSupplier
protected final io.micronaut.core.util.functional.ThrowingSupplier<OutputHandler,IOException> outputHandlerSupplier -
consoleOutput
-
beanContext
protected io.micronaut.context.BeanContext beanContext
-
-
Constructor Details
-
CodeGenCommand
-
CodeGenCommand
public CodeGenCommand(CodeGenConfig config, io.micronaut.core.util.functional.ThrowingSupplier<OutputHandler, IOException> outputHandlerSupplier, ConsoleOutput consoleOutput)
-
-
Method Details
-
setBeanContext
@Inject public void setBeanContext(io.micronaut.context.BeanContext beanContext) -
applies
public abstract boolean applies() -
getProject
-
getTemplateRenderer
- Throws:
IOException
-
getTemplateRenderer
- Throws:
IOException
-
getCommand
-
out
- Specified by:
outin interfaceConsoleOutput- Overrides:
outin classBaseCommand
-
err
- Specified by:
errin interfaceConsoleOutput- Overrides:
errin classBaseCommand
-
warning
- Specified by:
warningin interfaceConsoleOutput- Overrides:
warningin classBaseCommand
-