Package org.eclipse.jdt.core.provisional
Class JavaModelAccess
java.lang.Object
org.eclipse.jdt.core.provisional.JavaModelAccess
Provisional API for use by JDT/UI or JDT/Debug, which may possibly be removed in a future version.
See Bug 522391.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic IModuleDescription
Returns theIModuleDescription
that the given java element contains when regarded as an automatic module.static String[]
getRequiredModules
(IModuleDescription module) Deprecated.static boolean
isSystemModule
(IModuleDescription module) Deprecated.please useIModuleDescription.isSystemModule()
-
Constructor Details
-
JavaModelAccess
public JavaModelAccess()
-
-
Method Details
-
getRequiredModules
@Deprecated public static String[] getRequiredModules(IModuleDescription module) throws JavaModelException Deprecated.this provisional API has been promoted toIModuleDescription.getRequiredModuleNames()
Answer the names of all modules directly required from the given module.- Parameters:
module
- the module whose "requires" directives are queried- Returns:
- a non-null array of module names
- Throws:
JavaModelException
-
getAutomaticModuleDescription
public static IModuleDescription getAutomaticModuleDescription(IJavaElement element) throws JavaModelException, IllegalArgumentException Returns theIModuleDescription
that the given java element contains when regarded as an automatic module. The element must be anIPackageFragmentRoot
or anIJavaProject
.The returned module descriptor has a name (
getElementName()
) following the specification ofjava.lang.module.ModuleFinder.of(Path...)
, but it contains no other useful information.- Returns:
- the
IModuleDescription
representing this java element as an automatic module, nevernull
. - Throws:
IllegalArgumentException
- if the provided element is neitherIPackageFragmentRoot
norIJavaProject
JavaModelException
- Since:
- 3.14
-
isSystemModule
Deprecated.please useIModuleDescription.isSystemModule()
Answer whether the given module is a system module.This provisional API may likely be changed into a direct method
IModuleDescription.isSystemModule()
.- Parameters:
module
- the module being queried about- Returns:
true
iff the module is defined in the system library (also known as JRE).- Since:
- 3.18
-
IModuleDescription.getRequiredModuleNames()