Package jetbrains.mps.project.facets
Interface JavaModuleFacet
- 
- All Superinterfaces:
 GenerationTargetFacet,SModuleFacet
- All Known Implementing Classes:
 JavaModuleFacetImpl,NaiveJavaModuleFacet
public interface JavaModuleFacet extends SModuleFacet, GenerationTargetFacet
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static StringFACET_TYPE 
- 
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Set<String>getAdditionalSourcePaths()IFilegetClassesGen()default IFilegetClassesLocation(SModel model)Set<String>getClassPath()Set<String>getLibraryClassPath()default IFilegetOutputCacheLocation(SModel model)E.g.default IFilegetOutputCacheRoot()PROVISIONAL, seegetOutputRoot()for details.default IFilegetOutputCacheRoot(SModel model)default IFilegetOutputLocation(SModel model)E.g.default IFilegetOutputRoot()PROVISIONAL Perhaps, worth moving toGenerationTargetFacet.default IFilegetOutputRoot(SModel model)XXX See javadoc for JavaModuleFacet#getOutputRoot().booleanisCompileInMps()- 
Methods inherited from interface org.jetbrains.mps.openapi.module.SModuleFacet
getFacetType, getModule, load, save 
 - 
 
 - 
 
- 
- 
Field Detail
- 
FACET_TYPE
static final String FACET_TYPE
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
isCompileInMps
boolean isCompileInMps()
 
- 
getClassesGen
@Nullable IFile getClassesGen()
- Returns:
 - root folder where generated classes of any module's model reside, or 
nullif associated module doesn't expect class files to be written. Note, although generated classes are part of classpath, this method is to access design-time location of generated classes, not that at deployment time. For deployed modules, this method may returnnull, while generated module classes would be available for classloading throughgetClassPath(). 
 
- 
getClassesLocation
@Nullable default IFile getClassesLocation(@NotNull SModel model)
- Parameters:
 model- model of a module this facet is associated with- Returns:
 - FS location where model class files reside, 
nullfor deployed modules 
 
- 
getOutputRoot
@Nullable default IFile getOutputRoot()
PROVISIONAL Perhaps, worth moving toGenerationTargetFacet. OTOH, don't see a reason to restrict output of the facet to single root Need one here for transition period to have default implementations forgetOutputLocation(SModel)andgetOutputCacheLocation(SModel)Perhaps, shall be private to JavaModuleFacetImpl (need to get rid of default implementations of the dependant methods first). Top location where all 'primary' output goes, generally bound to module location, although no assumption shall be made about that. Known assource_gen- Returns:
 nullif associated module doesn't allow generation.
 
- 
getOutputCacheRoot
@Nullable default IFile getOutputCacheRoot()
PROVISIONAL, seegetOutputRoot()for details. Top location where auxiliary (dependencies, hashes) output goes, generally bound to module's output location. Known assource_gen.caches- Returns:
 nullif associated module doesn't have sources/doesn't allow generation
 
- 
getOutputRoot
@Nullable default IFile getOutputRoot(@NotNull SModel model)
Description copied from interface:GenerationTargetFacetXXX See javadoc for JavaModuleFacet#getOutputRoot(). Perhaps, with the rise of textgen-controlled location, GTF shall tell root only and cease answering getOutputLocation()?- Specified by:
 getOutputRootin interfaceGenerationTargetFacet- Parameters:
 model- model of a module this facet is associated with- Returns:
 - FS location where generated files for the model go, same or ancestor of 
GenerationTargetFacet.getOutputLocation(SModel)value, ornullif this facet doesn't manage output of the model 
 
- 
getOutputCacheRoot
@Nullable default IFile getOutputCacheRoot(@NotNull SModel model)
- Specified by:
 getOutputCacheRootin interfaceGenerationTargetFacet- Parameters:
 model- model of a module this facet is associated with- Returns:
 - FS location where auxiliary generated model files go, same or ancestor of 
GenerationTargetFacet.getOutputCacheLocation(SModel)value, ornullif this facet doesn't manage output of the model 
 
- 
getOutputLocation
@Nullable default IFile getOutputLocation(@NotNull SModel model)
E.g. source_gen/qualified/model/name/ FIXME decide whether shall look into model output overrides (see DefaultStreamManager.Provider.getOverriddenOutputDir()). Didn't check for override right away as I don't like use of distinct boolean option isGenerateIntoModelFolder() to describe an output alternative, and would like to come up with a better alternative- Specified by:
 getOutputLocationin interfaceGenerationTargetFacet- Parameters:
 model- model of a module this facet is associated with- Returns:
 nullif this module doesn't allow generation (e.g. packaged)
 
- 
getOutputCacheLocation
@Nullable default IFile getOutputCacheLocation(@NotNull SModel model)
E.g. source_gen.caches/qualified/model/name/- Specified by:
 getOutputCacheLocationin interfaceGenerationTargetFacet- Parameters:
 model- model of a module this facet is associated with- Returns:
 nullif this module doesn't allow generation (e.g. packaged)
 
- 
getAdditionalSourcePaths
Set<String> getAdditionalSourcePaths()
- Returns:
 - extra locations with source files to compile along with module's own generated artifacts from 
getOutputRoot(), or empty collection. 
 
 - 
 
 -