private static String doWaitFor(Command c, String Not,
			boolean methodNotPresent) {
		String mName = c.getName().substring(("waitFor" + Not).length());
		String pipe = "";
		if (methodNotPresent) {
			mName = mName.replace("Not", "");
			pipe = "!";

		} else if (Not.equals("Not")) {
			pipe = "!";
		}
		Method m = methods.get("is" + mName);
		if (m != null) {
			return _for_block("if (" + pipe + SESSION + "." + m.getName()
					+ "(\"" + filter(c.getTarget()) + "\"))", c);
		}
		m = methods.get("get" + mName);
		if (m != null) {
			boolean noArgs = m.getParameterTypes().length == 0;
			if (noArgs) {
				return _for_block("if (" + pipe + "\"" + filter(c.getTarget())
						+ "\".equals(" + SESSION + "." + m.getName() + "()))",
						c);
			} else {
				return _for_block("if (" + pipe + "\"" + filter(c.getValue())
						+ "\".equals(" + SESSION + "." + m.getName() + "(\""
						+ filter(c.getTarget()) + "\")))", c);
			}
		}
		return null;
	}