com.vaadin.flow.server.frontend.
Class AbstractTaskClientGenerator
- java.lang.Object
-
- com.vaadin.flow.server.frontend.AbstractTaskClientGenerator
-
All Implemented Interfaces:
Direct Known Subclasses:
TaskGenerateBootstrap
,TaskGenerateFeatureFlags
,TaskGenerateIndexHtml
,TaskGenerateIndexTs
,TaskGenerateServiceWorker
,TaskGenerateTsConfig
,TaskGenerateTsDefinitions
,TaskGenerateViteDevMode
,TaskGenerateWebComponentBootstrap
,TaskGenerateWebComponentHtml
public abstract class AbstractTaskClientGenerator extends Object implements FallibleCommand
Abstract class for generating client files.
For internal use only. May be renamed or removed in a future release.
Since:
3.0
-
-
Constructor Summary
Constructors Constructor Description AbstractTaskClientGenerator()
-
Method Summary
All Methods Modifier and Type Method Description void
execute()
Runs the given command.
protected abstract String
getFileContent()
Get file content for writing to the generated file.
protected abstract File
getGeneratedFile()
Get the generated file where content will be written.
protected abstract boolean
shouldGenerate()
Check if it should generate the file or not.
-
-
-
Method Detail
-
getFileContent
protected abstract String getFileContent() throws IOException
Get file content for writing to the generated file.
Returns:
content of the file.
Throws:
IOException
- if IO error happens while reading file content.
-
getGeneratedFile
protected abstract File getGeneratedFile()
Get the generated file where content will be written.
Returns:
the generated file.
-
shouldGenerate
protected abstract boolean shouldGenerate()
Check if it should generate the file or not.
Returns:
true if it should generate, false otherwise.
-
execute
public void execute() throws ExecutionFailedException
Description copied from interface:
FallibleCommand
Runs the given command.
If execution fails then the command may throw an exception which may give a message and a cause of the failure.
Specified by:
execute
in interfaceFallibleCommand
Throws:
ExecutionFailedException
- if there is an execution error
-
-