Interface IFeatureJavaField

All Superinterfaces:
dev.metaschema.core.model.IDefaultable, dev.metaschema.core.model.IValued, IValuedMutable
All Known Subinterfaces:
IBoundFieldValue, IBoundInstance<ITEM>, IBoundInstanceFlag, IBoundInstanceModel<ITEM>, IBoundInstanceModelAssembly, IBoundInstanceModelChoiceGroup, IBoundInstanceModelField<ITEM>, IBoundInstanceModelFieldComplex, IBoundInstanceModelFieldScalar, IBoundInstanceModelNamed<ITEM>, IBoundProperty<ITEM>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

Provides access to a Java field that is bound to a Metaschema instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the bound Java field associated with this instance.
    default Class<?>
    Get the item type of the bound object.
    default Type
    Get the actual Java type of the underlying bound object.
    default Object
    getValue(Object parent)
     
    default void
    setValue(Object parentObject, Object value)
    Set the provided value on the provided object.

    Methods inherited from interface dev.metaschema.core.model.IDefaultable

    getDefaultValue, getEffectiveDefaultValue, getResolvedDefaultValue
  • Method Details

    • getField

      @NonNull Field getField()
      Gets the bound Java field associated with this instance.
      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 parent)
      Specified by:
      getValue in interface dev.metaschema.core.model.IValued
    • setValue

      default void setValue(@NonNull Object parentObject, Object value)
      Description copied from interface: IValuedMutable
      Set the provided value on the provided object. The provided object must be of the item's type associated with this instance.
      Specified by:
      setValue in interface IValuedMutable
      Parameters:
      parentObject - the object
      value - a value, which may be a simple Type or a ParameterizedType for a collection