Package proguard.classfile.util.kotlin
Class KotlinNameUtil
- java.lang.Object
-
- proguard.classfile.util.kotlin.KotlinNameUtil
-
public class KotlinNameUtil extends java.lang.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 Summary
Fields Modifier and Type Field Description static java.lang.String
GET_PREFIX
static java.lang.String
IS_PREFIX
static java.lang.String
SET_PREFIX
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
generateGetterName(java.lang.String name)
static java.lang.String
generateSetterName(java.lang.String name)
static java.lang.String
getterNameToPropertyName(java.lang.String name, boolean stripAfterDollar)
See propertiesConventionUtil.ktstatic boolean
isGetterName(java.lang.String name)
static boolean
isSetterName(java.lang.String name)
-
-
-
Field Detail
-
GET_PREFIX
public static final java.lang.String GET_PREFIX
- See Also:
- Constant Field Values
-
SET_PREFIX
public static final java.lang.String SET_PREFIX
- See Also:
- Constant Field Values
-
IS_PREFIX
public static final java.lang.String IS_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
generateGetterName
public static java.lang.String generateGetterName(java.lang.String name)
-
generateSetterName
public static java.lang.String generateSetterName(java.lang.String name)
-
isGetterName
public static boolean isGetterName(java.lang.String name)
-
isSetterName
public static boolean isSetterName(java.lang.String name)
-
getterNameToPropertyName
public static java.lang.String getterNameToPropertyName(java.lang.String name, boolean stripAfterDollar)
See propertiesConventionUtil.ktFor example:
getMyProperty -> myProperty isProperty -> property isfalse -> isfalse
- Parameters:
name
- the property getter name e.g. getMyPropertystripAfterDollar
- strip any extra info added by the compiler- Returns:
- the property name
-
-