Package com.vaadin.flow.server.frontend
Class TaskGenerateTsDefinitions
java.lang.Object
com.vaadin.flow.server.frontend.AbstractFileGeneratorFallibleCommand
com.vaadin.flow.server.frontend.AbstractTaskClientGenerator
com.vaadin.flow.server.frontend.TaskGenerateTsDefinitions
- All Implemented Interfaces:
FallibleCommand
Generate
types.d.ts
if it is missing in project folder and
tsconfig.json
exists in project folder.
For internal use only. May be renamed or removed in a future release.
- Since:
- 3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static boolean
Keeps track of whether a warning update has already been logged. -
Method Summary
Methods inherited from class com.vaadin.flow.server.frontend.AbstractFileGeneratorFallibleCommand
setGeneratedFileSupport, track, track, writeIfChanged, writeIfChanged
-
Field Details
-
warningEmitted
protected static boolean warningEmittedKeeps track of whether a warning update has already been logged. This is used to avoid spamming the log with the same message.
-
-
Method Details
-
execute
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
- Overrides:
execute
in classAbstractTaskClientGenerator
- Throws:
ExecutionFailedException
- if there is an execution error
-
getFileContent
Description copied from class:AbstractTaskClientGenerator
Get file content for writing to the generated file.- Specified by:
getFileContent
in classAbstractTaskClientGenerator
- Returns:
- content of the file.
- Throws:
IOException
- if IO error happens while reading file content.
-
getGeneratedFile
Description copied from class:AbstractTaskClientGenerator
Get the generated file where content will be written.- Specified by:
getGeneratedFile
in classAbstractTaskClientGenerator
- Returns:
- the generated file.
-
shouldGenerate
protected boolean shouldGenerate()Description copied from class:AbstractTaskClientGenerator
Check if it should generate the file or not.- Specified by:
shouldGenerate
in classAbstractTaskClientGenerator
- Returns:
- true if it should generate, false otherwise.
-