Class JavaConstructor.Overload

All Implemented Interfaces:
KryoSerializable
Enclosing class:
JavaConstructor

public static class JavaConstructor.Overload extends VarArgFunction
LuaValue that represents an overloaded Java constructor.

On invocation, will pick the best method from the list, and invoke it.

This class is not used directly. It is returned by calls to calls to JavaInstance.get(LuaValue key) when key is "new" and there is more than one public constructor.

  • Constructor Details

    • Overload

      public Overload(JavaConstructor[] c)
      Constructor array will be sorted
  • Method Details

    • invoke

      public Varargs invoke(Varargs args)
      Description copied from class: VarArgFunction
      Subclass responsibility. May not have expected behavior for tail calls. Should not be used if: - function has a possibility of returning a TailcallVarargs
      Overrides:
      invoke in class VarArgFunction
      Parameters:
      args - the arguments to the function call.