Class ModuleReference
- java.lang.Object
-
- jetbrains.mps.project.structure.modules.ModuleReference
-
- All Implemented Interfaces:
SModuleReference
public final class ModuleReference extends Object implements SModuleReference
-
-
Constructor Summary
Constructors Constructor Description ModuleReference(String moduleName, SModuleId moduleId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleandiffers(SModuleReference ref1, SModuleReference ref2)Common functionality to tell if two references are identical, identical here being both id and name.booleanequals(Object obj)SModuleIdgetModuleId()StringgetModuleName()inthashCode()static SModuleReferenceparseReference(String text)SModuleresolve(SRepository repo)StringtoString()
-
-
-
Method Detail
-
getModuleId
@NotNull public SModuleId getModuleId()
- Specified by:
getModuleIdin interfaceSModuleReference
-
getModuleName
@Nullable public String getModuleName()
- Specified by:
getModuleNamein interfaceSModuleReference- Returns:
- null if the name is not provided the name serves as extra information here
-
resolve
public SModule resolve(@NotNull SRepository repo)
- Specified by:
resolvein interfaceSModuleReference- Returns:
- the SModule such that
SModule.getModuleReference()equals to this one. SRepository is supposed to store only one module with the given module reference
-
parseReference
public static SModuleReference parseReference(@NotNull String text)
-
differs
public static boolean differs(SModuleReference ref1, SModuleReference ref2)
Common functionality to tell if two references are identical, identical here being both id and name. Unlike #equals(), where id takes precedence. Not specific to ModuleReference implementation, lives here as there's no better/discoverable place yet. Originates from RefUpdateUtil.- Returns:
trueif either reference is null, or either references' name or id does not match
-
-