Package land.oras

Class Ref<T extends Ref<T>>

java.lang.Object
land.oras.Ref<T>
Type Parameters:
T - The type of the ref
Direct Known Subclasses:
ContainerRef, LayoutRef

@NullMarked public abstract sealed class Ref<T extends Ref<T>> extends Object permits ContainerRef, LayoutRef
A referer of a container on a OCI.
  • Field Details

    • tag

      protected final @Nullable String tag
      The tag of the container.
  • Constructor Details

    • Ref

      protected Ref(String tag)
      Default constructor
  • Method Details

    • getTag

      public @Nullable String getTag()
      Get the tag
      Returns:
      The tag
    • withDigest

      public abstract T withDigest(String digest)
      Return the ref with the digest
      Parameters:
      digest - The digest
      Returns:
      The ref
    • getAlgorithm

      public abstract SupportedAlgorithm getAlgorithm()
      Get the algorithm
      Returns:
      The algorithm
    • getRepository

      public abstract String getRepository()
      Get the repository where to find the ref
      Returns:
      The repository