[英]UML class diagram for Remote Interface
There are 2 interfaces A and B which implement remote methods. 有两个接口A和B实现远程方法。 How can I implement another interface which aggregates interfaces A and B?
如何实现聚合接口A和B的另一个接口? Or is there any other way to do it?
还是有其他方法可以做到? Eg:
例如:
public interface A extends java.rmi.Remote
{
//function declns
}
public interface B extends java.rmi.Remote
{
//function declns
}
public interface C extends java.rmi.Remote implements A,B
{
}
gives me error saying there's a syntax error on implements 给我一个错误,说工具上存在语法错误
Pls help 请帮助
public interface A {
public methodA();
}
public interface B {
public methodB();
}
public interface C implements A,B {
public methodA();
public methodB();
}
+----+ +-----+
| A | | B |
+----+ +-----+
^ ^
| |
+----------------+
| C |
+----------------+
public interface A extends java.rmi.Remote
{
//function declns
}
public interface B extends java.rmi.Remote
{
//function declns
}
public interface C extends A,B
{
}
Note that interface C
does not need to directly extend java.rmi.Remote
since it extends A
and B
, both of which themselves directly extend Remote
. 请注意,接口
C
不需要直接扩展java.rmi.Remote
因为它扩展了A
和B
,它们两者都直接扩展了Remote
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.