Class NameEnvironment
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.builder.NameEnvironment
- All Implemented Interfaces:
IModuleAwareNameEnvironment
,INameEnvironment
,SuffixConstants
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.env.IModuleAwareNameEnvironment
IModuleAwareNameEnvironment.LookupStrategy
-
Field Summary
Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.util.SuffixConstants
EXTENSION_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 Summary
ConstructorDescriptionNameEnvironment(IJavaProject javaProject, CompilationGroup compilationGroup)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.findType(char[][] compoundName, char[] moduleName)
findType(char[] typeName, char[][] packageName, char[] moduleName)
Answer a type identified by the given names. moduleName may be one of the special names from ModuleBinding (ANY, ANY_NAMED, UNNAMED).char[][]
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
char[][]
listPackages(char[] moduleName)
Lists all packages in the module identified by the given, real module name (i.e., this method is implemented only forIModuleAwareNameEnvironment.LookupStrategy.Named
).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.env.IModuleAwareNameEnvironment
findType, findType, getUniqueModulesDeclaringPackage, isPackage
-
Constructor Details
-
NameEnvironment
-
-
Method Details
-
isOnModulePath
-
cleanup
public void cleanup()Description copied from interface:INameEnvironment
This method cleans the environment. It is responsible for releasing the memory and freeing resources. Passed that point, the name environment is no longer usable. A name environment can have a long life cycle, therefore it is the responsibility of the code which created it to decide when it is a good time to clean it up.- Specified by:
cleanup
in interfaceINameEnvironment
-
findType
- Specified by:
findType
in interfaceIModuleAwareNameEnvironment
-
findType
Description copied from interface:IModuleAwareNameEnvironment
Answer a type identified by the given names. moduleName may be one of the special names from ModuleBinding (ANY, ANY_NAMED, UNNAMED).- Specified by:
findType
in interfaceIModuleAwareNameEnvironment
-
getModulesDeclaringPackage
public char[][] getModulesDeclaringPackage(char[][] packageName, char[] moduleName)- Specified by:
getModulesDeclaringPackage
in interfaceIModuleAwareNameEnvironment
-
hasCompilationUnit
public boolean hasCompilationUnit(char[][] qualifiedPackageName, char[] moduleName, boolean checkCUs)Description copied from interface:IModuleAwareNameEnvironment
Answer whether the given package (within the given module) contains any compilation unit.- Specified by:
hasCompilationUnit
in interfaceIModuleAwareNameEnvironment
checkCUs
- - if true, check contained Compilation Units for a matching package declaration- Returns:
- true iff the package contains at least one compilation unit.
-
isPackage
-
listPackages
public char[][] listPackages(char[] moduleName)Description copied from interface:IModuleAwareNameEnvironment
Lists all packages in the module identified by the given, real module name (i.e., this method is implemented only forIModuleAwareNameEnvironment.LookupStrategy.Named
).- Specified by:
listPackages
in interfaceIModuleAwareNameEnvironment
- Returns:
- array of flat, dot-separated package names
-
getModule
Description copied from interface:IModuleAwareNameEnvironment
Get the module with the given name, which must denote a named module.- Specified by:
getModule
in interfaceIModuleAwareNameEnvironment
-
getAllAutomaticModules
public char[][] getAllAutomaticModules()- Specified by:
getAllAutomaticModules
in interfaceIModuleAwareNameEnvironment
-
applyModuleUpdates
Description copied from interface:IModuleAwareNameEnvironment
Ask the name environment to perform any updates (add-exports or add-reads) to the given module.- Specified by:
applyModuleUpdates
in interfaceIModuleAwareNameEnvironment
- Parameters:
compilerModule
- the compiler representation of the module to updateskind
- selects what kind of updates should be performed
-