Package manifold.api.host
Interface IModule
-
- All Known Implementing Classes:
DefaultSingleModule,SimpleModule
public interface IModuleJava 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.IModuleabstracts this concept as a set of paths defining source, class, and output locations, a list of dependencies on other modules, and the set ofITypeManifolds 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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Set<ITypeManifold>findTypeManifoldsFor(String fqn)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.List<IDirectory>getCollectiveJavaClassPath()List<IDirectory>getCollectiveSourcePath()List<Dependency>getDependencies()IDirectory[]getExcludedPath()default List<String>getExcludedTypeManifolds()default IFileSystemgetFileSystem()IManifoldHostgetHost()List<IDirectory>getJavaClassPath()StringgetName()List<IDirectory>getOutputPath()PathCachegetPathCache()List<IDirectory>getSourcePath()The path[s] having source files that should be exposed to this module.Set<ITypeManifold>getTypeManifolds()default Comparator<ITypeManifold>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.default voidloadRegistered(Set<ITypeManifold> tms)default SortedSet<ITypeManifold>loadTypeManifolds()Loads, but does not initialize, all type manifolds managed by this module.JavaFileObjectproduceFile(String fqn, JavaFileManager.Location location, DiagnosticListener<JavaFileObject> errorHandler)
-
-
-
Method Detail
-
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
default IFileSystem 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
default Set<ITypeManifold> findTypeManifoldsFor(String fqn)
-
findTypeManifoldsFor
default Set<ITypeManifold> findTypeManifoldsFor(String fqn, Predicate<ITypeManifold> predicate)
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
default Set<ITypeManifold> findTypeManifoldsFor(IFile file)
-
findTypeManifoldsFor
default Set<ITypeManifold> findTypeManifoldsFor(IFile file, Predicate<ITypeManifold> predicate)
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
default SortedSet<ITypeManifold> loadTypeManifolds()
Loads, but does not initialize, all type manifolds managed by this module.- Returns:
- The complete set of type manifolds this module manages.
-
getTypeManifoldSorter
default Comparator<ITypeManifold> 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.
-
loadRegistered
default void loadRegistered(Set<ITypeManifold> tms)
-
-