Class DynConstructors.Ctor<C>

java.lang.Object
org.apache.iceberg.common.DynMethods.UnboundMethod
org.apache.iceberg.common.DynConstructors.Ctor<C>
Enclosing class:
DynConstructors

public static class DynConstructors.Ctor<C> extends DynMethods.UnboundMethod
A wrapper around a Constructor that can be invoked to create new instances.
  • Method Details

    • newInstanceChecked

      public C newInstanceChecked(Object... args) throws Exception
      Invokes the constructor with the given arguments.
      Parameters:
      args - the arguments to pass to the constructor
      Returns:
      a new instance
      Throws:
      Exception - if the constructor throws a checked exception
    • newInstance

      public C newInstance(Object... args)
      Invokes the constructor with the given arguments, wrapping checked exceptions in a RuntimeException.
      Parameters:
      args - the arguments to pass to the constructor
      Returns:
      a new instance
    • invoke

      public <R> R invoke(Object target, Object... args)
      Description copied from class: DynMethods.UnboundMethod
      Invokes the method on the given target, wrapping checked exceptions in a RuntimeException.
      Overrides:
      invoke in class DynMethods.UnboundMethod
      Type Parameters:
      R - the return type of the method
      Parameters:
      target - the object to invoke the method on
      args - the arguments to pass to the method
      Returns:
      the result of the invocation
    • bind

      public DynMethods.BoundMethod bind(Object receiver)
      Description copied from class: DynMethods.UnboundMethod
      Returns this method as a BoundMethod for the given receiver.
      Overrides:
      bind in class DynMethods.UnboundMethod
      Parameters:
      receiver - an Object to receive the method invocation
      Returns:
      a DynMethods.BoundMethod for this method and the receiver
    • isStatic

      public boolean isStatic()
      Description copied from class: DynMethods.UnboundMethod
      Returns whether the method is a static method.
      Overrides:
      isStatic in class DynMethods.UnboundMethod
      Returns:
      true if the method is static, false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class DynMethods.UnboundMethod