Package io.lionweb.model
Class ClassifierInstanceUtils
java.lang.Object
io.lionweb.model.ClassifierInstanceUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddChild(ClassifierInstance<?> _this, String containmentName, Node child) getChildren(ClassifierInstance<?> _this) This return all the Nodes directly contained into this Node.getChildrenByContainmentName(ClassifierInstance<?> _this, String containmentName) static NodegetOnlyChildByContainmentName(ClassifierInstance<?> _this, String containmentName) static ReferenceValuegetOnlyReferenceValueByReferenceName(ClassifierInstance<?> _this, String referenceName) static ObjectgetPropertyValueByID(ClassifierInstance<?> _this, String propertyID) static ObjectgetPropertyValueByName(ClassifierInstance<?> _this, String propertyName) static List<ReferenceValue>getReferenceValueByName(ClassifierInstance<?> _this, String referenceName) static List<ReferenceValue>getReferenceValues(ClassifierInstance<?> _this) getReferredNodes(ClassifierInstance<?> _this) Return the Nodes referred to under any Reference link.getReferredNodes(ClassifierInstance<?> _this, Reference reference) Return the Nodes referred to under the specified Reference link.static booleanisBuiltinElement(LanguageEntity<?> _this) static booleanisBuiltinElement(Node _this) static ReferenceValuereferenceTo(LanguageEntity<?> _this) static voidsetOnlyChildByContainmentName(ClassifierInstance<?> _this, String containmentName, Node child) static voidsetOnlyReferenceValue(ClassifierInstance<?> _this, Reference reference, ReferenceValue value) static voidsetOnlyReferenceValueByName(ClassifierInstance<?> _this, String referenceName, ReferenceValue value) static voidsetPropertyValueByName(ClassifierInstance<?> _this, String propertyName, Object value) static voidsetReferenceValuesByName(ClassifierInstance<?> _this, String referenceName, List<? extends ReferenceValue> values) static booleanshallowAnnotationsEquality(List<AnnotationInstance> annotations1, List<AnnotationInstance> annotations2) static booleanshallowClassifierInstanceEquality(ClassifierInstance<?> classifierInstance1, ClassifierInstance<?> classifierInstance2) static booleanshallowContainmentEquality(List<? extends Node> childrenA, List<? extends Node> childrenB) static booleanshallowReferenceEquality(List<ReferenceValue> references1, List<ReferenceValue> references2)
-
Method Details
-
getPropertyValueByName
@Nullable public static Object getPropertyValueByName(@Nonnull ClassifierInstance<?> _this, @Nonnull String propertyName) -
setPropertyValueByName
public static void setPropertyValueByName(@Nonnull ClassifierInstance<?> _this, @Nonnull String propertyName, @Nullable Object value) -
getPropertyValueByID
@Nullable public static Object getPropertyValueByID(@Nonnull ClassifierInstance<?> _this, @Nonnull String propertyID) -
getChildren
This return all the Nodes directly contained into this Node. -
getChildrenByContainmentName
@Nonnull public static List<? extends Node> getChildrenByContainmentName(@Nonnull ClassifierInstance<?> _this, @Nonnull String containmentName) -
getOnlyChildByContainmentName
@Nullable public static Node getOnlyChildByContainmentName(@Nonnull ClassifierInstance<?> _this, @Nonnull String containmentName) -
setOnlyChildByContainmentName
public static void setOnlyChildByContainmentName(@Nonnull ClassifierInstance<?> _this, @Nonnull String containmentName, @Nullable Node child) -
getReferenceValues
@Nonnull public static List<ReferenceValue> getReferenceValues(@Nonnull ClassifierInstance<?> _this) -
setOnlyReferenceValue
public static void setOnlyReferenceValue(@Nonnull ClassifierInstance<?> _this, @Nonnull Reference reference, @Nullable ReferenceValue value) -
setOnlyReferenceValueByName
public static void setOnlyReferenceValueByName(@Nonnull ClassifierInstance<?> _this, @Nonnull String referenceName, @Nullable ReferenceValue value) -
setReferenceValuesByName
public static void setReferenceValuesByName(@Nonnull ClassifierInstance<?> _this, @Nonnull String referenceName, @Nonnull List<? extends ReferenceValue> values) -
getReferredNodes
@Nonnull public static List<Node> getReferredNodes(@Nonnull ClassifierInstance<?> _this, @Nonnull Reference reference) Return the Nodes referred to under the specified Reference link. This returns an empty list if no Node is associated with the specified Reference link.The Node returned is guaranteed to be either part of this Node's Model or of Models imported by this Node's Model.
Please note that it may contain null values in case of ReferenceValue with a null referred field.
-
getReferredNodes
Return the Nodes referred to under any Reference link. This returns an empty list if no Node is referred by this Node.The Node returned is guaranteed to be either part of this Node's Model or of Models imported by this Node's Model.
Please note that this will not return null values, differently from the variant taking a Reference. It may contain duplicates.
-
getReferenceValueByName
@Nonnull public static List<ReferenceValue> getReferenceValueByName(@Nonnull ClassifierInstance<?> _this, @Nonnull String referenceName) -
getOnlyReferenceValueByReferenceName
@Nullable public static ReferenceValue getOnlyReferenceValueByReferenceName(@Nonnull ClassifierInstance<?> _this, @Nonnull String referenceName) -
addChild
public static void addChild(@Nonnull ClassifierInstance<?> _this, @Nonnull String containmentName, @Nonnull Node child) -
referenceTo
-
isBuiltinElement
-
isBuiltinElement
-
shallowClassifierInstanceEquality
public static boolean shallowClassifierInstanceEquality(@Nullable ClassifierInstance<?> classifierInstance1, @Nullable ClassifierInstance<?> classifierInstance2) -
shallowAnnotationsEquality
public static boolean shallowAnnotationsEquality(List<AnnotationInstance> annotations1, List<AnnotationInstance> annotations2) -
shallowContainmentEquality
-
shallowReferenceEquality
public static boolean shallowReferenceEquality(List<ReferenceValue> references1, List<ReferenceValue> references2)
-