Package org.jetbrains.mps.openapi.model
Class SNodeAccessUtil
- java.lang.Object
-
- org.jetbrains.mps.openapi.model.SNodeAccessUtil
-
public abstract class SNodeAccessUtil extends Object
Access to node "properties" using getters and setters declared in MPS. This class is in openAPI for MPS to be able to generate openAPI code for smodel language queries. It's implementation is not in openAPI since we don't want a dependency openAPI->kernel, but still want to access ConstraintsManager, which is not in openAPI yet. Though the class looks like a util-class for outer user, it is really contributed by code in MPSCore instantiating it's impl class, which sets myInstance field. This is a temporary solution - this class should be implemented as a pure util class on the top of openAPI as soon as LanguageRegistry (or something similar) will be an openAPI class.
-
-
Field Summary
Fields Modifier and Type Field Description protected static SNodeAccessUtil
myInstance
-
Constructor Summary
Constructors Constructor Description SNodeAccessUtil()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static String
getProperty(SNode node, String name)
Deprecated.static String
getProperty(SNode node, SProperty property)
Deprecated.This method returns serialized property value.protected abstract String
getPropertyImpl(SNode node, String name)
protected abstract String
getPropertyImpl(SNode node, SProperty property)
static Object
getPropertyValue(SNode node, SProperty property)
protected abstract Object
getPropertyValueImpl(SNode node, SProperty property)
static boolean
hasProperty(SNode node, String name)
Deprecated.static boolean
hasProperty(SNode node, SProperty property)
protected abstract boolean
hasPropertyImpl(SNode node, String name)
protected abstract boolean
hasPropertyImpl(SNode node, SProperty property)
static void
setInstance(SNodeAccessUtil instance)
Internal use ony.static void
setProperty(SNode node, String propertyName, String propertyValue)
Deprecated.static void
setProperty(SNode node, SProperty property, String propertyValue)
Deprecated.This method takes serialized property value.protected abstract void
setPropertyImpl(SNode node, String propertyName, String propertyValue)
protected abstract void
setPropertyImpl(SNode node, SProperty property, String propertyValue)
static void
setPropertyValue(SNode node, SProperty property, Object propertyValue)
protected abstract void
setPropertyValueImpl(SNode node, SProperty property, Object propertyValue)
static void
setReference(SNode node, String role, SReference reference)
Deprecated.static void
setReference(SNode node, SReferenceLink referenceLink, SReference reference)
protected abstract void
setReferenceImpl(SNode node, String role, SReference reference)
protected abstract void
setReferenceImpl(SNode node, SReferenceLink referenceLink, SReference reference)
static void
setReferenceTarget(SNode node, String role, SNode target)
Deprecated.static void
setReferenceTarget(SNode node, SReferenceLink referenceLink, SNode target)
protected abstract void
setReferenceTargetImpl(SNode node, String role, SNode target)
protected abstract void
setReferenceTargetImpl(SNode node, SReferenceLink referenceLink, SNode target)
-
-
-
Field Detail
-
myInstance
protected static volatile SNodeAccessUtil myInstance
-
-
Method Detail
-
hasProperty
@Deprecated public static boolean hasProperty(SNode node, String name)
Deprecated.
-
getProperty
@Deprecated public static String getProperty(SNode node, SProperty property)
Deprecated.This method returns serialized property value. Consider usesetPropertyValue(SNode, SProperty, Object)
that supplies values as is
-
getProperty
@Deprecated public static String getProperty(SNode node, String name)
Deprecated.
-
setProperty
@Deprecated public static void setProperty(SNode node, SProperty property, String propertyValue)
Deprecated.This method takes serialized property value. Consider usesetPropertyValue(SNode, SProperty, Object)
that consumes values as is
-
setPropertyValue
public static void setPropertyValue(SNode node, SProperty property, Object propertyValue)
-
setProperty
@Deprecated public static void setProperty(SNode node, String propertyName, String propertyValue)
Deprecated.
-
setReferenceTarget
public static void setReferenceTarget(SNode node, SReferenceLink referenceLink, @Nullable SNode target)
-
setReferenceTarget
@Deprecated public static void setReferenceTarget(SNode node, String role, @Nullable SNode target)
Deprecated.
-
setReference
public static void setReference(SNode node, SReferenceLink referenceLink, @Nullable SReference reference)
-
setReference
@Deprecated public static void setReference(SNode node, String role, @Nullable SReference reference)
Deprecated.
-
setInstance
public static void setInstance(SNodeAccessUtil instance)
Internal use ony.
-
getPropertyValueImpl
protected abstract Object getPropertyValueImpl(SNode node, SProperty property)
-
setPropertyValueImpl
protected abstract void setPropertyValueImpl(SNode node, SProperty property, Object propertyValue)
-
setPropertyImpl
protected abstract void setPropertyImpl(SNode node, SProperty property, String propertyValue)
-
setPropertyImpl
protected abstract void setPropertyImpl(SNode node, String propertyName, String propertyValue)
-
setReferenceTargetImpl
protected abstract void setReferenceTargetImpl(SNode node, SReferenceLink referenceLink, SNode target)
-
setReferenceTargetImpl
protected abstract void setReferenceTargetImpl(SNode node, String role, SNode target)
-
setReferenceImpl
protected abstract void setReferenceImpl(SNode node, SReferenceLink referenceLink, SReference reference)
-
setReferenceImpl
protected abstract void setReferenceImpl(SNode node, String role, SReference reference)
-
-