KaSymbolVisibility¶
enum class KaSymbolVisibility : Enum<KaSymbolVisibility>
The visibility of a KaSymbol. As symbols can represent both Kotlin and Java declarations, KaSymbolVisibility covers both visibility definitions.
The entry order does not carry any particular meaning. If you need to sort declarations based on their visibility, use a custom comparator.
In addition, the following articles contain information about how visibility is affected by Kotlin and Java interoperability:
Entries¶
PUBLIC¶
A public declaration is visible everywhere. This is the default visibility in Kotlin.
PROTECTED¶
A protected declaration is visible inside its containing declaration and all its members, as well as in subclasses.
INTERNAL¶
An internal declaration is visible everywhere in the same module. If the declaration is a class member, the class must also be visible for the internal member to be visible.
PACKAGE_PROTECTED¶
A package-protected Java declaration is visible in its class, package, and in all subclasses (even outside the package).
PACKAGE_PRIVATE¶
A package-private Java declaration is visible in its class and package. This is the default visibility in Java.
PRIVATE¶
A private declaration is visible inside its containing declaration and all its members, or inside the whole file if the declaration is top-level.
LOCAL¶
The visibility of local declarations.
UNKNOWN¶
An unknown visibility, for example in the case of erroneous code where it is impossible to infer the proper visibility.
Companion properties¶
entries¶
Returns an immutable kotlin.enums.EnumEntries list containing the constants of this enum type, in the order they're declared.
Companion functions¶
valueOf¶
fun valueOf(value: String): KaSymbolVisibility
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Throws
kotlin.IllegalArgumentException-
if this enum type has no constant with the specified name
values¶
fun values(): Array<KaSymbolVisibility>
Returns an array containing the constants of this enum type, in the order they're declared.
This method may be used to iterate over the constants.
The function returns a new instance of the array on every call. The array could be mutated, so working with it may also require defensive copying. Consider using entries property as a more efficient alternative returning an immutable list of enum entries.