Package org.apache.iceberg.common
Class DynFields.UnboundField<T>
- java.lang.Object
-
- org.apache.iceberg.common.DynFields.UnboundField<T>
-
- Enclosing class:
- DynFields
public static class DynFields.UnboundField<T> extends java.lang.Object
Convenience wrapper class aroundField
. 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 DynFields.StaticField<T>
asStatic()
Returns this field as a StaticField.DynFields.BoundField<T>
bind(java.lang.Object target)
Returns this method as a BoundMethod for the given receiver.T
get(java.lang.Object target)
boolean
isAlwaysNull()
Returns whether the field is always null.boolean
isStatic()
Returns whether the field is a static field.void
set(java.lang.Object target, T value)
java.lang.String
toString()
-
-
-
Method Detail
-
get
public T get(java.lang.Object target)
-
set
public void set(java.lang.Object target, T value)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
bind
public DynFields.BoundField<T> bind(java.lang.Object target)
Returns this method as a BoundMethod for the given receiver.- Parameters:
target
- an Object on which to get or set this field- Returns:
- a
DynFields.BoundField
for this field and the target - Throws:
java.lang.IllegalStateException
- if the method is staticjava.lang.IllegalArgumentException
- if the receiver's class is incompatible
-
asStatic
public DynFields.StaticField<T> asStatic()
Returns this field as a StaticField.- Returns:
- a
DynFields.StaticField
for this field - Throws:
java.lang.IllegalStateException
- if the method is not static
-
isStatic
public boolean isStatic()
Returns whether the field is a static field.
-
isAlwaysNull
public boolean isAlwaysNull()
Returns whether the field is always null.
-
-