Package jetbrains.mps.smodel
Class SModelReference
- java.lang.Object
 - 
- jetbrains.mps.smodel.SModelReference
 
 
- 
- All Implemented Interfaces:
 SModelReference
public final class SModelReference extends Object implements SModelReference
 
- 
- 
Field Summary
Fields Modifier and Type Field Description SModuleReferencemyModuleReference 
- 
Constructor Summary
Constructors Constructor Description SModelReference(SModuleReference module, SModelId modelId, String modelName)Use of this constructor is discouraged, favorSModelReference(SModuleReference, SModelId, SModelName)insteadSModelReference(SModuleReference module, SModelId modelId, SModelName modelName) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleandiffers(SModelReference ref1, SModelReference ref2)booleanequals(Object o)SModelIdgetModelId()Retrieves an identifier, which is unique within a module.StringgetModelName()The returned name of the model may include a stereotype, such as 'generator' or 'tests', separated by the '@' character, e.g.SModuleReferencegetModuleReference()Returns module reference when it is a part of this model reference and is available, or null otherwise.SModelNamegetName()inthashCode()static SModelReferenceparseReference(String s)Deprecated.This code shall move to private method of PersistenceRegistry, which would dispatch to proper registered factories.static Pair<Pair<SModuleId,String>,Pair<SModelId,String>>parseReference_internal(String s)SModelresolve(SRepository repo)Resolves the model from within the given repositoryStringtoString() 
 - 
 
- 
- 
Field Detail
- 
myModuleReference
@Nullable public final SModuleReference myModuleReference
 
 - 
 
- 
Constructor Detail
- 
SModelReference
public SModelReference(@Nullable SModuleReference module, @NotNull SModelId modelId, @NotNull String modelName)
Use of this constructor is discouraged, favorSModelReference(SModuleReference, SModelId, SModelName)instead 
- 
SModelReference
public SModelReference(@Nullable SModuleReference module, @NotNull SModelId modelId, @NotNull SModelName modelName)
 
 - 
 
- 
Method Detail
- 
getModelId
@NotNull public SModelId getModelId()
Description copied from interface:SModelReferenceRetrieves an identifier, which is unique within a module.- Specified by:
 getModelIdin interfaceSModelReference
 
- 
getName
@NotNull public SModelName getName()
- Specified by:
 getNamein interfaceSModelReference- Returns:
 - name of the model, may be 
emptybut nevernull 
 
- 
getModelName
@NotNull public String getModelName()
Description copied from interface:SModelReferenceThe returned name of the model may include a stereotype, such as 'generator' or 'tests', separated by the '@' character, e.g. jetbrains.mps.sample.generator.main@generator- Specified by:
 getModelNamein interfaceSModelReference- Returns:
 - equivalent of 
getName().getValue(), seeSModelName.getValue() 
 
- 
getModuleReference
@Nullable public SModuleReference getModuleReference()
Description copied from interface:SModelReferenceReturns module reference when it is a part of this model reference and is available, or null otherwise. Globally unique SModelIds do not require module references.- Specified by:
 getModuleReferencein interfaceSModelReference
 
- 
resolve
public SModel resolve(SRepository repo)
Description copied from interface:SModelReferenceResolves the model from within the given repository- Specified by:
 resolvein interfaceSModelReference
 
- 
parseReference
@NotNull @Deprecated public static SModelReference parseReference(String s)
Deprecated.This code shall move to private method of PersistenceRegistry, which would dispatch to proper registered factories. UsePersistenceFacade.createModelReference(String)instead. Format:[ moduleID / ] modelID [ ([moduleName /] modelName ) ] 
- 
parseReference_internal
@Contract("null->null") public static Pair<Pair<SModuleId,String>,Pair<SModelId,String>> parseReference_internal(@Nullable String s)
 
- 
differs
public static boolean differs(SModelReference ref1, SModelReference ref2)
 
 - 
 
 -