私は、、を持ってinterface IA
いinterface IB extends IA
ますclass A implements IA
。
A
ここで、から拡張して実装する匿名クラスを作成したいと思いますIB
。
それはどのように見えますか?私はこのようなことを考えました:
new A() implements IB { /* ... */ }
( Error: Type mismatch: cannot convert from A to IB )
また:
new IB() extends A { /* ... */ }
( Error: Syntax error on token(s), misplaced construct(s) )
それとも、そのようなものを匿名のクラスとして作成することはできませんか?