public class NameEnvironment extends java.lang.Object implements IModuleAwareNameEnvironment, SuffixConstants
IModuleAwareNameEnvironment.LookupStrategyEXTENSION_aj, EXTENSION_AJ, EXTENSION_class, EXTENSION_CLASS, EXTENSION_java, EXTENSION_JAVA, EXTENSION_jmod, EXTENSION_JMOD, SUFFIX_aj, SUFFIX_AJ, SUFFIX_class, SUFFIX_CLASS, SUFFIX_java, SUFFIX_JAVA, SUFFIX_STRING_aj, SUFFIX_STRING_AJ, SUFFIX_STRING_class, SUFFIX_STRING_CLASS, SUFFIX_STRING_java, SUFFIX_STRING_JAVA| Constructor and Description |
|---|
NameEnvironment(IJavaProject javaProject,
CompilationGroup compilationGroup) |
| Modifier and Type | Method and Description |
|---|---|
void |
applyModuleUpdates(IUpdatableModule compilerModule,
IUpdatableModule.UpdateKind kind)
Ask the name environment to perform any updates (add-exports or add-reads) to the given module.
|
void |
cleanup()
This method cleans the environment.
|
NameEnvironmentAnswer |
findType(char[][] compoundName,
char[] moduleName) |
NameEnvironmentAnswer |
findType(char[] typeName,
char[][] packageName,
char[] moduleName)
Answer a type identified by the given names.
|
char[][] |
getAllAutomaticModules() |
IModule |
getModule(char[] name)
Get the module with the given name, which must denote a named module.
|
char[][] |
getModulesDeclaringPackage(char[][] packageName,
char[] moduleName) |
boolean |
hasCompilationUnit(char[][] qualifiedPackageName,
char[] moduleName,
boolean checkCUs)
Answer whether the given package (within the given module) contains any compilation unit.
|
protected boolean |
isOnModulePath(ClasspathEntry entry) |
boolean |
isPackage(java.lang.String qualifiedPackageName,
char[] moduleName) |
char[][] |
listPackages(char[] moduleName)
Lists all packages in the module identified by the given, real module name
(i.e., this method is implemented only for
IModuleAwareNameEnvironment.LookupStrategy.Named). |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindType, findType, getUniqueModulesDeclaringPackage, isPackagepublic NameEnvironment(IJavaProject javaProject, CompilationGroup compilationGroup)
protected boolean isOnModulePath(ClasspathEntry entry)
public void cleanup()
INameEnvironmentcleanup in interface INameEnvironmentpublic NameEnvironmentAnswer findType(char[][] compoundName, char[] moduleName)
findType in interface IModuleAwareNameEnvironmentpublic NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, char[] moduleName)
IModuleAwareNameEnvironmentfindType in interface IModuleAwareNameEnvironmentpublic char[][] getModulesDeclaringPackage(char[][] packageName,
char[] moduleName)
getModulesDeclaringPackage in interface IModuleAwareNameEnvironmentpublic boolean hasCompilationUnit(char[][] qualifiedPackageName,
char[] moduleName,
boolean checkCUs)
IModuleAwareNameEnvironmenthasCompilationUnit in interface IModuleAwareNameEnvironmentcheckCUs - - if true, check contained Compilation Units for a matching package declarationpublic boolean isPackage(java.lang.String qualifiedPackageName,
char[] moduleName)
public char[][] listPackages(char[] moduleName)
IModuleAwareNameEnvironmentIModuleAwareNameEnvironment.LookupStrategy.Named).listPackages in interface IModuleAwareNameEnvironmentpublic IModule getModule(char[] name)
IModuleAwareNameEnvironmentgetModule in interface IModuleAwareNameEnvironmentpublic char[][] getAllAutomaticModules()
getAllAutomaticModules in interface IModuleAwareNameEnvironmentpublic void applyModuleUpdates(IUpdatableModule compilerModule, IUpdatableModule.UpdateKind kind)
IModuleAwareNameEnvironmentapplyModuleUpdates in interface IModuleAwareNameEnvironmentcompilerModule - the compiler representation of the module to updateskind - selects what kind of updates should be performed