public class ModuleUpdater
extends java.lang.Object
add-exports and add-reads options from
a project's class path entries, and performs the corresponding updates when requested by the compiler.
For patch-module and limit-modules see
org.aspectj.org.eclipse.jdt.internal.core.builder.ModuleEntryProcessor.
| Constructor and Description |
|---|
ModuleUpdater(JavaProject javaProject) |
| Modifier and Type | Method and Description |
|---|---|
void |
addModuleUpdate(java.lang.String moduleName,
java.util.function.Consumer<IUpdatableModule> update,
IUpdatableModule.UpdateKind kind) |
void |
addReadUnnamedForNonEmptyClasspath(JavaProject project,
IClasspathEntry[] expandedClasspath) |
void |
applyModuleUpdates(IUpdatableModule compilerModule,
IUpdatableModule.UpdateKind kind) |
void |
computeModuleUpdates(IClasspathEntry entry)
Detects any ADD_EXPORTS or ADD_READS classpath attributes, parses the value,
and collects the resulting module updates.
|
static java.util.Set<java.lang.String> |
determineModulesOfProjectsWithNonEmptyClasspath(JavaProject project,
IClasspathEntry[] expandedClasspath) |
IUpdatableModule.UpdatesByKind |
getUpdates(java.lang.String moduleName) |
public ModuleUpdater(JavaProject javaProject)
public void computeModuleUpdates(IClasspathEntry entry) throws JavaModelException
entry - a classpath entry of the current project.JavaModelExceptionpublic void addModuleUpdate(java.lang.String moduleName,
java.util.function.Consumer<IUpdatableModule> update,
IUpdatableModule.UpdateKind kind)
public void applyModuleUpdates(IUpdatableModule compilerModule, IUpdatableModule.UpdateKind kind)
IModuleAwareNameEnvironment#applyModuleUpdates(IUpdatableModule, UpdateKind)public void addReadUnnamedForNonEmptyClasspath(JavaProject project, IClasspathEntry[] expandedClasspath) throws JavaModelException
JavaModelExceptionpublic static java.util.Set<java.lang.String> determineModulesOfProjectsWithNonEmptyClasspath(JavaProject project, IClasspathEntry[] expandedClasspath) throws JavaModelException
JavaModelExceptionpublic IUpdatableModule.UpdatesByKind getUpdates(java.lang.String moduleName)