public class ClasspathJrt extends ClasspathLocation implements IMultiModuleEntry
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<java.lang.String> |
annotationPaths |
protected java.util.zip.ZipFile |
annotationZipFile |
protected boolean |
closeZipFileAtEnd |
java.io.File |
file |
java.util.Set<java.lang.String> |
moduleNamesCache |
protected static java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,IModule>> |
ModulesCache |
accessRuleSet, BINARY, destinationPath, SOURCEEXTENSION_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 |
|---|
ClasspathJrt(java.io.File file,
boolean closeZipFileAtEnd,
AccessRuleSet accessRuleSet,
java.lang.String destinationPath) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addTypeName(java.util.ArrayList answers,
java.lang.String fileName,
int last,
char[] packageName) |
protected <T> java.util.List<java.lang.String> |
allModules(java.lang.Iterable<T> allSystemModules,
java.util.function.Function<T,java.lang.String> getModuleName,
java.util.function.Function<T,IModule> getModule) |
java.util.List |
fetchLinkedJars(FileSystem.ClasspathSectionProblemReporter problemReporter)
Return a list of the jar file names defined in the Class-Path section
of the jar file manifest if any, null else.
|
NameEnvironmentAnswer |
findClass(char[] typeName,
java.lang.String qualifiedPackageName,
java.lang.String moduleName,
java.lang.String qualifiedBinaryFileName) |
NameEnvironmentAnswer |
findClass(char[] typeName,
java.lang.String qualifiedPackageName,
java.lang.String moduleName,
java.lang.String qualifiedBinaryFileName,
boolean asBinaryOnly) |
char[][][] |
findTypeNames(java.lang.String qualifiedPackageName,
java.lang.String moduleName) |
int |
getMode() |
IModule |
getModule(char[] moduleName)
Get the module named name that this entry contributes to the module path
|
java.util.Collection<java.lang.String> |
getModuleNames(java.util.Collection<java.lang.String> limitModule,
java.util.function.Function<java.lang.String,IModule> getModule) |
char[][] |
getModulesDeclaringPackage(java.lang.String qualifiedPackageName,
java.lang.String moduleName)
Answer the relevant modules that declare the given package.
|
java.lang.String |
getPath()
Return the path for file based classpath entries.
|
boolean |
hasAnnotationFileFor(java.lang.String qualifiedTypeName)
Can the current location provide an external annotation file for the given type?
|
boolean |
hasCompilationUnit(java.lang.String qualifiedPackageName,
java.lang.String moduleName)
Answer whether the given package has any compilation unit (.java or .class) in the given module.
|
boolean |
hasModule() |
void |
initialize()
Initialize the entry
|
void |
loadModules() |
char[] |
normalizedPath()
Return a normalized path for file based classpath entries.
|
void |
reset()
This method resets the environment.
|
boolean |
servesModule(char[] moduleName)
Indicates whether this entry knows the module named name and can answer queries regarding the module
|
java.lang.String |
toString() |
acceptModule, equals, fetchAccessRestriction, getDestinationPath, getModuleNames, hashCode, isAutomaticModule, isPackage, selectModules, singletonModuleNameIfclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetModuleNamesgetModule, isAutomaticModule, listPackageshasCUDeclaringPackagepublic java.io.File file
protected java.util.zip.ZipFile annotationZipFile
protected boolean closeZipFileAtEnd
protected static java.util.HashMap<java.lang.String,java.util.Map<java.lang.String,IModule>> ModulesCache
public final java.util.Set<java.lang.String> moduleNamesCache
protected java.util.List<java.lang.String> annotationPaths
public ClasspathJrt(java.io.File file,
boolean closeZipFileAtEnd,
AccessRuleSet accessRuleSet,
java.lang.String destinationPath)
public java.util.List fetchLinkedJars(FileSystem.ClasspathSectionProblemReporter problemReporter)
FileSystem.ClasspathfetchLinkedJars in interface FileSystem.ClasspathproblemReporter - problem reporter with which potential
misconfiguration issues are raisedpublic char[][] getModulesDeclaringPackage(java.lang.String qualifiedPackageName,
java.lang.String moduleName)
IModulePathEntrygetModulesDeclaringPackage in interface IModulePathEntrypublic boolean hasCompilationUnit(java.lang.String qualifiedPackageName,
java.lang.String moduleName)
IModulePathEntryhasCompilationUnit in interface IModulePathEntryqualifiedPackageName - '/'-separated package namemoduleName - if non-null only CUs attached to the given module should be consideredpublic NameEnvironmentAnswer findClass(char[] typeName, java.lang.String qualifiedPackageName, java.lang.String moduleName, java.lang.String qualifiedBinaryFileName)
findClass in interface FileSystem.Classpathpublic NameEnvironmentAnswer findClass(char[] typeName, java.lang.String qualifiedPackageName, java.lang.String moduleName, java.lang.String qualifiedBinaryFileName, boolean asBinaryOnly)
findClass in interface FileSystem.Classpathpublic boolean hasAnnotationFileFor(java.lang.String qualifiedTypeName)
FileSystem.ClasspathhasAnnotationFileFor in interface FileSystem.ClasspathqualifiedTypeName - type name in qualified /-separated notation.public char[][][] findTypeNames(java.lang.String qualifiedPackageName,
java.lang.String moduleName)
findTypeNames in interface FileSystem.Classpathprotected void addTypeName(java.util.ArrayList answers,
java.lang.String fileName,
int last,
char[] packageName)
public void initialize()
throws java.io.IOException
FileSystem.Classpathinitialize in interface FileSystem.Classpathjava.io.IOExceptionpublic void loadModules()
public java.util.Collection<java.lang.String> getModuleNames(java.util.Collection<java.lang.String> limitModule,
java.util.function.Function<java.lang.String,IModule> getModule)
getModuleNames in interface FileSystem.ClasspathgetModuleNames in class ClasspathLocationprotected <T> java.util.List<java.lang.String> allModules(java.lang.Iterable<T> allSystemModules,
java.util.function.Function<T,java.lang.String> getModuleName,
java.util.function.Function<T,IModule> getModule)
allModules in class ClasspathLocationpublic void reset()
FileSystem.Classpathreset in interface FileSystem.Classpathreset in class ClasspathLocationpublic java.lang.String toString()
toString in class java.lang.Objectpublic char[] normalizedPath()
FileSystem.ClasspathnormalizedPath in interface FileSystem.Classpathpublic java.lang.String getPath()
FileSystem.ClasspathgetPath in interface FileSystem.ClasspathgetPath in class ClasspathLocationpublic int getMode()
getMode in class ClasspathLocationpublic boolean hasModule()
hasModule in interface FileSystem.Classpathpublic IModule getModule(char[] moduleName)
IMultiModuleEntrygetModule in interface IModulePathEntrygetModule in interface IMultiModuleEntrymoduleName - - The name of the module to look uppublic boolean servesModule(char[] moduleName)
IModulePathEntryservesModule in interface IModulePathEntrymoduleName - The name of the module