/* (non-Javadoc) * @see br.cos.ufrj.lens.odyssey.tools.psw.metamodels.core.interfaces.CoreClassifier#getInitOrDerivedConstraint(br.cos.ufrj.lens.odyssey.tools.psw.metamodels.core.interfaces.CoreModelElement) */ public OclInitConstraint getInitConstraint(string elementName) { OclInitConstraint result = this.getLocalInitConstraint(elementName); if (result == null) { List <object> allSuperTypes = classifier.getAllAncestors(); for (IEnumerator iter = allSuperTypes.GetEnumerator(); iter.MoveNext() && (result == null);) { CoreClassifier superType = (CoreClassifier)iter.Current; result = superType.getLocalInitConstraint(elementName); } } return(result); }
/* (non-Javadoc) * @see br.cos.ufrj.lens.odyssey.tools.psw.metamodels.core.interfaces.CoreClassifier#getInitOrDerivedConstraint(br.cos.ufrj.lens.odyssey.tools.psw.metamodels.core.interfaces.CoreModelElement) */ public OclInitConstraint getInitConstraint(string elementName) { OclInitConstraint result = this.getLocalInitConstraint(elementName); if (result == null) { List <object> allSuperTypes = classifier.getAllAncestors(); foreach (CoreClassifier superType in allSuperTypes) { result = superType.getLocalInitConstraint(elementName); if (result != null) { break; } } } return(result); }
public abstract void addInitConstraint(string elementName, OclInitConstraint constraint);
public void addInitConstraint( String elementName, OclInitConstraint constraint) { constraintsHolder.addInitConstraint(elementName, constraint); }
/* (non-Javadoc) * @see br.ufrj.cos.lens.odyssey.tools.psw.metamodels.core.interfaces.CoreClassifier#addInitConstraint(java.lang.String, br.ufrj.cos.lens.odyssey.tools.psw.metamodels.ocl20.constraints.OCLConstraint) */ public void addInitConstraint( string elementName, OclInitConstraint constraint) { this.initConstraints.Add(elementName, constraint); }