Class DeploymentDescriptor
- java.lang.Object
 - 
- jetbrains.mps.project.structure.modules.ModuleDescriptor
 - 
- jetbrains.mps.project.structure.modules.DeploymentDescriptor
 
 
 
- 
- All Implemented Interfaces:
 Copyable<ModuleDescriptor>,CopyableDescriptor<ModuleDescriptor>
public class DeploymentDescriptor extends ModuleDescriptor
The descriptor handle which corresponds to the already deployed module (not a project one). Contains additionally (strangely enough we extend ModuleDescriptor) to the default persisted properties in the ModuleDescriptor several properties. This type of descriptor currently makes sense only for languages (for the time being) in the light of separating the packaged modules into executable and sources parts. Common packaging for a language 'myLang' incorporates 'myLang.jar' and 'myLang-src.jar' See the common layout of the module descriptor files below: -------------------------------------------- lang-dir/myLang.jar/META-INF/MANIFEST.MF lang-dir/myLang.jar/META-INF/module.xml lang-dir/myLang.jar/<...> lang-dir/myLang-src.jar/module/myLang.mpl lang-dir/myLang-src.jar/<...> -------------------------------------------- Here the source descriptor is 'myLang.mpl' and the executable (deployed) descriptor is 'module.xml'TODO merge javadoc from above with doc below:
Layout of deployed module: Jar: module.jar/ META-INF/module.xml resources/ classes/my/package/One.class or my/package/One.class my/package/msg.properties aux-library.jar Folder: module-dir/ META-INF/module.xml resources/my/package/msg.properties classes/my/package/One.class module.jar and module-dir are referred to as 'module home'- See Also:
 AP
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static StringTYPE_GENERATORstatic StringTYPE_LANGUAGEstatic StringTYPE_SOLUTION 
- 
Constructor Summary
Constructors Constructor Description DeploymentDescriptor() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeploymentDescriptorcopy()List<String>getClasspath()Locations with module's own classes, relative to module home.StringgetDescriptorFile()protected intgetHeaderMarker()List<String>getLibraries()Deployed modules may expose own class files, as well as redistribute (or reuse redistributed otherwise) jar libraries required for their operation.StringgetSourcesJar()StringgetType()voidload(ModelInputStream stream)voidsave(ModelOutputStream stream)voidsetDescriptorFile(String descriptorFile)voidsetSourcesJar(String sourcesJar)voidsetType(String type)- 
Methods inherited from class jetbrains.mps.project.structure.modules.ModuleDescriptor
addFacetDescriptor, copy0, getAdditionalJavaStubPaths, getCompileInMPS, getDependencies, getDependencyVersions, getDeploymentDescriptor, getId, getLanguageVersions, getLoadException, getModelRootDescriptors, getModuleFacetDescriptors, getModuleReference, getModuleVersion, getNamespace, getSourcePaths, getTimestamp, getUsedDevkits, getUsedLanguages, hasDependencyVersions, hasLanguageVersions, isUseTransientOutput, needsExternalIdeaCompile, removeFacetDescriptor, setDeploymentDescriptor, setHasDependencyVersions, setHasLanguageVersions, setId, setLoadException, setModuleVersion, setNamespace, setNeedsExternalIdeaCompile, setTimestamp, setUseTransientOutput, updateFacetDescriptor, updateModelRefs, updateModuleRefs 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getSourcesJar
public final String getSourcesJar()
 
- 
setSourcesJar
public final void setSourcesJar(String sourcesJar)
 
- 
getDescriptorFile
public final String getDescriptorFile()
 
- 
setDescriptorFile
public final void setDescriptorFile(String descriptorFile)
 
- 
getType
public final String getType()
 
- 
setType
public final void setType(String type)
 
- 
getLibraries
@NotNull public final List<String> getLibraries()
Deployed modules may expose own class files, as well as redistribute (or reuse redistributed otherwise) jar libraries required for their operation. Library location starting with "/" indicates distribution-relative path, any other location is relative to distributed module home (which is either parent directory of a .jar file, if module distributed as a jar, or directory with META-INF/ if module isn't in a jar).- Returns:
 - collection of jar files, as written in the deployment descriptor (with no path unwrap/expand done).
 
 
- 
getClasspath
@NotNull public List<String> getClasspath()
Locations with module's own classes, relative to module home. Value "." indicates module home itself. Empty value means there are no classes in the module (however, classes still could be loaded throughlibraries). XXX not sure whether we shall keep libraries and classpath distinct, perhaps, one is enough (provided ModulesMiner#loadDeploymentDescriptor doesn't expose libraries as stubs)- Returns:
 - Locations with module's own classes
 
 
- 
getHeaderMarker
protected int getHeaderMarker()
- Overrides:
 getHeaderMarkerin classModuleDescriptor
 
- 
save
public void save(ModelOutputStream stream) throws IOException
- Overrides:
 savein classModuleDescriptor- Throws:
 IOException
 
- 
load
public void load(ModelInputStream stream) throws IOException
- Overrides:
 loadin classModuleDescriptor- Throws:
 IOException
 
- 
copy
@NotNull public DeploymentDescriptor copy()
- Specified by:
 copyin interfaceCopyable<ModuleDescriptor>- Overrides:
 copyin classModuleDescriptor- Returns:
 - full deep-copy of the T instance
 
 
 - 
 
 -