Class ConstructorExpressions

java.lang.Object
com.dassault_systemes.modeler.kerml.model.ConstructorExpressions

@OpenApiAll public class ConstructorExpressions extends Object
Utility class to work with ConstructorExpression
  • Constructor Details

    • ConstructorExpressions

      public ConstructorExpressions()
  • Method Details

    • createConstructorExpression

      public static ConstructorExpression createConstructorExpression(Type instantiatedType)
      Creates a new ConstructorExpression for the given instantiated type. The instantiated type is assigned, and a return parameter is created.
      Parameters:
      instantiatedType - the type being constructed
      Returns:
      created constructor expression
    • getConstructorExpressionInstantiatedTypeFeature

      public static List<Feature> getConstructorExpressionInstantiatedTypeFeature(Type instantiatedType)
      Returns the public features of the instantiated type that participate in constructor expressions. These are the features owned through FeatureMembership with VisibilityKind.PUBLIC.
      Parameters:
      instantiatedType - the type being constructed
      Returns:
      list of public features of the instantiated type
    • isResultOfConstructorExpression

      public static boolean isResultOfConstructorExpression(Feature feature)
      Checks whether the given feature is the result feature of a ConstructorExpression. A feature is considered a constructor result if it is owned by a ReturnParameterMembership whose owning type is a constructor expression.
      Parameters:
      feature - the feature to check
      Returns:
      true if the feature is the result of a constructor expression