Java Compat Mapping for Local Classes
On this page:
Mapped Java Class
A local Slice class is mapped to a concrete or abstract Java class with the same name. For example:
Slice
module Ice { local class ConnectionInfo { ... } }
is mapped to the Java class ConnectionInfo
:
Java
package Ice; public class ConnectionInfo implements java.lang.Cloneable { ... }
All mapped Java classes implement java.lang.Cloneable.
LocalObject in Java
Like local interfaces, local Slice classes implicitly derive from LocalObject
, which is mapped to java.lang.Object
in Java.
Mapping for Local Interface Inheritance in Java
A local Slice class can extend another local Slice class, and can implement one or more local Slice interfaces. extends
for classes is mapped to extends
in Java, and implements
is mapped to implements
. For example:
Slice
module M { local interface A {} local interface B {} local class C implements A, B {} local class D extends C {} }
is mapped to:
Java
package M; public interface A {} public interface B {} public class C implements A, B, java.lang.Cloneable {} public class D extends C {}