Package 

Class AFLoggerBase


  • 
    public abstract class AFLoggerBase
    
                        

    This 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