Package gw.lang.reflect.module
Interface IModule
- All Known Subinterfaces:
IGlobalModule
,IJreModule
- All Known Implementing Classes:
DefaultSingleModule
,GlobalModule
,JreModule
,Module
public interface IModule
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDependency
(Dependency dependency) default void
configurePaths
(List<IDirectory> classpath, List<IDirectory> sourcePaths) Configure both source and Java classpaths of the module in a semi-automated way.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.void
Get class loader, associated with this module.IModule[]
getName()
<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.void
void
setBackingSourcePath
(List<IDirectory> paths) void
setDependencies
(List<Dependency> newDeps) void
setExcludedPaths
(List<IDirectory> paths) void
setJavaClassPath
(List<IDirectory> paths) void
void
setNativeModule
(INativeModule nativeModule) void
setSourcePath
(List<IDirectory> path)
-
Field Details
-
CONFIG_RESOURCE_PREFIX
- See Also:
-
-
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
-
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
-
addDependency
-
removeDependency
-
getModuleTypeLoader
ITypeLoaderStack getModuleTypeLoader() -
getSourcePath
List<IDirectory> getSourcePath()- Returns:
- The path[s] having source files that should be exposed to this module.
-
setSourcePath
-
getJavaClassPath
List<IDirectory> getJavaClassPath() -
setJavaClassPath
-
getBackingSourcePath
List<IDirectory> getBackingSourcePath() -
setBackingSourcePath
-
getExcludedPaths
List<IDirectory> getExcludedPaths() -
setExcludedPaths
-
configurePaths
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/resourcessourcePaths
- 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/resourcessourcePaths
- 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 directoriesbackingSourcePaths
- 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
-
getTypeLoaders
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()
-