Interface IBoundNamedInstance

    • Method Detail

      • getField

        @NonNull
        Field getField()
        Gets the bound Java field associated with this property.
        Returns:
        the Java field
      • getType

        @NonNull
        default Type getType()
        Get the actual Java type of the underlying bound object.

        This may be the same as the what is returned by getItemType(), or may be a Java collection class.

        Returns:
        the raw type of the bound object
      • getItemType

        @NonNull
        default Class<?> getItemType()
        Get the item type of the bound object. An item type is the primitive or specialized type that represents that data associated with this binding.
        Returns:
        the item type of the bound object
      • getValue

        default Object getValue​(@NonNull
                                Object parentInstance)
        Get the current value from the provided parentInstance object. The provided object must be of the type associated with the definition containing this property.
        Specified by:
        getValue in interface INamedInstance
        Parameters:
        parentInstance - the object associated with the definition containing this property
        Returns:
        the value if available, or null otherwise
      • setValue

        default void setValue​(@NonNull
                              Object parentInstance,
                              Object value)
        Set the provided value on the provided object. The provided object must be of the item's type associated with this property.
        Parameters:
        parentInstance - the object
        value - a value, which may be a simple Type or a ParameterizedType for a collection
      • copyBoundObject

        void copyBoundObject​(@NonNull
                             Object fromInstance,
                             @NonNull
                             Object toInstance)
                      throws BindingException
        Copy this instance from one parent object to another.
        Parameters:
        fromInstance - the object to copy from
        toInstance - the object to copy to
        Throws:
        BindingException - if an error occurred while processing the object bindings