(String[] args)
| 44 | |
| 45 | public class DynamicProxyMixin { |
| 46 | public static void main(String[] args) { |
| 47 | @SuppressWarnings("unchecked") |
| 48 | Object mixin = MixinProxy.newInstance( |
| 49 | tuple(new BasicImp(), Basic.class), |
| 50 | tuple(new TimeStampedImp(), TimeStamped.class), |
| 51 | tuple(new SerialNumberedImp(), |
| 52 | SerialNumbered.class)); |
| 53 | Basic b = (Basic)mixin; |
| 54 | TimeStamped t = (TimeStamped)mixin; |
| 55 | SerialNumbered s = (SerialNumbered)mixin; |
| 56 | b.set("Hello"); |
| 57 | System.out.println(b.get()); |
| 58 | System.out.println(t.getStamp()); |
| 59 | System.out.println(s.getSerialNumber()); |
| 60 | } |
| 61 | } |
| 62 | /* Output: |
| 63 | Hello |
nothing calls this directly
no test coverage detected