return (Lock) lockClass.newInstance();
lock = (Lock) lockClass.newInstance(); lock.setName(name); return lock;
  public static Lock newLock(String name) {    try {      return (Lock) lockClass.newInstance();    } catch (Exception e) {      assertions.fail("Failed to allocate lock!");      return null; // never get here    }  }