Class ClassifierInstanceUtils

java.lang.Object
io.lionweb.lioncore.java.model.ClassifierInstanceUtils

public class ClassifierInstanceUtils extends Object
  • 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

      @Nonnull public static List<Node> getChildren(@Nonnull ClassifierInstance<?> _this)
      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

      @Nonnull public static List<Node> getReferredNodes(@Nonnull ClassifierInstance<?> _this)
      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

      public static ReferenceValue referenceTo(@Nonnull LanguageEntity<?> _this)
    • isBuiltinElement

      public static boolean isBuiltinElement(@Nonnull Node _this)
    • isBuiltinElement

      public static boolean isBuiltinElement(@Nonnull LanguageEntity<?> _this)
    • shallowClassifierInstanceEquality

      public static boolean shallowClassifierInstanceEquality(@Nullable ClassifierInstance<?> classifierInstance1, @Nullable ClassifierInstance<?> classifierInstance2)
    • shallowAnnotationsEquality

      public static boolean shallowAnnotationsEquality(List<AnnotationInstance> annotations1, List<AnnotationInstance> annotations2)
    • shallowContainmentEquality

      public static boolean shallowContainmentEquality(List<? extends Node> childrenA, List<? extends Node> childrenB)
    • shallowReferenceEquality

      public static boolean shallowReferenceEquality(List<ReferenceValue> references1, List<ReferenceValue> references2)