java.lang.Object
org.kink_lang.kink.internal.compile.classgen.ClassGenerator

public class ClassGenerator extends Object
Generates a fun class from IR.
  • Constructor Details

    • ClassGenerator

      public ClassGenerator(Vm vm, MethodHandles.Lookup packageLookup)
      Constructs a generator.
      Parameters:
      vm - the vm.
      packageLookup - the lookup with privilege of org.kink_lang.kink package.
  • Method Details

    • generate

      public MethodHandles.Lookup generate(JavaClassIr jcir) throws Exception
      Generates a fun class, initializing static fields.
      Parameters:
      jcir - the IR of the fun.
      Returns:
      the lookup of the generated class.
      Throws:
      Exception - reflection exception.