Package org.apache.iceberg.common
Class DynConstructors.Ctor<C>
java.lang.Object
org.apache.iceberg.common.DynMethods.UnboundMethod
org.apache.iceberg.common.DynConstructors.Ctor<C>
- Enclosing class:
- DynConstructors
A wrapper around a
Constructor that can be invoked to create new instances.-
Method Summary
Modifier and TypeMethodDescriptionReturns this method as a BoundMethod for the given receiver.<R> RInvokes the method on the given target, wrapping checked exceptions in a RuntimeException.booleanisStatic()Returns whether the method is a static method.newInstance(Object... args) Invokes the constructor with the given arguments, wrapping checked exceptions in a RuntimeException.newInstanceChecked(Object... args) Invokes the constructor with the given arguments.toString()Methods inherited from class org.apache.iceberg.common.DynMethods.UnboundMethod
asStatic, isNoop
-
Method Details
-
newInstanceChecked
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
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
Description copied from class:DynMethods.UnboundMethodInvokes the method on the given target, wrapping checked exceptions in a RuntimeException.- Overrides:
invokein classDynMethods.UnboundMethod- Type Parameters:
R- the return type of the method- Parameters:
target- the object to invoke the method onargs- the arguments to pass to the method- Returns:
- the result of the invocation
-
bind
Description copied from class:DynMethods.UnboundMethodReturns this method as a BoundMethod for the given receiver.- Overrides:
bindin classDynMethods.UnboundMethod- Parameters:
receiver- an Object to receive the method invocation- Returns:
- a
DynMethods.BoundMethodfor this method and the receiver
-
isStatic
public boolean isStatic()Description copied from class:DynMethods.UnboundMethodReturns whether the method is a static method.- Overrides:
isStaticin classDynMethods.UnboundMethod- Returns:
- true if the method is static, false otherwise
-
toString
- Overrides:
toStringin classDynMethods.UnboundMethod
-