Example¶
class Example : MyInterface
This class is an example to see how the documentation website is generated.
Example¶
Another example:
Constructors¶
Example¶
constructor()
Public constructor for the Example class.
constructor(s: String)
Secondary constructor.
Parameters
- s: Some variable.
Example¶
Top-level function masquerading as a constructor.
Types¶
Companion¶
object Companion
The companion object.
Nested¶
class Nested
Properties¶
counter¶
A value that increments by one each time it is accessed.
This builder is not thread-safe.
prop2¶
val ExampleAlias.prop2: String
Extension property for ExampleAlias.
prop3¶
val ExampleAlias.prop3: String
Extension property for ExampleAlias.
Functions¶
foo¶
This is an example function.
This is a reference to a parameter: bar.
Return
This is a return type.
Parameters
- bar: This is a parameter.
foo2¶
inline suspend fun <T> ExampleAlias.foo2(): T
Extension function for ExampleAlias.
foo3¶
inline suspend fun <T> ExampleAlias.foo3(): T
Extension function for ExampleAlias.
fromInterface1¶
open fun fromInterface1(): String
This is a method from the interface MyInterface.
It is not overridden by the class Example.
fromInterface2¶
open override fun fromInterface2(): String
This is a method from MyInterface that has been overridden by the Example class.