public Rule memoMismatches() { if (target == null) { // if we have no target yet we need to save the marker and "apply" it later setMemoMismatches(true); return this; } // we already have a target to which we can directly apply the marker Rule inner = unwrap(target); target = (Matcher) inner.memoMismatches(); // since this might change the instance we have to update it setMemoMismatches(false); return target; }