Package jetbrains.mps.smodel.adapter
Class BootstrapAdapterFactory
- java.lang.Object
 - 
- jetbrains.mps.smodel.adapter.BootstrapAdapterFactory
 
 
- 
public class BootstrapAdapterFactory extends Object
Counterpart forMetaAdapterFactorywhich creates meta-objects tuned for bootstrap purposes. NOTE. THIS IS INTERNAL API AND SHALL NOT BE USED DIRECTLY FROM USER'S CODE.BOOTSTRAP META OBJECTS
Bootstrap attribute indicates whether we can rely on regular MPS infrastructure to find out details about the meta object or not. Without generated classes for meta object (i.e. concept, property, link) descriptors, we face interpreted descriptors, and as long as we describe our concepts using themselves (e.g. BaseConcept and ConceptDeclaration, what we refer to as 'bootstrap' here), we need to tell certain meta objects shall not behave like others. Ultimate example is an attempt to find out name ofINamedConcept, which keeps its name in the propertyINamedConcept.name, where we shall not use anything but values already known (i.e. can't go to ConceptRegistry to find concept and property descriptors as they are right in the process of being initialized). For the time being, it's only name which is guarded from going to ConceptRegistry. Consider the example with INamedConcept. An attempt to read name of INamedConcept node triggers propertyRead notification, which requires SProperty.getName(), and without bootstrap flag, we would go to find property descriptor, and then trigger sequence of unrelated load attempts that in turn would need INamedConcept.name. Generally, bootstrap meta objects shall not be used, thus we keep them separate from the rest of meta objects. Don't use them unless there's bootstrap dependency you're sure is indeed bootstrap one. Note, we do not cache these objects as there should be few of them and they are likely get reused anyway (e.g. as static field in SNodeUtil). If not re-used, why would they be declared bootstrap, after all? 
- 
- 
Constructor Summary
Constructors Constructor Description BootstrapAdapterFactory() 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SConceptgetConcept(long uuidHigh, long uuidLow, long concept, String conceptName)static SContainmentLinkgetContainmentLink(long uuidHigh, long uuidLow, long concept, long link, String linkName)static SInterfaceConceptgetInterface(long uuidHigh, long uuidLow, long concept, String conceptName)static SPropertygetProperty(long uuidHigh, long uuidLow, long concept, long prop, String propName)static SReferenceLinkgetReferenceLink(long uuidHigh, long uuidLow, long concept, long ref, String refName) 
 - 
 
- 
- 
Method Detail
- 
getConcept
@NotNull public static SConcept getConcept(long uuidHigh, long uuidLow, long concept, String conceptName)
 
- 
getInterface
@NotNull public static SInterfaceConcept getInterface(long uuidHigh, long uuidLow, long concept, String conceptName)
 
- 
getProperty
@NotNull public static SProperty getProperty(long uuidHigh, long uuidLow, long concept, long prop, String propName)
 
- 
getReferenceLink
@NotNull public static SReferenceLink getReferenceLink(long uuidHigh, long uuidLow, long concept, long ref, String refName)
 
- 
getContainmentLink
@NotNull public static SContainmentLink getContainmentLink(long uuidHigh, long uuidLow, long concept, long link, String linkName)
 
 - 
 
 -