Kotlin Example Code
// ˅
import java.util.*
import java.text.*
// ˄
data class Foo {
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Kotlin Example Code
// ˅
import java.util.*
import java.text.*
// ˄
enum class Foo {
RED,
GREEN,
BLUE;
// ˅
// ˄
}
// ˅
// ˄
Kotlin Example Code
// ˅
import java.util.*
import java.text.*
// ˄
object Foo {
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Kotlin Example Code
// ˅
import java.util.*
import java.text.*
// ˄
companion object Foo {
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Kotlin Example Code
// ˅
import java.util.*
import java.text.*
// ˄
class Foo() {
// ˅
// ˄
constructor()
// ˅
: this()
// ˄
{
// ˅
// ˄
}
// ˅
// ˄
}
// ˅
// ˄
Kotlin Example Code
// ˅
import java.util.*
import java.text.*
// ˄
class Foo {
// ˅
// ˄
internal var sum: Int
// ˅
// ˄
fun calc() {
// ˅
throw UnsupportedOperationException("Not implemented.")
// ˄
}
// ˅
// ˄
}
// ˅
// ˄
Using TaggedValue
Kotlin Example Code
// ˅
import java.util.*
import java.text.*
// ˄
class Foo {
// ˅
// ˄
@transient
@volatile
private var sum: Int
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Using Stereotype
Kotlin Example Code
// ˅
import java.util.*
import java.text.*
// ˄
class Foo {
// ˅
// ˄
@transient
@volatile
private var sum: Int
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Using TaggedValue
Kotlin Example Code
// ˅
import java.util.*
import java.text.*
// ˄
class Foo {
// ˅
// ˄
private var name: String by Delegate()
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Using Stereotype
Kotlin Example Code
// ˅
import java.util.*
import java.text.*
// ˄
class Foo {
// ˅
// ˄
private var name: String by Delegate()
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Kotlin Example Code
// ˅
import java.util.*
import java.text.*
// ˄
class Foo {
// ˅
// ˄
inner class Bar {
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
}
// ˅
// ˄
Kotlin Example Code
// ˅
import java.util.*
import java.text.*
// ˄
sealed class Foo {
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Using TaggedValue
Click an association element.
Select the TaggedValue tab.
Enter "collection_kind" in the Name and a collection type in the Value. The following collection types can be entered. If this TaggedValue is not set, it is the same as setting "MutableList".
MutableList
MutableSet
List
Set
Stack
Array
ArrayList
ArrayDeque
LinkedList
HashSet
LinkedHashSet
TreeSet
Select the Association End tab.
Enter “*” for the upper limit in the Multiplicity.
Kotlin Example Code
// ˅
import java.util.*
import java.text.*
import Bar
// ˄
class Foo {
// ˅
// ˄
private var cntBar: List<Bar>
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Using Stereotype
Click an association element.
Select the Stereotype tab.
Enter "collection_kind=(Collection type)" in the Name. The following collection types can be entered. If this Stereotype is not set, it is the same as setting "MutableList".
MutableList
MutableSet
List
Set
Stack
Array
ArrayList
ArrayDeque
LinkedList
HashSet
LinkedHashSet
TreeSet
Select the Association End tab.
Enter “*” for the upper limit in the Multiplicity.
Kotlin Example Code
// ˅
import java.util.*
import java.text.*
import Bar
// ˄
class Foo {
// ˅
// ˄
private var cntBar: List<Bar>
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Using TaggedValue
Click an association element with the qualifier.
Select the TaggedValue tab.
Enter "collection_kind" in the Name, and a collection type in the Value. The following collection types can be entered. If this TaggedValue is not set, it is the same as setting "MutableMap".
MutableMap
Map
HashMap
LinkedHashMap
TreeMap
Kotlin Example Code
// ˅
import java.util.*
import java.text.*
import Bar
// ˄
class Foo {
// ˅
// ˄
private var cntBar: Map<Int, Bar>
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Using Stereotype
Kotlin Example Code
// ˅
import java.util.*
import java.text.*
import Bar
// ˄
class Foo {
// ˅
// ˄
private var cntBar: Map<Int, Bar>
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Using TaggedValue
Kotlin Example Code
// ˅
import java.util.*
import java.text.*
import Base
// ˄
class Derived(p: Int) : Base(p) {
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Using Stereotype
Kotlin Example Code
// ˅
import java.util.*
import java.text.*
import Base
// ˄
class Derived(p: Int) : Base(p) {
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄