Package org.apache.parquet.util
Class DynMethods.UnboundMethod
- java.lang.Object
-
- org.apache.parquet.util.DynMethods.UnboundMethod
-
- Direct Known Subclasses:
DynConstructors.Ctor
- Enclosing class:
- DynMethods
public static class DynMethods.UnboundMethod extends Object
Convenience wrapper class aroundMethod. Allows callers to invoke the wrapped method with all Exceptions wrapped by RuntimeException, or with a single Exception catch block.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynMethods.StaticMethodasStatic()Returns this method as a StaticMethod.DynMethods.BoundMethodbind(Object receiver)Returns this method as a BoundMethod for the given receiver.<R> Rinvoke(Object target, Object... args)<R> RinvokeChecked(Object target, Object... args)booleanisNoop()booleanisStatic()StringtoString()
-
-
-
Method Detail
-
invokeChecked
public <R> R invokeChecked(Object target, Object... args) throws Exception
- Throws:
Exception
-
bind
public DynMethods.BoundMethod bind(Object receiver)
Returns this method as a BoundMethod for the given receiver.- Parameters:
receiver- an Object to receive the method invocation- Returns:
- a
DynMethods.BoundMethodfor 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
public DynMethods.StaticMethod asStatic()
Returns this method as a StaticMethod.- Returns:
- a
DynMethods.StaticMethodfor this method - Throws:
IllegalStateException- if the method is not static
-
-