Package jetbrains.mps.smodel.tempmodel
Class NaiveJavaModuleFacet
- java.lang.Object
 - 
- jetbrains.mps.smodel.tempmodel.NaiveJavaModuleFacet
 
 
- 
- All Implemented Interfaces:
 GenerationTargetFacet,JavaModuleFacet,SModuleFacet
public final class NaiveJavaModuleFacet extends Object implements JavaModuleFacet
A simple java facet provided with two locations of source_gen and classes_gen Created by apyshkin on 12/7/17. 
- 
- 
Field Summary
- 
Fields inherited from interface jetbrains.mps.project.facets.JavaModuleFacet
FACET_TYPE 
 - 
 
- 
Constructor Summary
Constructors Constructor Description NaiveJavaModuleFacet(AbstractModule owningModule, String sourceGen, String classesGen) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>getAdditionalSourcePaths()IFilegetClassesGen()Set<String>getClassPath()StringgetFacetType()Identity of the facet, seeFacetsFacade.getFacetFactory(String)Set<String>getLibraryClassPath()SModulegetModule()The owning module TODO @deprecated facet is supposed to be a simple primitive flags storage.IFilegetOutputRoot()PROVISIONAL Perhaps, worth moving toGenerationTargetFacet.booleanisCompileInMps()voidload(Memento memento)Allows the model root to read its previously saved configuration informationvoidsave(Memento memento)Gives the module facet the opportunity to persist into the supplied memento whatever configuration information may be needed to restore the models in the future.- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface jetbrains.mps.project.facets.JavaModuleFacet
getClassesLocation, getOutputCacheLocation, getOutputCacheRoot, getOutputCacheRoot, getOutputLocation, getOutputRoot 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getFacetType
@NotNull public String getFacetType()
Description copied from interface:SModuleFacetIdentity of the facet, seeFacetsFacade.getFacetFactory(String)- Specified by:
 getFacetTypein interfaceSModuleFacet- Returns:
 - kind of the facet
 
 
- 
isCompileInMps
public boolean isCompileInMps()
- Specified by:
 isCompileInMpsin interfaceJavaModuleFacet
 
- 
getOutputRoot
@Nullable public IFile getOutputRoot()
Description copied from interface:JavaModuleFacetPROVISIONAL 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 forJavaModuleFacet.getOutputLocation(SModel)andJavaModuleFacet.getOutputCacheLocation(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- Specified by:
 getOutputRootin interfaceJavaModuleFacet- Returns:
 nullif associated module doesn't allow generation.
 
- 
getClassesGen
@NotNull public IFile getClassesGen()
- Specified by:
 getClassesGenin interfaceJavaModuleFacet- 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 throughJavaModuleFacet.getClassPath(). 
 
- 
getLibraryClassPath
public Set<String> getLibraryClassPath()
- Specified by:
 getLibraryClassPathin interfaceJavaModuleFacet
 
- 
getClassPath
public Set<String> getClassPath()
- Specified by:
 getClassPathin interfaceJavaModuleFacet
 
- 
getAdditionalSourcePaths
public Set<String> getAdditionalSourcePaths()
- Specified by:
 getAdditionalSourcePathsin interfaceJavaModuleFacet- Returns:
 - extra locations with source files to compile along with module's own generated artifacts from 
JavaModuleFacet.getOutputRoot(), or empty collection. 
 
- 
getModule
@NotNull public SModule getModule()
Description copied from interface:SModuleFacetThe owning module TODO @deprecated facet is supposed to be a simple primitive flags storage. To extend module functionality one has two more ways: TODO extend from one of the SModule subclasses or implement a custom aspect- Specified by:
 getModulein interfaceSModuleFacet
 
- 
save
public void save(Memento memento)
Description copied from interface:SModuleFacetGives the module facet the opportunity to persist into the supplied memento whatever configuration information may be needed to restore the models in the future.- Specified by:
 savein interfaceSModuleFacet
 
- 
load
public void load(Memento memento)
Description copied from interface:SModuleFacetAllows the model root to read its previously saved configuration information- Specified by:
 loadin interfaceSModuleFacet
 
 - 
 
 -