Ejemplo n.º 1
0
  private void populateBridgeInstances() {
    class EE_test1_c implements ClassQueryInterface_c {
      EE_test1_c(String p) {
        m_p = p;
      }

      private String m_p;

      public boolean evaluate(Object inst) {
        ExternalEntity_c selected = (ExternalEntity_c) inst;
        return selected.getKey_lett().equals(m_p);
      }
    }
    ExternalEntity_c testEE =
        ExternalEntity_c.ExternalEntityInstance(arrayModelRoot, new EE_test1_c("T")); // $NON-NLS-1$
    if (testEE == null) fail("Unknown external entity T"); // $NON-NLS-1$
    class Bridge_test1_c implements ClassQueryInterface_c {
      Bridge_test1_c(String p) {
        m_p = p;
      }

      private String m_p;

      public boolean evaluate(Object inst) {
        Bridge_c selected = (Bridge_c) inst;
        return selected.getName().equals(m_p);
      }
    }
    for (int i = 0; i < funcs.length; ++i) {
      Bridge_c testFunc = Bridge_c.BridgeInstance(arrayModelRoot, new Bridge_test1_c(funcs[i]));
      if (testFunc != null) {
        if (m_testBrg[i] == null) m_testBrg[i] = testFunc;
      } else fail("Missing bridge " + funcs[i]); // $NON-NLS-1$
    }
  }
Ejemplo n.º 2
0
 public boolean evaluate(Object inst) {
   ExternalEntity_c selected = (ExternalEntity_c) inst;
   return selected.getKey_lett().equals(m_p);
 }