xclerc / ocamljava

http://www.ocamljava.org
Other
172 stars 14 forks source link

Inheritance of Java classes #30

Open Vertmo opened 4 years ago

Vertmo commented 4 years ago

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 ?

xclerc commented 4 years ago

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.

ViharGandhi commented 1 year ago

hiii can you mentor me in learning Ocaml