public ExpressionInOcl createExpressionInOcl(string name, CoreModelElement contextualElement, OclExpression bodyExpression) { ExpressionInOcl exp = new ExpressionInOclImpl(); ((ExpressionInOclImpl)exp).setBodyExpression(bodyExpression); exp.setContextualElement(contextualElement); exp.setName(name); return(exp); }
public Object Clone() { try { ExpressionInOclImpl theClone = (ExpressionInOclImpl)Activator.CreateInstance(Assembly.GetExecutingAssembly().FullName, this.GetType().FullName).Unwrap(); theClone.bodyExpression = (OclExpression)bodyExpression.Clone(); theClone.contextualElement = contextualElement; theClone.name = name; return(theClone); } catch (Exception) { return(null); } }