public class FileSystem extends java.lang.Object implements IModuleAwareNameEnvironment, SuffixConstants
| Modifier and Type | Class and Description |
|---|---|
static interface |
FileSystem.Classpath
A
Classpath, even though an IModuleLocation, can represent a plain
classpath location too. |
static class |
FileSystem.ClasspathNormalizer
This class is defined how to normalize the classpath entries.
|
static interface |
FileSystem.ClasspathSectionProblemReporter |
IModuleAwareNameEnvironment.LookupStrategy| Modifier and Type | Field and Description |
|---|---|
protected boolean |
annotationsFromClasspath |
protected FileSystem.Classpath[] |
classpaths |
static java.util.ArrayList<FileSystem.Classpath> |
EMPTY_CLASSPATH |
IModule |
module |
protected java.util.Map<java.lang.String,FileSystem.Classpath> |
moduleLocations |
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| Modifier | Constructor and Description |
|---|---|
protected |
FileSystem(FileSystem.Classpath[] paths,
java.lang.String[] initialFileNames,
boolean annotationsFromClasspath) |
|
FileSystem(FileSystem.Classpath[] paths,
java.lang.String[] initialFileNames,
boolean annotationsFromClasspath,
java.util.Set<java.lang.String> limitedModules) |
|
FileSystem(java.lang.String[] classpathNames,
java.lang.String[] initialFileNames,
java.lang.String encoding,
java.util.Collection<java.lang.String> limitModules,
int mode,
java.lang.String release) |
|
FileSystem(java.lang.String[] classpathNames,
java.lang.String[] initialFileNames,
java.lang.String encoding,
int mode,
java.lang.String release) |
| 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[][][] |
findTypeNames(char[][] packageName) |
char[][] |
getAllAutomaticModules() |
static FileSystem.Classpath |
getClasspath(java.lang.String classpathName,
java.lang.String encoding,
AccessRuleSet accessRuleSet) |
static FileSystem.Classpath |
getClasspath(java.lang.String classpathName,
java.lang.String encoding,
AccessRuleSet accessRuleSet,
int mode,
java.lang.String release) |
static FileSystem.Classpath |
getClasspath(java.lang.String classpathName,
java.lang.String encoding,
AccessRuleSet accessRuleSet,
java.util.Map<java.lang.String,java.lang.String> options,
java.lang.String release) |
static FileSystem.Classpath |
getClasspath(java.lang.String classpathName,
java.lang.String encoding,
AccessRuleSet accessRuleSet,
java.util.Map options,
int mode,
java.lang.String release) |
static FileSystem.Classpath |
getClasspath(java.lang.String classpathName,
java.lang.String encoding,
boolean isSourceOnly,
AccessRuleSet accessRuleSet,
java.lang.String destinationPath,
java.util.Map<java.lang.String,java.lang.String> options,
java.lang.String release) |
static FileSystem.Classpath |
getClasspath(java.lang.String classpathName,
java.lang.String encoding,
int mode,
AccessRuleSet accessRuleSet,
java.lang.String destinationPath,
java.util.Map<java.lang.String,java.lang.String> options,
java.lang.String release) |
static FileSystem.Classpath |
getJrtClasspath(java.lang.String jdkHome,
java.lang.String encoding,
AccessRuleSet accessRuleSet,
java.util.Map<java.lang.String,java.lang.String> options) |
IModule |
getModule(char[] name)
Get the module with the given name, which must denote a named module.
|
IModule |
getModuleFromEnvironment(char[] name) |
char[][] |
getModulesDeclaringPackage(char[][] packageName,
char[] moduleName) |
static FileSystem.Classpath |
getOlderSystemRelease(java.lang.String jdkHome,
java.lang.String release,
AccessRuleSet accessRuleSet) |
boolean |
hasCompilationUnit(char[][] qualifiedPackageName,
char[] moduleName,
boolean checkCUs)
Answer whether the given package (within the given module) contains any compilation unit.
|
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). |
void |
scanForModules(Parser parser)
TESTS ONLY
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfindType, findType, getUniqueModulesDeclaringPackage, isPackagepublic static java.util.ArrayList<FileSystem.Classpath> EMPTY_CLASSPATH
protected FileSystem.Classpath[] classpaths
public IModule module
protected boolean annotationsFromClasspath
protected java.util.Map<java.lang.String,FileSystem.Classpath> moduleLocations
public FileSystem(java.lang.String[] classpathNames,
java.lang.String[] initialFileNames,
java.lang.String encoding,
int mode,
java.lang.String release)
public FileSystem(java.lang.String[] classpathNames,
java.lang.String[] initialFileNames,
java.lang.String encoding,
java.util.Collection<java.lang.String> limitModules,
int mode,
java.lang.String release)
public FileSystem(FileSystem.Classpath[] paths, java.lang.String[] initialFileNames, boolean annotationsFromClasspath, java.util.Set<java.lang.String> limitedModules)
protected FileSystem(FileSystem.Classpath[] paths, java.lang.String[] initialFileNames, boolean annotationsFromClasspath)
public static FileSystem.Classpath getClasspath(java.lang.String classpathName, java.lang.String encoding, AccessRuleSet accessRuleSet)
public static FileSystem.Classpath getClasspath(java.lang.String classpathName, java.lang.String encoding, AccessRuleSet accessRuleSet, java.util.Map<java.lang.String,java.lang.String> options, java.lang.String release)
public static FileSystem.Classpath getJrtClasspath(java.lang.String jdkHome, java.lang.String encoding, AccessRuleSet accessRuleSet, java.util.Map<java.lang.String,java.lang.String> options)
public static FileSystem.Classpath getClasspath(java.lang.String classpathName, java.lang.String encoding, AccessRuleSet accessRuleSet, int mode, java.lang.String release)
public static FileSystem.Classpath getClasspath(java.lang.String classpathName, java.lang.String encoding, AccessRuleSet accessRuleSet, java.util.Map options, int mode, java.lang.String release)
public static FileSystem.Classpath getOlderSystemRelease(java.lang.String jdkHome, java.lang.String release, AccessRuleSet accessRuleSet)
public static FileSystem.Classpath getClasspath(java.lang.String classpathName, java.lang.String encoding, boolean isSourceOnly, AccessRuleSet accessRuleSet, java.lang.String destinationPath, java.util.Map<java.lang.String,java.lang.String> options, java.lang.String release)
public static FileSystem.Classpath getClasspath(java.lang.String classpathName, java.lang.String encoding, int mode, AccessRuleSet accessRuleSet, java.lang.String destinationPath, java.util.Map<java.lang.String,java.lang.String> options, java.lang.String release)
public void scanForModules(Parser parser)
public void cleanup()
INameEnvironmentcleanup in interface INameEnvironmentpublic NameEnvironmentAnswer findType(char[][] compoundName, char[] moduleName)
findType in interface IModuleAwareNameEnvironmentpublic char[][][] findTypeNames(char[][] packageName)
public 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 IModule getModule(char[] name)
IModuleAwareNameEnvironmentgetModule in interface IModuleAwareNameEnvironmentpublic IModule getModuleFromEnvironment(char[] name)
public char[][] getAllAutomaticModules()
getAllAutomaticModules in interface IModuleAwareNameEnvironmentpublic char[][] listPackages(char[] moduleName)
IModuleAwareNameEnvironmentIModuleAwareNameEnvironment.LookupStrategy.Named).listPackages 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