-
public abstract class AFLoggerBaseThis abstract class define the public API for Logger clients. Unfortunately, it's not trivial to use default parameter values in interfaces with the JvmOverloads annotation. Here is why:
Kotlin interfaces can't include a method body. Therefore, indicating a default value for any method parameters isn't allowed, because under the hood the compiler generates a method in the bytecode that takes the defaults into account, which would require a method body.
The JvmOverloads annotation is intended for generating multiple overloads for constructors and methods in classes. This helps to ensure proper interaction with Java code, producing Java overloads for methods with default values. But again, interfaces can't have any constructors.
Abstract methods in Kotlin's abstract classes cannot have a method body. Therefore, you cannot assign default values to abstract methods because the default value assignment necessitates implementation within the method body. However, you can use JvmOverloads with concrete methods (those with bodies) in an abstract class
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classAFLoggerBase.Companion
-
Field Summary
Fields Modifier and Type Field Description private final BooleanshouldExtendMsg
-
Constructor Summary
Constructors Constructor Description AFLoggerBase()
-
Method Summary
Modifier and Type Method Description BooleangetShouldExtendMsg()Unitd(LogTag tag, String msg, Boolean shouldRemoteDebug)Unitd(LogTag tag, String msg)Unite(LogTag tag, String msg, Throwable throwable, Boolean printMsg, Boolean printThrowable, Boolean shouldReportToExManager, Boolean shouldRemoteDebug)Unite(LogTag tag, String msg, Throwable throwable, Boolean printMsg, Boolean printThrowable, Boolean shouldReportToExManager)Unite(LogTag tag, String msg, Throwable throwable, Boolean printMsg, Boolean printThrowable)Unite(LogTag tag, String msg, Throwable throwable, Boolean printMsg)Unite(LogTag tag, String msg, Throwable throwable)Uniti(LogTag tag, String msg, Boolean shouldRemoteDebug)Uniti(LogTag tag, String msg)Unitw(LogTag tag, String msg, Boolean shouldRemoteDebug)Unitw(LogTag tag, String msg)Unitv(LogTag tag, String msg, Boolean shouldRemoteDebug)Unitv(LogTag tag, String msg)Unitforce(LogTag tag, String msg)-
-
Method Detail
-
getShouldExtendMsg
Boolean getShouldExtendMsg()
-
d
@JvmOverloads() Unit d(LogTag tag, String msg)
-
e
@JvmOverloads() Unit e(LogTag tag, String msg, Throwable throwable, Boolean printMsg, Boolean printThrowable, Boolean shouldReportToExManager, Boolean shouldRemoteDebug)
-
e
@JvmOverloads() Unit e(LogTag tag, String msg, Throwable throwable, Boolean printMsg, Boolean printThrowable, Boolean shouldReportToExManager)
-
e
@JvmOverloads() Unit e(LogTag tag, String msg, Throwable throwable, Boolean printMsg, Boolean printThrowable)
-
i
@JvmOverloads() Unit i(LogTag tag, String msg)
-
w
@JvmOverloads() Unit w(LogTag tag, String msg)
-
v
@JvmOverloads() Unit v(LogTag tag, String msg)
-
-
-
-