Interface IModule

    • Field Detail

      • CONFIG_RESOURCE_PREFIX

        static final java.lang.String CONFIG_RESOURCE_PREFIX
        See Also:
        Constant Field Values
    • Method Detail

      • getName

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

        void setName​(java.lang.String name)
      • getDependencies

        java.util.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​(java.util.List<Dependency> newDeps)
      • addDependency

        void addDependency​(Dependency dependency)
      • removeDependency

        void removeDependency​(Dependency d)
      • getSourcePath

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

        void setSourcePath​(java.util.List<IDirectory> path)
      • getJavaClassPath

        java.util.List<IDirectory> getJavaClassPath()
      • setJavaClassPath

        void setJavaClassPath​(java.util.List<IDirectory> paths)
      • getBackingSourcePath

        java.util.List<IDirectory> getBackingSourcePath()
      • setBackingSourcePath

        void setBackingSourcePath​(java.util.List<IDirectory> paths)
      • getExcludedPaths

        java.util.List<IDirectory> getExcludedPaths()
      • setExcludedPaths

        void setExcludedPaths​(java.util.List<IDirectory> paths)
      • configurePaths

        default void configurePaths​(java.util.List<IDirectory> classpath,
                                    java.util.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​(java.util.List<IDirectory> classpath,
                            java.util.List<IDirectory> sourcePaths,
                            java.util.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

        java.lang.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> java.util.List<? extends T> getTypeLoaders​(java.lang.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()
      • getModuleClassLoader

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

        void disposeLoader()