A source language Copilot can read and, depending on the operation, rewrite.
Copilot previously expressed this as a set of Kotlin-specific predicates
(KotlinUtil.isKotlin, isKotlinSourcePath) which could only
answer "is this Kotlin?". Naming the languages instead lets callers pick a
rewriter, choose an extension when generating a file, and report the language
to the frontend.
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Returns the enum constant of this class with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this class. (Extraneous whitespace characters are
not permitted.)
Parameters:
name - the name of the enum constant to be returned.
Determines the language of a source folder from its path, by looking for a
path segment named after a language. This follows the Maven and Gradle
convention of src/main/java and src/main/kotlin.
The segment must match exactly, so src/main/kotlinx is not Kotlin.
Parameters:
folder - the source folder, may be null
Returns:
the language, or empty if no segment names a language