1 // this file is not included in sources or tests, you can play with it for debug purposes
2 // Console run configuration will analyse it and provide lots of debug output
3 package dokka.playground
4
topLevelFunctionnull5 fun topLevelFunction() {
6 }
7
8 val topLevelConstantValue = "Hello"
9
10 val topLevelValue: String
11 get() = "Bye bye"
12
13 var topLevelVariable: String
14 get() = "Modify me!"
15 set(value) {
16 }
17
18 /**
19 * This is a class
20 */
21 class Class {
memberFunctionnull22 fun memberFunction() {
23 }
24
25 val memberValue = "Member"
26 }
27
28 /**
29 * This is a class with constructor and space after doc
30 */
31
32 class ClassWithConstructor(
33 /** Doc at parameter */ val name: Class)
34
35 /**
36 * This is data class with constructor and two properties
37 * Also look at [Employee]
38 *
39 * $name Person's name
40 * $age Person's age
41 *
42 */
43 data class Person(val name: ClassWithConstructor, val age: Int) {}
44
45 data class Employee(val name: ClassWithConstructor, val age: Int) {}
46
<lambda>null47 object Object {
48 throws(javaClass<IllegalArgumentException>())
49 fun objectFunction() {
50 }
51
52 val objectValue: String
53 /** one line getter doc */
54 get() = "Member"
55
56 public val String.valueWithReceiver: Int
57 get() = 1
58
59 }
60
61 enum class Color(r: Int, g: Int, b: Int) {
62 Red : Color(100,0,0)
63 Green : Color(0,100,0)
64 Blue : Color(0,0,100)
65 }
66
67 class OuterClass {
68
69 /**
70 * $T type of the item
71 */
72 class NestedClass<T> {
nestedClassFunctionnull73 fun nestedClassFunction(item: T) {
74 }
75
functionWithReceivernull76 fun String.functionWithReceiver(): Int = 1
77
78 }
79
80 inner class InnerClass {
81 open fun innerClassFunction<
82 /** doc for R1 type param */
83 R1,
84 /** doc for R2 type param */
85 R2
86 >() {
87 }
88 }
89
90 object NestedObject {
nestedObjectFunctionnull91 protected open fun nestedObjectFunction() {
92 }
93 }
94 }
95
96 trait Interface {
workernull97 fun worker()
98 val extra: String
99 }