ImplementJavaInterface

ImplementJavaInterface[interfaces,mappings]
uses the Dynamic Proxy facility of Java to create a new Java class and return an object of that class that implements the named interface or list of interfaces by calling back into the Wolfram Language. In short, it lets you create a Java object that implements a given Java interface entirely in Wolfram Language code.

DetailsDetails

  • To use ImplementJavaInterface, you first need to load J/Link using Needs["JLink`"].
  • mappings is a list of rules that specify the name of the Java method and the name of the method that will be called in the Wolfram Language to implement the body of that method, as in . The arguments passed to the Wolfram Language method will be exactly the arguments originally passed to the Java method.