Class DynFields.UnboundField<T>

java.lang.Object
org.apache.iceberg.common.DynFields.UnboundField<T>
Enclosing class:
DynFields

public static class DynFields.UnboundField<T> extends Object
Convenience wrapper class around Field.

Allows callers to invoke the wrapped method with all Exceptions wrapped by RuntimeException, or with a single Exception catch block.

  • Method Details

    • get

      public T get(Object target)
      Returns the value of this field in the given object.
      Parameters:
      target - the object to read the field from
      Returns:
      the value of the field in the given object
    • set

      public void set(Object target, T value)
      Sets the value of this field in the given object.
      Parameters:
      target - the object to set the field in
      value - the value to set
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • bind

      public DynFields.BoundField<T> bind(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:
      IllegalStateException - if the method is static
      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:
      IllegalStateException - if the method is not static
    • isStatic

      public boolean isStatic()
      Returns whether the field is a static field.
      Returns:
      true if the field is static, false otherwise
    • isAlwaysNull

      public boolean isAlwaysNull()
      Returns whether the field is always null.
      Returns:
      true if the field is always null, false otherwise