Class ComponentProxyFactory

java.lang.Object
ai.tegmentum.webassembly4j.runtime.proxy.ComponentProxyFactory

public final class ComponentProxyFactory extends Object
Creates interface proxies bound to a native ComponentInstance.

For runtimes that support the component model natively (e.g. wasmtime), this factory delegates method calls to ComponentInstance.invoke(String, Object...) which handles WIT type conversion natively.

  • Method Details

    • create

      public static <T> T create(Class<T> iface, ai.tegmentum.webassembly4j.api.Engine engine, ai.tegmentum.webassembly4j.api.Component component, ai.tegmentum.webassembly4j.api.ComponentInstance instance)