Class DynFields.UnboundField<T>

  • Enclosing class:
    DynFields

    public static class DynFields.UnboundField<T>
    extends java.lang.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 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 class java.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 static
        java.lang.IllegalArgumentException - if the receiver's class is incompatible
      • isStatic

        public boolean isStatic()
        Returns:
        whether the field is a static field
      • isAlwaysNull

        public boolean isAlwaysNull()
        Returns:
        whether the field is always null