Class Templates

java.lang.Object
io.sundr.codegen.template.utils.Templates

public final class Templates extends Object
  • Method Details

    • read

      public static String read(URL templateUrl)
      Utility to read the template from the specified URL.
      Parameters:
      templateUrl - the specified url
      Returns:
      the content of the template as String
    • getExtension

      public static Optional<String> getExtension(String templatePath)
      Utility that gets the file extension from the specified path if present.
      Parameters:
      templatePath - The specified path
      Returns:
      an Optional String or empty, if no extension was found.
    • getExtension

      public static Optional<String> getExtension(URL templateUrl)
      Utility that gets the file extension from the specified URL if present.
      Parameters:
      templateUrl - The specified URL
      Returns:
      an Optional String or empty, if no extension was found.