com.github.themrmilchmann.kraton.lang.java / JavaScope / group

group

@JvmOverloads fun group(name: String = "", sortingStrategy: Comparator<JavaBodyMember>? = null, headerPrinter: PrintWriter.(indent: String, group: JavaBodyMemberGroup<*, *>) -> Unit = null, init: S.() -> Unit): JavaBodyMemberGroup<T, S> (source)

Creates and registers a new group. For Java code a group is a solely theoretical construct that may be used to group elements logically.

Parameters

name - the name for the group

sortingStrategy - the sorting strategy used for members within the group (may be null to retain the order in which the elements were added)

headerPrinter - a group may be prefixed with a header by using this parameter

Since
1.0.0