Package org.jetbrains.mps.openapi.model
Interface SModelReference
-
public interface SModelReference
Represents a unique reference to a model, which remains valid across subsequent read and write actions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SModelId
getModelId()
Retrieves an identifier, which is unique within a module.String
getModelName()
The returned name of the model may include a stereotype, such as 'generator' or 'tests', separated by the '@' character, e.g.SModuleReference
getModuleReference()
Returns module reference when it is a part of this model reference and is available, or null otherwise.SModelName
getName()
SModel
resolve(SRepository repo)
Resolves the model from within the given repository
-
-
-
Method Detail
-
getModelName
@NotNull String getModelName()
The 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- Returns:
- equivalent of
getName().getValue()
, seeSModelName.getValue()
-
getName
@NotNull SModelName getName()
- Returns:
- name of the model, may be
empty
but nevernull
-
getModuleReference
@Nullable SModuleReference getModuleReference()
Returns 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.
-
resolve
SModel resolve(SRepository repo)
Resolves the model from within the given repository
-
-