Package org.apache.iceberg.common
Class DynMethods.UnboundMethod
java.lang.Object
org.apache.iceberg.common.DynMethods.UnboundMethod
- Direct Known Subclasses:
DynConstructors.Ctor
- Enclosing class:
- DynMethods
Convenience wrapper class around
Method
.
Allows callers to invoke the wrapped method with all Exceptions wrapped by RuntimeException, or with a single Exception catch block.
-
Method Summary
Modifier and TypeMethodDescriptionasStatic()
Returns this method as a StaticMethod.Returns this method as a BoundMethod for the given receiver.<R> R
<R> R
invokeChecked
(Object target, Object... args) Deprecated.since 1.6.0, will be removed in 1.7.0boolean
isNoop()
Returns whether the method is a noop.boolean
isStatic()
Returns whether the method is a static method.toString()
-
Method Details
-
invokeChecked
Deprecated.since 1.6.0, will be removed in 1.7.0- Throws:
Exception
-
invoke
-
bind
Returns this method as a BoundMethod for the given receiver.- Parameters:
receiver
- an Object to receive the method invocation- Returns:
- a
DynMethods.BoundMethod
for this method and the receiver - Throws:
IllegalStateException
- if the method is staticIllegalArgumentException
- if the receiver's class is incompatible
-
isStatic
public boolean isStatic()Returns whether the method is a static method. -
isNoop
public boolean isNoop()Returns whether the method is a noop. -
asStatic
Returns this method as a StaticMethod.- Returns:
- a
DynMethods.StaticMethod
for this method - Throws:
IllegalStateException
- if the method is not static
-
toString
-