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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IModuleDescriptionReturns theIModuleDescriptionthat the given java element contains when regarded as an automatic module.static String[]getRequiredModules(IModuleDescription module) Deprecated.static booleanisSystemModule(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 theIModuleDescriptionthat the given java element contains when regarded as an automatic module. The element must be anIPackageFragmentRootor 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
IModuleDescriptionrepresenting this java element as an automatic module, nevernull. - Throws:
IllegalArgumentException- if the provided element is neitherIPackageFragmentRootnorIJavaProjectJavaModelException- 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:
trueiff the module is defined in the system library (also known as JRE).- Since:
- 3.18
-
IModuleDescription.getRequiredModuleNames()