Package com.vaadin.flow.server.frontend
Class FrontendToolsLocator
- java.lang.Object
-
- com.vaadin.flow.server.frontend.FrontendToolsLocator
-
- All Implemented Interfaces:
Serializable
public class FrontendToolsLocator extends Object implements Serializable
Helps to locate the tools in the system by their names.For internal use only. May be renamed or removed in a future release.
- Since:
- 1.2
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FrontendToolsLocator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<File>tryLocateTool(String toolName)Makes an attempt to locate the tool by its name.booleanverifyTool(File toolPath)Verifies that the tool specified works by performing its test launch.
-
-
-
Method Detail
-
tryLocateTool
public Optional<File> tryLocateTool(String toolName)
Makes an attempt to locate the tool by its name. If there are multiple tools to pick from, the first one that will be selected.- Parameters:
toolName- the name of a tool to locate, notnull- Returns:
- absolute path to a tool if it was located and
verifyTool(File)returnedtruefor it orOptional.empty()if there are no such tools
-
verifyTool
public boolean verifyTool(File toolPath)
Verifies that the tool specified works by performing its test launch.- Parameters:
toolPath- the path to a tool to check- Returns:
trueif the test launch had ended with successful error code,falseotherwise
-
-