public class KotlinNameUtil
extends java.lang.Object
See, for example, https://github.com/JetBrains/kotlin/blob/master/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/JvmAbi.java
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
GET_PREFIX |
static java.lang.String |
IS_PREFIX |
static java.lang.String |
SET_PREFIX |
Modifier and Type | Method and 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.kt
|
static boolean |
isGetterName(java.lang.String name) |
static boolean |
isSetterName(java.lang.String name) |
public static final java.lang.String GET_PREFIX
public static final java.lang.String SET_PREFIX
public static final java.lang.String IS_PREFIX
public static java.lang.String generateGetterName(java.lang.String name)
public static java.lang.String generateSetterName(java.lang.String name)
public static boolean isGetterName(java.lang.String name)
public static boolean isSetterName(java.lang.String name)
public static java.lang.String getterNameToPropertyName(java.lang.String name, boolean stripAfterDollar)
For example:
getMyProperty -> myProperty isProperty -> property isfalse -> isfalse
name
- the property getter name e.g. getMyPropertystripAfterDollar
- strip any extra info added by the compiler