public class JavaModelAccess
extends java.lang.Object
| Constructor and Description |
|---|
JavaModelAccess() |
| Modifier and Type | Method and Description |
|---|---|
static IModuleDescription |
getAutomaticModuleDescription(IJavaElement element)
Returns the
IModuleDescription that the given java element contains
when regarded as an automatic module. |
static java.lang.String[] |
getRequiredModules(IModuleDescription module)
Deprecated.
this provisional API has been promoted to
IModuleDescription.getRequiredModuleNames() |
static boolean |
isSystemModule(IModuleDescription module)
Deprecated.
please use
IModuleDescription.isSystemModule() |
@Deprecated public static java.lang.String[] getRequiredModules(IModuleDescription module) throws JavaModelException
IModuleDescription.getRequiredModuleNames()module - the module whose "requires" directives are queriedJavaModelExceptionpublic static IModuleDescription getAutomaticModuleDescription(IJavaElement element) throws JavaModelException, java.lang.IllegalArgumentException
IModuleDescription that the given java element contains
when regarded as an automatic module. The element must be an IPackageFragmentRoot
or an IJavaProject.
The returned module descriptor has a name (getElementName()) following
the specification of java.lang.module.ModuleFinder.of(Path...), but it
contains no other useful information.
IModuleDescription representing this java element as an automatic module,
never null.JavaModelExceptionjava.lang.IllegalArgumentException - if the provided element is neither IPackageFragmentRoot
nor IJavaProject@Deprecated public static boolean isSystemModule(IModuleDescription module)
IModuleDescription.isSystemModule()This provisional API may likely be changed into a direct method IModuleDescription.isSystemModule().
module - the module being queried abouttrue iff the module is defined in the system library (also known as JRE).