# Class JavaModelAccess

java.lang.Object
org.eclipse.jdt.core.provisional.JavaModelAccess

public class JavaModelAccess extends Object
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
Constructor
Description
`JavaModelAccess()`

## Method Summary

Modifier and Type
Method
Description
`static IModuleDescription`
`getAutomaticModuleDescription(IJavaElement element)`
Returns the `IModuleDescription` that the given java element contains when regarded as an automatic module.
`static String[]`
`getRequiredModules(IModuleDescription module)`
Deprecated.
this provisional API has been promoted to `IModuleDescription.getRequiredModuleNames()`
`static boolean`
`isSystemModule(IModuleDescription module)`
Deprecated.
please use `IModuleDescription.isSystemModule()`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### JavaModelAccess

public JavaModelAccess()

## Method Details

### getRequiredModules

@Deprecated public static String[] getRequiredModules(IModuleDescription module) throws JavaModelException
Deprecated.
this provisional API has been promoted to `IModuleDescription.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 the `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.

Returns:
  the `IModuleDescription` representing this java element as an automatic module, never `null`.
Throws:
  `IllegalArgumentException` - if the provided element is neither `IPackageFragmentRoot` nor `IJavaProject`
  `JavaModelException`
Since:
  3.14

### isSystemModule

@Deprecated public static boolean isSystemModule(IModuleDescription module)
Deprecated.
please use `IModuleDescription.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