Class KotlinUtil

java.lang.Object
com.vaadin.copilot.KotlinUtil

public class KotlinUtil extends Object
  • Method Details

    • throwIfKotlin

      public static void throwIfKotlin(File file)
      Checks file extension is kotlin extensions .e.g kt, kts and throws KotlinNotSupportedException when file has one of the extensions
      Parameters:
      file - File to check
    • isKotlin

      public static boolean isKotlin(File file)
      Checks file extension is kotlin extensions .e.g kt, kts
      Parameters:
      file - File to check
      Returns:
      true if kotlin file, false otherwise.
    • isKotlinProject

      public static boolean isKotlinProject(ProjectFileManager projectFileManager)
      Checks whether project source folders include Kotlin sources.
      Parameters:
      projectFileManager - Project file manager to inspect
      Returns:
      true if Kotlin sources are detected, false otherwise.