Package io.sundr.codegen.template.utils
Class Templates
java.lang.Object
io.sundr.codegen.template.utils.Templates
-
Method Summary
Modifier and TypeMethodDescriptiongetExtension(String templatePath) Utility that gets the file extension from the specified path if present.getExtension(URL templateUrl) Utility that gets the file extension from the specifiedURLif present.static StringUtility to read the template from the specifiedURL.
-
Method Details
-
read
Utility to read the template from the specifiedURL.- Parameters:
templateUrl- the specified url- Returns:
- the content of the template as
String
-
getExtension
Utility that gets the file extension from the specified path if present.- Parameters:
templatePath- The specified path- Returns:
- an
OptionalString or empty, if no extension was found.
-
getExtension
Utility that gets the file extension from the specifiedURLif present.
-