Package org.eclipse.jdt.core
Interface IModuleDescription
- All Superinterfaces:
org.eclipse.core.runtime.IAdaptable
,IAnnotatable
,IJavaElement
,IMember
,IParent
,ISourceManipulation
,ISourceReference
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
Modifier and TypeMethodDescriptionString[]
getExportedPackageNames
(IModuleDescription targetModule) Get names of exported packages.String[]
getOpenedPackageNames
(IModuleDescription targetModule) Get names of opened packages.String[]
Get provided service names for this module.String[]
Answer the names of all modules directly required from this module.String[]
Get used service names for this module.default boolean
default boolean
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 Details
-
getRequiredModuleNames
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
Get provided service names for this module.- Returns:
- a non-null array of provided service names
- Throws:
JavaModelException
- Since:
- 3.18
-
getUsedServiceNames
Get used service names for this module.- Returns:
- a non-null array of used service names
- Throws:
JavaModelException
- Since:
- 3.18
-
getExportedPackageNames
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
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
-