Interface IModule

All Known Subinterfaces:
IGlobalModule, IJreModule
All Known Implementing Classes:
DefaultSingleModule, GlobalModule, JreModule, Module

public interface IModule
  • Field Details

  • Method Details

    • getExecutionEnvironment

      IExecutionEnvironment getExecutionEnvironment()
    • getOutputPath

      IDirectory getOutputPath()
    • getName

      String getName()
      Returns:
      A unique name relative to all other modules in a given execution environment.
    • setName

      void setName(String name)
    • getDependencies

      List<Dependency> getDependencies()
      Returns:
      A list of dependencies for this module. The list may contain both libraries and other modules. The dependency graph must not have cycles.
    • setDependencies

      void setDependencies(List<Dependency> newDeps)
    • addDependency

      void addDependency(Dependency dependency)
    • removeDependency

      void removeDependency(Dependency d)
    • getModuleTypeLoader

      ITypeLoaderStack getModuleTypeLoader()
    • getSourcePath

      List<IDirectory> getSourcePath()
      Returns:
      The path[s] having source files that should be exposed to this module.
    • setSourcePath

      void setSourcePath(List<IDirectory> path)
    • getJavaClassPath

      List<IDirectory> getJavaClassPath()
    • setJavaClassPath

      void setJavaClassPath(List<IDirectory> paths)
    • getBackingSourcePath

      List<IDirectory> getBackingSourcePath()
    • setBackingSourcePath

      void setBackingSourcePath(List<IDirectory> paths)
    • getExcludedPaths

      List<IDirectory> getExcludedPaths()
    • setExcludedPaths

      void setExcludedPaths(List<IDirectory> paths)
    • configurePaths

      default void configurePaths(List<IDirectory> classpath, List<IDirectory> sourcePaths)
      Configure both source and Java classpaths of the module in a semi-automated way. First parameter is Java classpath. Second parameter is extended with all paths from Java classpath that are marked to have Gosu "sources" (through MANIFEST.MF with Contains-Sources header) and used as Gosu source path.
      Parameters:
      classpath - path to types not directly in the module's sources e.g., jar files containing .class files and other types/resources
      sourcePaths - path to the sources directly defined in this module; sources in this path are statically compiled as part of this module's build target e.g., ./src directories
    • configurePaths

      void configurePaths(List<IDirectory> classpath, List<IDirectory> sourcePaths, List<IDirectory> backingSourcePaths)
      Configure both source and Java classpaths of the module in a semi-automated way. First parameter is Java classpath. Second parameter is extended with all paths from Java classpath that are marked to have Gosu "sources" (through MANIFEST.MF with Contains-Sources header) and used as Gosu source path.
      Parameters:
      classpath - path to types not directly in the module's sources e.g., jar files containing .class files and other types/resources
      sourcePaths - path to the sources directly defined in this module; sources in this path are statically compiled as part of this module's build target e.g., ./src directories
      backingSourcePaths - path to sources corresponding with the classpath parameter (intended for IDE use)
    • getNativeModule

      Object getNativeModule()
      Returns:
      The module/project from the execution environment that corresponds with this logical module. For example, in Eclipse the native module is of type IJavaProject.
    • setNativeModule

      void setNativeModule(INativeModule nativeModule)
    • getTypeLoaders

      <T extends ITypeLoader> List<? extends T> getTypeLoaders(Class<T> typeLoaderClass)
      Returns typeloaders of the given class that are local to this module as well as such typeloaders from dependent modules.
      Type Parameters:
      T -
      Parameters:
      typeLoaderClass -
      Returns:
    • getModuleTraversalList

      IModule[] getModuleTraversalList()
    • getFileRepository

      IFileSystemGosuClassRepository getFileRepository()
    • getModuleClassLoader

      ClassLoader getModuleClassLoader()
      Get class loader, associated with this module.
      Returns:
    • disposeLoader

      void disposeLoader()