public class KotlinUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static boolean |
kotlin_class_klass_error |
private static boolean |
kotlin_error |
private static java.lang.reflect.Constructor |
kotlin_kclass_constructor |
private static java.lang.reflect.Method |
kotlin_kclass_getConstructors |
private static java.lang.reflect.Method |
kotlin_kfunction_getParameters |
private static java.lang.reflect.Method |
kotlin_kparameter_getName |
private static java.lang.Class |
kotlin_metadata |
private static boolean |
kotlin_metadata_error |
private static java.util.Map<java.lang.Class,java.lang.String[]> |
kotlinIgnores |
private static boolean |
kotlinIgnores_error |
private static java.util.logging.Logger |
logger |
static int |
STATE |
private static java.util.Set<java.lang.Class<?>> |
unresolvedParameterNamesWarned |
| Modifier | Constructor and Description |
|---|---|
private |
KotlinUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
getConstructor(java.lang.Class<?> clazz,
BeanInfo beanInfo)
Gets the target constructor and its
parameter names of the specified
clazz |
static void |
getConstructor(java.lang.Class<?> clazz,
BeanInfo beanInfo,
boolean warnUnresolvedParameterNames)
Gets the target constructor and its
parameter names of the specified
clazz |
static java.lang.String[] |
getKoltinConstructorParameters(java.lang.Class clazz) |
static java.lang.reflect.Constructor |
getKotlinConstructor(java.lang.reflect.Constructor[] constructors) |
static java.lang.reflect.Constructor |
getKotlinConstructor(java.lang.reflect.Constructor[] constructors,
java.lang.String[] paramNames) |
static boolean |
isKotlin(java.lang.Class clazz) |
static boolean |
isKotlinIgnore(java.lang.Class clazz,
java.lang.String methodName) |
(package private) static boolean |
warnParameterNamesUnresolved(java.lang.Class<?> clazz,
int state,
int creatorParams,
java.lang.String[] createParameterNames)
Logs a warning, at most once per class, when a Kotlin class has constructor
parameters whose names could not be resolved — either because kotlin-reflect
is not on the classpath or because it failed at runtime.
|
public static final int STATE
private static volatile java.lang.Class kotlin_metadata
private static volatile boolean kotlin_metadata_error
private static volatile boolean kotlin_class_klass_error
private static volatile java.lang.reflect.Constructor kotlin_kclass_constructor
private static volatile java.lang.reflect.Method kotlin_kclass_getConstructors
private static volatile java.lang.reflect.Method kotlin_kfunction_getParameters
private static volatile java.lang.reflect.Method kotlin_kparameter_getName
private static volatile boolean kotlin_error
private static volatile java.util.Map<java.lang.Class,java.lang.String[]> kotlinIgnores
private static volatile boolean kotlinIgnores_error
private static final java.util.logging.Logger logger
private static final java.util.Set<java.lang.Class<?>> unresolvedParameterNamesWarned
public static void getConstructor(java.lang.Class<?> clazz,
BeanInfo beanInfo)
clazzclazz - the specified class for searchpublic static void getConstructor(java.lang.Class<?> clazz,
BeanInfo beanInfo,
boolean warnUnresolvedParameterNames)
clazzclazz - the specified class for searchwarnUnresolvedParameterNames - whether to log a warning when the
constructor has parameters but their names could not be resolved,
which makes deserialization silently fall back to default valuesstatic boolean warnParameterNamesUnresolved(java.lang.Class<?> clazz,
int state,
int creatorParams,
java.lang.String[] createParameterNames)
public static boolean isKotlin(java.lang.Class clazz)
public static java.lang.reflect.Constructor getKotlinConstructor(java.lang.reflect.Constructor[] constructors)
public static java.lang.reflect.Constructor getKotlinConstructor(java.lang.reflect.Constructor[] constructors,
java.lang.String[] paramNames)
public static java.lang.String[] getKoltinConstructorParameters(java.lang.Class clazz)
public static boolean isKotlinIgnore(java.lang.Class clazz,
java.lang.String methodName)