Package org.eclipse.jdt.core
Interface IModuleDescription
-
- All Superinterfaces:
IAdaptable
,IAnnotatable
,IJavaElement
,IMember
,IParent
,ISourceManipulation
,ISourceReference
public interface IModuleDescription extends IMember, IAnnotatable
Represents a Java module descriptor. The module description could either come from source or binary. A simple module looks like the following:module my.module { exports my.pack1; exports my.pack2; requires java.sql; }
- Since:
- 3.14
- Restriction:
- This interface is not intended to be implemented by clients.
-
-
Field Summary
-
Fields inherited from interface org.eclipse.jdt.core.IJavaElement
ANNOTATION, CLASS_FILE, COMPILATION_UNIT, FIELD, IMPORT_CONTAINER, IMPORT_DECLARATION, INITIALIZER, JAVA_MODEL, JAVA_MODULE, JAVA_PROJECT, LOCAL_VARIABLE, METHOD, PACKAGE_DECLARATION, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT, TYPE, TYPE_PARAMETER
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description String[]
getExportedPackageNames(IModuleDescription targetModule)
Get names of exported packages.String[]
getOpenedPackageNames(IModuleDescription targetModule)
Get names of opened packages.String[]
getProvidedServiceNames()
Get provided service names for this module.String[]
getRequiredModuleNames()
Answer the names of all modules directly required from this module.String[]
getUsedServiceNames()
Get used service names for this module.default boolean
isAutoModule()
default boolean
isSystemModule()
-
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
-
Methods inherited from interface org.eclipse.jdt.core.IAnnotatable
getAnnotation, getAnnotations
-
Methods inherited from interface org.eclipse.jdt.core.IJavaElement
exists, getAncestor, getAttachedJavadoc, getCorrespondingResource, getElementName, getElementType, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPath, getPrimaryElement, getResource, getSchedulingRule, getUnderlyingResource, isReadOnly, isStructureKnown
-
Methods inherited from interface org.eclipse.jdt.core.IMember
getCategories, getClassFile, getCompilationUnit, getDeclaringType, getFlags, getJavadocRange, getOccurrenceCount, getType, getTypeRoot, isBinary
-
Methods inherited from interface org.eclipse.jdt.core.IParent
getChildren, hasChildren
-
Methods inherited from interface org.eclipse.jdt.core.ISourceManipulation
copy, delete, move, rename
-
Methods inherited from interface org.eclipse.jdt.core.ISourceReference
exists, getNameRange, getSource, getSourceRange
-
-
-
-
Method Detail
-
getRequiredModuleNames
String[] getRequiredModuleNames() throws JavaModelException
Answer the names of all modules directly required from this module.- Returns:
- a non-null array of module names
- Throws:
JavaModelException
- Since:
- 3.14
-
getProvidedServiceNames
String[] getProvidedServiceNames() throws JavaModelException
Get provided service names for this module.- Returns:
- a non-null array of provided service names
- Throws:
JavaModelException
- Since:
- 3.18
-
getUsedServiceNames
String[] getUsedServiceNames() throws JavaModelException
Get used service names for this module.- Returns:
- a non-null array of used service names
- Throws:
JavaModelException
- Since:
- 3.18
-
getExportedPackageNames
String[] getExportedPackageNames(IModuleDescription targetModule) throws JavaModelException
Get names of exported packages.- Parameters:
targetModule
- filter the result to include only packages exported to the given module, unlessnull
.- Returns:
- a non-null array of exported package names
- Throws:
JavaModelException
- Since:
- 3.18
-
getOpenedPackageNames
String[] getOpenedPackageNames(IModuleDescription targetModule) throws JavaModelException
Get names of opened packages.- Parameters:
targetModule
- filter the result to include only packages opened to the given module, unlessnull
.- Returns:
- a non-null array of opened package names
- Throws:
JavaModelException
- Since:
- 3.18
-
isAutoModule
default boolean isAutoModule()
- Returns:
- true if automatic module, else false
- Since:
- 3.14
-
isSystemModule
default boolean isSystemModule()
- Returns:
- true if this module is a system module, else false
- Since:
- 3.20
-
-