/** * Push a condition on the stack. */ public void pushCondition(ConstrainableCondition con) { if(getDefiningScope(con)!=this) { if(con instanceof ObjectCondition) { // Create clone of inconsistent condition in inner scope. ObjectCondition ocon = (ObjectCondition)con; generateVariableBinding(ocon, null); // new null bound constraint to make sure that cloned condition refers to SAME object. con = createObjectCondition(ocon.getObjectType(), (IConstraint[])ocon.getConstraints().toArray(new IConstraint[ocon.getConstraints().size()])); } else { throw new RuntimeException("Wrong scope: "+con); } } if(oconstack==null) { oconstack = new ArrayList(); } oconstack.add(con); }
/** * Push a condition on the stack. */ public void pushCondition(ConstrainableCondition con) { if(getDefiningScope(con)!=this) { if(con instanceof ObjectCondition) { // Create clone of inconsistent condition in inner scope. ObjectCondition ocon = (ObjectCondition)con; generateVariableBinding(ocon, null); // new null bound constraint to make sure that cloned condition refers to SAME object. con = createObjectCondition(ocon.getObjectType(), (IConstraint[])ocon.getConstraints().toArray(new IConstraint[ocon.getConstraints().size()])); } else { throw new RuntimeException("Wrong scope: "+con); } } if(oconstack==null) { oconstack = new ArrayList(); } oconstack.add(con); }
OAVObjectType type = oc.getObjectType(); OAVObjectType mtype = (OAVObjectType)OAVBDIRuntimeModel.modelmap.get(type); check = type instanceof OAVJavaType || types.contains(type)
BoundConstraint bc = new BoundConstraint(null, new Variable(context.generateVariableName(),((ObjectCondition)con).getObjectType(), false, true)); List constraints2 = new ArrayList(((ObjectCondition)con).getConstraints()); constraints2.removeAll(constraints); constraints2.add(bc); context.getConditions().remove(con); context.createObjectCondition(((ObjectCondition)con).getObjectType(), (IConstraint[])constraints2.toArray(new IConstraint[constraints2.size()])); context.createObjectCondition(((ObjectCondition)con).getObjectType(), (IConstraint[])constraints.toArray(new IConstraint[constraints.size()])); shuffle(context);
BoundConstraint bc = new BoundConstraint(null, new Variable(context.generateVariableName(),((ObjectCondition)con).getObjectType(), false, true)); List constraints2 = new ArrayList(((ObjectCondition)con).getConstraints()); constraints2.removeAll(constraints); constraints2.add(bc); context.getConditions().remove(con); context.createObjectCondition(((ObjectCondition)con).getObjectType(), (IConstraint[])constraints2.toArray(new IConstraint[constraints2.size()])); context.createObjectCondition(((ObjectCondition)con).getObjectType(), (IConstraint[])constraints.toArray(new IConstraint[constraints.size()])); shuffle(context);
ret = ((ObjectCondition)cond).getObjectType();
ret = ((ObjectCondition)cond).getObjectType();
addTypeNode(curcond.getObjectType(), context);
addTypeNode(curcond.getObjectType(), context);
mfv.setType(first.getObjectType()); List consts = new ArrayList(); consts.add(new BoundConstraint(null, mfv));
mfv.setType(first.getObjectType()); List consts = new ArrayList(); consts.add(new BoundConstraint(null, mfv));
OAVObjectType type = bc.getValueSource()!=null ? ((OAVAttributeType)bc.getValueSource()).getType() : cond.getObjectType(); if(!(type instanceof OAVJavaType) || OAVJavaType.KIND_VALUE.equals(((OAVJavaType)type).getKind()))
OAVObjectType type = bc.getValueSource()!=null ? ((OAVAttributeType)bc.getValueSource()).getType() : cond.getObjectType(); if(!(type instanceof OAVJavaType) || OAVJavaType.KIND_VALUE.equals(((OAVJavaType)type).getKind()))