Class BinaryModuleFactory
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.java.model.BinaryModuleFactory
FIXME: this class is a stub as of now, it does not support modules in the new index.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BinaryModuleDescriptor
createDescriptor
(ModularClassFile modularClassFile) static IBinaryModule
rawReadModule
(BinaryModuleDescriptor descriptor, boolean fullyInitialize) static IBinaryModule
rawReadModuleTestForExists
(BinaryModuleDescriptor descriptor, boolean fullyInitialize, boolean useInvalidArchiveCache) Read the class file from disk, circumventing the index's cache.static IBinaryModule
readModule
(BinaryModuleDescriptor descriptor, org.eclipse.core.runtime.IProgressMonitor monitor) Reads the given binary module.
-
Constructor Details
-
BinaryModuleFactory
public BinaryModuleFactory()
-
-
Method Details
-
createDescriptor
-
readModule
public static IBinaryModule readModule(BinaryModuleDescriptor descriptor, org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException, ClassFormatException Reads the given binary module. If the module can be found in the index with a fingerprint that exactly matches the file on disk, the type is read from the index. Otherwise the type is read from disk. Returns null if no such type exists. caveat modules are not yet supported in the index. -
rawReadModule
public static IBinaryModule rawReadModule(BinaryModuleDescriptor descriptor, boolean fullyInitialize) throws JavaModelException, ClassFormatException -
rawReadModuleTestForExists
public static IBinaryModule rawReadModuleTestForExists(BinaryModuleDescriptor descriptor, boolean fullyInitialize, boolean useInvalidArchiveCache) throws JavaModelException, ClassFormatException, FileNotFoundException Read the class file from disk, circumventing the index's cache. This should only be used by callers that need to read information from the class file which aren't present in the index (such as method bodies).- Returns:
- the newly-created IBinaryModule or null if the given class file does not exist.
- Throws:
ClassFormatException
- if the class file existed but was corruptJavaModelException
- if unable to read the class file due to a transient failureFileNotFoundException
- if the file does not exist
-