コード例 #1
0
ファイル: QQueryBase.java プロジェクト: KMenant/TP-SIO-2
  /**
   * Search for slot that corresponds to class. <br>
   * If not found add it. <br>
   * Constrain it. <br>
   */
  public Constraint constrain(Object example) {
    synchronized (streamLock()) {
      ReflectClass claxx = reflectClassForClass(example);
      if (claxx != null) {
        return addClassConstraint(claxx);
      }

      QConEvaluation eval = Platform4.evaluationCreate(_trans, example);
      if (eval != null) {
        return addEvaluationToAllConstraints(eval);
      }

      Collection4 constraints = new Collection4();
      addConstraint(constraints, example);
      return toConstraint(constraints);
    }
  }