public class CountConnector extends Host.MyStack { //inner class to glom on the componenet. public class CountBase extends CountAPPC.CountComponent { public Inner inner; public Inner inner1 = new Inner1(); public Inner inner2 = new Inner2(); public Inner inner3 = new Inner3(); public Inner inner4 = new Inner4(); public Object get_host() { return CountConnector.this; } public void actualOp(Object passed) { inner.actualOp(passed); } public void actualOp(Object passed, Object passed2) {inner.actualOp(passed, passed2); } public Object actualOp() { return inner.actualOp(); } interface Inner { public void actualOp(Object passed); public void actualOp(Object passed, Object passed2); public Object actualOp(); } public class Inner1 implements Inner { public void actualOp(Object passed) { CountConnector.this.expected_pushOn2(passed); } public void actualOp(Object passed, Object passed2){} public Object actualOp() { return null; } } public class Inner2 implements Inner { public void actualOp(Object passed) { CountConnector.this.expected_pushTwice2(passed); } public void actualOp(Object passed, Object passed2){} public Object actualOp() { return null; } } public class Inner3 implements Inner { public void actualOp(Object passed){} public void actualOp(Object passed, Object passed2){} public Object actualOp() { return CountConnector.this.expected_popOff2(); } } public class Inner4 implements Inner { public void actualOp(Object passed){} public void actualOp(Object passed, Object passed2) { CountConnector.this.expected_pushTwo2(passed, passed2); } public Object actualOp() { return null; } } public CountBase setInner(Inner inner) { this.inner = inner; return this; } } public CountBase c = new CountBase(); public void expected_pushOn2(Object passed) { super.pushOn(passed); } public void expected_pushTwice2(Object passed) { super.pushTwice(passed); } public void expected_pushTwo2(Object passed, Object passed2) { super.pushTwo(passed, passed2); } public Object expected_popOff2() { return super.popOff(); } // overridden new methods public void pushOn2(Object passed) { c.setInner(c.inner1).pushOp(passed); } public void pushTwice2(Object passed) { c.setInner(c.inner2).pushOp(passed); } public void pushTwo2(Object passed, Object passed2) { c.setInner(c.inner4).pushOp(passed, passed2); } public Object popOff2() { return c.setInner(c.inner3).popOp(); } }