Package org.pkl.core.util
Class CodeGeneratorUtils
- java.lang.Object
-
- org.pkl.core.util.CodeGeneratorUtils
-
public final class CodeGeneratorUtils extends java.lang.ObjectUtilities shared across Java dnd Kotlin code generators.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisRepresentableAsEnum(PType type, @Nullable java.util.Set<java.lang.String> collector)static booleanisRepresentableAsString(PType type)static @Nullable java.lang.StringtoEnumConstantName(java.lang.String pklStringLiteral)Converts the given Pkl string literal to an idiomatic enum constant name.
-
-
-
Method Detail
-
isRepresentableAsEnum
public static boolean isRepresentableAsEnum(PType type, @Nullable java.util.Set<java.lang.String> collector)
-
isRepresentableAsString
public static boolean isRepresentableAsString(PType type)
-
toEnumConstantName
public static @Nullable java.lang.String toEnumConstantName(java.lang.String pklStringLiteral)
Converts the given Pkl string literal to an idiomatic enum constant name. Returns null if and only if the string literal could not be converted.
-
-