コード例 #1
0
  public static TransientValueReference_c resolveInstance(
      ModelRoot modelRoot, java.util.UUID p_m_value_id, java.util.UUID p_m_var_id) {
    InstanceList instances = modelRoot.getInstanceList(TransientValueReference_c.class);
    TransientValueReference_c source = null;
    synchronized (instances) {
      Object[] key = {p_m_value_id};
      source = (TransientValueReference_c) instances.get(key);
      if (source != null && !modelRoot.isCompareRoot()) {
        source.convertFromProxy();
        source.batchUnrelate();
        // pre-process the uuid so that we re-use null uuid instance rather then creating a new one.
        source.m_value_id = IdAssigner.preprocessUUID(p_m_value_id);
        // pre-process the uuid so that we re-use null uuid instance rather then creating a new one.
        source.m_var_id = IdAssigner.preprocessUUID(p_m_var_id);

        return source;
      }
    }
    // there is no instance matching the id
    TransientValueReference_c new_inst =
        new TransientValueReference_c(modelRoot, p_m_value_id, p_m_var_id);
    return new_inst;
  }