Class KotlinNameUtil

java.lang.Object
proguard.classfile.util.kotlin.KotlinNameUtil

public class KotlinNameUtil extends Object
Kotlin utility methods to help with Kotlin naming conventions.

See, for example, https://github.com/JetBrains/kotlin/blob/master/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/JvmAbi.java

  • Field Details

  • Method Details

    • generateGetterName

      public static String generateGetterName(String name)
    • generateSetterName

      public static String generateSetterName(String name)
    • isGetterName

      public static boolean isGetterName(String name)
    • isSetterName

      public static boolean isSetterName(String name)
    • getterNameToPropertyName

      public static String getterNameToPropertyName(String name, boolean stripAfterDollar)
      See propertiesConventionUtil.kt

      For example:

      getMyProperty -> myProperty isProperty -> property isfalse -> isfalse

      Parameters:
      name - the property getter name e.g. getMyProperty
      stripAfterDollar - strip any extra info added by the compiler
      Returns:
      the property name