[java, completion] refactoring: simplify code, add javadoc, add localization IJ-CR-127501

GitOrigin-RevId: e5adf605b24e8f74932f98c805d926ea4ef5d200
This commit is contained in:
Aleksey Dobrynin
2024-03-01 16:38:11 +01:00
committed by intellij-monorepo-bot
parent 0141f07298
commit d9e11e9153
10 changed files with 80 additions and 60 deletions

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.psi;
import com.intellij.openapi.util.NlsSafe;
@@ -16,9 +16,27 @@ public interface PsiJavaModule extends NavigatablePsiElement, PsiNameIdentifierO
String MODULE_INFO_CLASS = "module-info";
@NlsSafe String MODULE_INFO_FILE = MODULE_INFO_CLASS + ".java";
String MODULE_INFO_CLS_FILE = MODULE_INFO_CLASS + ".class";
/**
* "java.base" module is the the core module of the Java SE Platform.
* As such, it does not require explicit declaration in the module's {@code requires} directive.
*/
String JAVA_BASE = "java.base";
/**
* Represents the manifest attribute name used to specify an automatic module name.
* When a JAR file does not contain a module-info.java file,
* it can still be used as an automatic module by providing this attribute in its manifest.
* The value of this attribute defines the module's name, allowing it to be required by other modules.
*/
String AUTO_MODULE_NAME = "Automatic-Module-Name";
/**
* When a service provider specifies a "provider" method, the service loader uses this method to create a service provider instance.
* This method must be public, static, have no parameters, and return a type compatible with the service's interface or class.
*/
String PROVIDER_METHOD = "provider";
/* See http://openjdk.org/jeps/261#Class-loaders, "Class loaders" */
Set<String> UPGRADEABLE = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
"java.activation", "java.compiler", "java.corba", "java.transaction", "java.xml.bind", "java.xml.ws", "java.xml.ws.annotation",