Class GcTypeMapper

java.lang.Object
ai.tegmentum.webassembly4j.runtime.gc.GcTypeMapper

public final class GcTypeMapper extends Object
Maps Java classes annotated with GcMapped to WebAssembly GC struct types.

Caches type mappings for reuse. Thread-safe.

  • Constructor Details

    • GcTypeMapper

      public GcTypeMapper()
  • Method Details

    • toStructType

      public ai.tegmentum.webassembly4j.api.gc.GcStructType toStructType(Class<?> type)
      Returns the GC struct type for the given Java class.
      Parameters:
      type - a class annotated with GcMapped
      Returns:
      the corresponding GC struct type
      Throws:
      IllegalArgumentException - if the class is not annotated or has unsupported fields