reduce default visibility for new classes and packages

New visibilities:
- Java class -> package-private;
- Java record -> package-private;
- Kotlin class -> internal;
- package -> `@Internal`.

Interfaces and enums usually become API anyway, so they are kept public.

GitOrigin-RevId: d7451cd3f9b8340243bec929c6e98116db1b418b
This commit is contained in:
Daniil Ovchinnikov
2024-05-29 14:10:31 +02:00
committed by intellij-monorepo-bot
parent 7b79dc0c6b
commit ce6517d121
4 changed files with 20 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public final class ${NAME} {
final class ${NAME} {
}

View File

@@ -0,0 +1,6 @@
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}
#end
#parse("File Header.java")
internal class ${NAME} {
}

View File

@@ -0,0 +1,6 @@
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};
#end
#parse("File Header.java")
record ${NAME}() {
}

View File

@@ -0,0 +1,7 @@
#parse("File Header.java")
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")
@Internal
package ${PACKAGE_NAME};
import org.jetbrains.annotations.ApiStatus.Internal;
#end