Interface IModule
- All Known Implementing Classes:
DefaultSingleModule, SimpleModule
public interface IModule
Java projects are typically organized according to a hierarchy of modules where each module defines
packages of Java classes and resources and other modules on which it depends.
IModule abstracts
this concept as a set of paths defining source, class, and output locations, a list of dependencies on
other modules, and the set of ITypeManifolds managed by the module.
The use of modules for the purposes of the Manifold API is mostly applicable to IDE integration such
as with the IntelliJ plugin.
Otherwise, because compilation is not intermodular and because runtime is flattened, modules consist
of a single "default" module.-
Method Summary
Modifier and TypeMethodDescriptiondefault Set<ITypeManifold> default Set<ITypeManifold> findTypeManifoldsFor(String fqn, Predicate<ITypeManifold> predicate) Finds the set of type manifolds that contribute toward the definition of a given type.default Set<ITypeManifold> findTypeManifoldsFor(IFile file) default Set<ITypeManifold> findTypeManifoldsFor(IFile file, Predicate<ITypeManifold> predicate) Finds the set of type manifolds that handle a given resource file.default IFileSystemgetHost()getName()The path[s] having source files that should be exposed to this module.default Comparator<ITypeManifold> Supplemental type manifolds must follow others, this is so that a Supplemental manifold in response to changes can be sure that side effects stemming from Primary or Partial manifolds are deterministic and complete beforehand.default voidloadRegistered(Set<ITypeManifold> tms) default SortedSet<ITypeManifold> Loads, but does not initialize, all type manifolds managed by this module.produceFile(String fqn, JavaFileManager.Location location, DiagnosticListener<JavaFileObject> errorHandler)
-
Method Details
-
getHost
IManifoldHost getHost() -
getName
String getName() -
getSourcePath
List<IDirectory> getSourcePath()The path[s] having source files that should be exposed to this module. -
getJavaClassPath
List<IDirectory> getJavaClassPath() -
getOutputPath
List<IDirectory> getOutputPath() -
getExcludedPath
IDirectory[] getExcludedPath() -
getCollectiveSourcePath
List<IDirectory> getCollectiveSourcePath() -
getCollectiveJavaClassPath
List<IDirectory> getCollectiveJavaClassPath() -
getFileSystem
-
getDependencies
List<Dependency> getDependencies()- Returns:
- A list of dependency modules. The dependency graph must not have cycles.
-
getPathCache
PathCache getPathCache() -
getTypeManifolds
Set<ITypeManifold> getTypeManifolds() -
produceFile
JavaFileObject produceFile(String fqn, JavaFileManager.Location location, DiagnosticListener<JavaFileObject> errorHandler) -
findTypeManifoldsFor
-
findTypeManifoldsFor
Finds the set of type manifolds that contribute toward the definition of a given type.- Parameters:
fqn- A fully qualified type namepredicate- A predicate to filter the set of type manifolds available- Returns:
- The set of type manifolds that contribute toward the definition of
fqn
-
findTypeManifoldsFor
-
findTypeManifoldsFor
Finds the set of type manifolds that handle a given resource file.- Parameters:
file- A resource filepredicate- A predicate to filter the set of type manifolds available- Returns:
- The set of type manifolds that handle
file
-
loadTypeManifolds
Loads, but does not initialize, all type manifolds managed by this module.- Returns:
- The complete set of type manifolds this module manages.
-
getTypeManifoldSorter
Supplemental type manifolds must follow others, this is so that a Supplemental manifold in response to changes can be sure that side effects stemming from Primary or Partial manifolds are deterministic and complete beforehand. Implementors must maintain this as the primary sort. -
getExcludedTypeManifolds
-
loadRegistered
-