Class StatefulNameEnvironment
java.lang.Object
org.aspectj.ajdt.internal.core.builder.StatefulNameEnvironment
- All Implemented Interfaces:
IModuleAwareNameEnvironment,INameEnvironment
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.env.IModuleAwareNameEnvironment
IModuleAwareNameEnvironment.LookupStrategy -
Constructor Summary
ConstructorsConstructorDescriptionStatefulNameEnvironment(IModuleAwareNameEnvironment baseEnvironment, Map<String, File> classesFromName, AjState state) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyModuleUpdates(IUpdatableModule module, IUpdatableModule.UpdateKind kind) Ask the name environment to perform any updates (add-exports or add-reads) to the given module.voidcleanup()This method cleans the environment.findType(char[][] compoundName) Find a type with the given compound name.findType(char[][] compoundName, char[] moduleName) findType(char[] typeName, char[][] packageName) Find a type named<typeName>in the package<packageName>.findType(char[] typeName, char[][] packageName, char[] moduleName) Answer a type identified by the given names.char[][]getModule(char[] moduleName) Get the module with the given name, which must denote a named module.char[][]getModulesDeclaringPackage(char[][] arg0, char[] arg1) char[][]getUniqueModulesDeclaringPackage(char[][] packageName, char[] moduleName) booleanhasCompilationUnit(char[][] qualifiedPackageName, char[] moduleName, boolean checkCUs) Answer whether the given package (within the given module) contains any compilation unit.booleanisPackage(char[][] parentPackageName, char[] packageName) Answer whether packageName is the name of a known subpackage inside the package parentPackageName.char[][]listPackages(char[] arg0) Lists all packages in the module identified by the given, real module name (i.e., this method is implemented only forIModuleAwareNameEnvironment.LookupStrategy.Named).voidNeeds to be told about changes.
-
Constructor Details
-
StatefulNameEnvironment
public StatefulNameEnvironment(IModuleAwareNameEnvironment baseEnvironment, Map<String, File> classesFromName, AjState state)
-
-
Method Details
-
cleanup
public void cleanup()Description copied from interface:INameEnvironmentThis 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:
cleanupin interfaceINameEnvironment
-
findType
Description copied from interface:INameEnvironmentFind a type named<typeName>in the package<packageName>. Answer the binary form of the type if it is known to be consistent. Otherwise, answer the compilation unit which defines the type or null if the type does not exist. The default package is indicated by char[0][]. It is known that the package containing the type exists. NOTE: This method can be used to find a member type using its internal name A$B, but the source file for A is answered if the binary file is inconsistent.- Specified by:
findTypein interfaceIModuleAwareNameEnvironment- Specified by:
findTypein interfaceINameEnvironment
-
findType
Description copied from interface:INameEnvironmentFind a type with the given compound name. Answer the binary form of the type if it is known to be consistent. Otherwise, answer the compilation unit which defines the type or null if the type does not exist. Types in the default package are specified as {{typeName}}. It is unknown whether the package containing the type actually exists. NOTE: This method can be used to find a member type using its internal name A$B, but the source file for A is answered if the binary file is inconsistent.- Specified by:
findTypein interfaceIModuleAwareNameEnvironment- Specified by:
findTypein interfaceINameEnvironment
-
isPackage
public boolean isPackage(char[][] parentPackageName, char[] packageName) Description copied from interface:INameEnvironmentAnswer whether packageName is the name of a known subpackage inside the package parentPackageName. A top level package is found relative to null. The default package is always assumed to exist. For example: isPackage({{java}, {awt}}, {event}); isPackage(null, {java});- Specified by:
isPackagein interfaceIModuleAwareNameEnvironment- Specified by:
isPackagein interfaceINameEnvironment
-
update
-
findType
- Specified by:
findTypein interfaceIModuleAwareNameEnvironment
-
findType
Description copied from interface:IModuleAwareNameEnvironmentAnswer a type identified by the given names. moduleName may be one of the special names from ModuleBinding (ANY, ANY_NAMED, UNNAMED).- Specified by:
findTypein interfaceIModuleAwareNameEnvironment
-
hasCompilationUnit
public boolean hasCompilationUnit(char[][] qualifiedPackageName, char[] moduleName, boolean checkCUs) Description copied from interface:IModuleAwareNameEnvironmentAnswer whether the given package (within the given module) contains any compilation unit.- Specified by:
hasCompilationUnitin interfaceIModuleAwareNameEnvironment- Parameters:
checkCUs- - if true, check contained Compilation Units for a matching package declaration- Returns:
- true iff the package contains at least one compilation unit.
-
getModule
Description copied from interface:IModuleAwareNameEnvironmentGet the module with the given name, which must denote a named module.- Specified by:
getModulein interfaceIModuleAwareNameEnvironment
-
applyModuleUpdates
Description copied from interface:IModuleAwareNameEnvironmentAsk the name environment to perform any updates (add-exports or add-reads) to the given module.- Specified by:
applyModuleUpdatesin interfaceIModuleAwareNameEnvironment- Parameters:
module- the compiler representation of the module to updateskind- selects what kind of updates should be performed
-
getUniqueModulesDeclaringPackage
public char[][] getUniqueModulesDeclaringPackage(char[][] packageName, char[] moduleName) - Specified by:
getUniqueModulesDeclaringPackagein interfaceIModuleAwareNameEnvironment
-
getAllAutomaticModules
public char[][] getAllAutomaticModules()- Specified by:
getAllAutomaticModulesin interfaceIModuleAwareNameEnvironment
-
getModulesDeclaringPackage
public char[][] getModulesDeclaringPackage(char[][] arg0, char[] arg1) - Specified by:
getModulesDeclaringPackagein interfaceIModuleAwareNameEnvironment
-
listPackages
public char[][] listPackages(char[] arg0) Description copied from interface:IModuleAwareNameEnvironmentLists all packages in the module identified by the given, real module name (i.e., this method is implemented only forIModuleAwareNameEnvironment.LookupStrategy.Named).- Specified by:
listPackagesin interfaceIModuleAwareNameEnvironment- Returns:
- array of flat, dot-separated package names
-