Package gw.internal.gosu.module
Class Module
java.lang.Object
gw.internal.gosu.module.Module
- All Implemented Interfaces:
IModule
- Direct Known Subclasses:
GlobalModule,JreModule
-
Field Summary
Fields inherited from interface gw.lang.reflect.module.IModule
CONFIG_RESOURCE_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidconfigurePaths(List<IDirectory> classpath, List<IDirectory> sourcePaths, List<IDirectory> backingSourcePaths) Configure both source and Java classpaths of the module in a semi-automated way.protected voidprotected voidprotected voidvoidbooleanprotected List<IDirectory> final IExecutionEnvironmentGet class loader, associated with this module.final 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.inthashCode()voidprotected voidvoidvoidsetBackingSourcePath(List<IDirectory> backingSourcePath) voidsetDependencies(List<Dependency> newDeps) voidsetExcludedPaths(List<IDirectory> paths) voidsetJavaClassPath(List<IDirectory> classpath) voidsetModuleTypeLoader(ModuleTypeLoader modTypeLoader) voidvoidsetNativeModule(INativeModule nativeModule) voidsetSourcePath(List<IDirectory> sourcePaths) toString()protected voidMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface gw.lang.reflect.module.IModule
configurePaths
-
Constructor Details
-
Module
-
-
Method Details
-
getExecutionEnvironment
- Specified by:
getExecutionEnvironmentin interfaceIModule
-
getFileRepository
- Specified by:
getFileRepositoryin interfaceIModule
-
setDependencies
- Specified by:
setDependenciesin interfaceIModule
-
getDependencies
- Specified by:
getDependenciesin interfaceIModule- Returns:
- A list of dependencies for this module. The list may contain both libraries and other modules. The dependency graph must not have cycles.
-
addDependency
- Specified by:
addDependencyin interfaceIModule
-
removeDependency
- Specified by:
removeDependencyin interfaceIModule
-
getSourcePath
- Specified by:
getSourcePathin interfaceIModule- Returns:
- The path[s] having source files that should be exposed to this module.
-
setSourcePath
- Specified by:
setSourcePathin interfaceIModule
-
getExcludedPaths
- Specified by:
getExcludedPathsin interfaceIModule
-
setExcludedPaths
- Specified by:
setExcludedPathsin interfaceIModule
-
getModuleClassLoader
Description copied from interface:IModuleGet class loader, associated with this module.- Specified by:
getModuleClassLoaderin interfaceIModule- Returns:
-
disposeLoader
public void disposeLoader()- Specified by:
disposeLoaderin interfaceIModule
-
getOutputPath
- Specified by:
getOutputPathin interfaceIModule
-
getModuleTypeLoader
- Specified by:
getModuleTypeLoaderin interfaceIModule
-
setModuleTypeLoader
-
configurePaths
public void configurePaths(List<IDirectory> classpath, List<IDirectory> sourcePaths, List<IDirectory> backingSourcePaths) Description copied from interface:IModuleConfigure 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.- Specified by:
configurePathsin interfaceIModule- 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)
-
getJavaClassPath
- Specified by:
getJavaClassPathin interfaceIModule
-
setJavaClassPath
- Specified by:
setJavaClassPathin interfaceIModule
-
getBackingSourcePath
- Specified by:
getBackingSourcePathin interfaceIModule
-
setBackingSourcePath
- Specified by:
setBackingSourcePathin interfaceIModule
-
toString
-
getNativeModule
- Specified by:
getNativeModulein interfaceIModule- 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
- Specified by:
setNativeModulein interfaceIModule
-
initializeTypeLoaders
public void initializeTypeLoaders() -
createExtensionTypeLoaders
protected void createExtensionTypeLoaders() -
createExtensionTypeloadersImpl
protected void createExtensionTypeloadersImpl() -
createStandardTypeLoaders
protected void createStandardTypeLoaders() -
maybeCreateModuleTypeLoader
protected void maybeCreateModuleTypeLoader() -
getModuleTraversalList
- Specified by:
getModuleTraversalListin interfaceIModule
-
traverse
-
getTypeLoaders
Description copied from interface:IModuleReturns typeloaders of the given class that are local to this module as well as such typeloaders from dependent modules.- Specified by:
getTypeLoadersin interfaceIModule- Type Parameters:
T-- Parameters:
typeLoaderClass-- Returns:
-
equals
-
hashCode
public int hashCode() -
getName
-
setName
-
getAdditionalSourceRoots
-