Class Reference

java.lang.Object
com.adobe.granite.references.Reference
Direct Known Subclasses:
ContentReference, LinkReference

@ConsumerType public class Reference extends Object
A Reference represents a reference to the Resource backing the ReferenceList. References can only be retrieved via a ReferenceList. Each reference has a reference type. The types available are defined by the ReferenceProviders registered in the system and may vary.
Since:
1.0
  • Constructor Details

  • Method Details

    • getSource

      public Resource getSource()
      Returns the source resource for which the references have been retrieved through the ReferenceProvider.
      Returns:
      The source resource.
    • getTarget

      public Resource getTarget()
      Returns the target resource of the reference, i.e. one of the results retrieved by the ReferenceProvider.
      Returns:
      The target resource.
    • getType

      public String getType()
      Returns the reference type of this reference.
      Returns:
      The reference type.
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object