code: private Function findField(String name) {
          Selection slkt;
          Function f;
  
          if (name.indexOf('.') == -1) {
              name = type.getName() + "." + name;
          }
          slkt = Method.forName(name);
          if (slkt.size() == 0) {
              f = Field.forName(name);
              if (f != null) {
                  slkt = slkt.add(new Selection(f));
              }
          }
          slkt = slkt.restrictArgumentCount(1);
          slkt = slkt.restrictArgumentType(0, type);
          switch (slkt.size()) {
          case 0:
              throw new RuntimeException("no such field: " + name);
          case 1:
              return slkt.getFunction();
          default:
              throw new RuntimeException("ambiguous field: " + name);
          }
      }
docs: helper method for constructor