aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/repopatterns/RepoPatternKeyOwner.kt
blob: 255d6fb65b124747e1d95a18da1e0808983ef408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package at.hannibal2.skyhanni.utils.repopatterns

import kotlin.reflect.KProperty

/** Declares which class/property owns a repo pattern key.
 * @param ownerClass the owning class
 * @param property the property how owns it in the [ownerClass]
 * @param shares declares if the sub key space is allowed to be used by other [RepoPatternKeyOwner]
 * @param parent the [RepoPatternKeyOwner] that gives the permission to use a sub key from it sub key space that is locked, as [shares] is false for that[RepoPatternKeyOwner]
 * @param transient declares if it is just a ghost how can be replaced at any time in the [RepoPatternManager.exclusivity]
 * */
data class RepoPatternKeyOwner(
    val ownerClass: Class<*>?,
    val property: KProperty<*>?,
    val shares: Boolean,
    val parent: RepoPatternKeyOwner?,
    val transient: Boolean = false,
)