Class SingularPendingReference

java.lang.Object
cz.cvut.kbss.jsonld.deserialization.reference.SingularPendingReference
All Implemented Interfaces:
PendingReference

public final class SingularPendingReference extends Object implements PendingReference
Represents a singular pending reference.

That is, a singular attribute referencing an object.

  • Constructor Details

    • SingularPendingReference

      public SingularPendingReference(Object targetObject, Field targetField)
  • Method Details

    • apply

      public void apply(Object referencedObject)
      Description copied from interface: PendingReference
      Applies the specified referenced object to this pending reference, resolving it.

      Resolving the reference basically means inserting the referenced object into the place represented by this instance (e.g., field value, collection).

      Specified by:
      apply in interface PendingReference
      Parameters:
      referencedObject - The object referenced by this pending reference
    • getTargetType

      public Optional<Class<?>> getTargetType()
      Description copied from interface: PendingReference
      Gets the target type of the pending reference.

      If the target type cannot be reliably determined (for instance, because it is a collection), this method should return Optional.empty().

      Specified by:
      getTargetType in interface PendingReference
      Returns:
      The target type
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object