ocamljava icon indicating copy to clipboard operation
ocamljava copied to clipboard

Inheritance of Java classes

Open Vertmo opened this issue 5 years ago • 2 comments

I'm currently experimenting with OCamlJava, and I can't find a way to extends a java class (that would for instance offer some protected methods) from OCaml code. Is there a way to do it I cannot find, or is it impossible with OCamlJava ?

Vertmo avatar Jan 31 '20 17:01 Vertmo

It is unfortunately not possible to extend a Java class; you can only implement a Java interface through an OCaml object. If it can solve your problem, you can find an example here.

Béatrice Carré worked on a tool that would allow that, but I am afraid I cannot remember the details; the repository can be found here.

xclerc avatar Jan 31 '20 19:01 xclerc

hiii can you mentor me in learning Ocaml

ViharGandhi avatar Jan 13 '23 14:01 ViharGandhi