Package io.lionweb.lioncore.java.model
Class ClassifierInstanceUtils
java.lang.Object
io.lionweb.lioncore.java.model.ClassifierInstanceUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addChild
(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 Node
getOnlyChildByContainmentName
(ClassifierInstance<?> _this, String containmentName) static ReferenceValue
getOnlyReferenceValueByReferenceName
(ClassifierInstance<?> _this, String referenceName) static Object
getPropertyValueByID
(ClassifierInstance<?> _this, String propertyID) static Object
getPropertyValueByName
(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 boolean
isBuiltinElement
(LanguageEntity<?> _this) static boolean
isBuiltinElement
(Node _this) static ReferenceValue
referenceTo
(LanguageEntity<?> _this) static void
setOnlyChildByContainmentName
(ClassifierInstance<?> _this, String containmentName, Node child) static void
setOnlyReferenceValue
(ClassifierInstance<?> _this, Reference reference, ReferenceValue value) static void
setOnlyReferenceValueByName
(ClassifierInstance<?> _this, String referenceName, ReferenceValue value) static void
setPropertyValueByName
(ClassifierInstance<?> _this, String propertyName, Object value) static void
setReferenceValuesByName
(ClassifierInstance<?> _this, String referenceName, List<? extends ReferenceValue> values) static boolean
shallowAnnotationsEquality
(List<AnnotationInstance> annotations1, List<AnnotationInstance> annotations2) static boolean
shallowClassifierInstanceEquality
(ClassifierInstance<?> classifierInstance1, ClassifierInstance<?> classifierInstance2) static boolean
shallowContainmentEquality
(List<? extends Node> childrenA, List<? extends Node> childrenB) static boolean
shallowReferenceEquality
(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)
-