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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract TReturn a container ref for the target repositoryabstract TReturn a container ref for the target repositoryabstract SupportedAlgorithmGet the algorithmabstract StringGet the repository where to find the ref@Nullable StringgetTag()Get the tagabstract StringGet the target repository for the refabstract TwithDigest(String digest) Return the ref with the digest
-
Field Details
-
tag
The tag of the container.
-
-
Constructor Details
-
Ref
Constructor- Parameters:
tag- The tag
-
-
Method Details
-
getTag
Get the tag- Returns:
- The tag
-
withDigest
Return the ref with the digest- Parameters:
digest- The digest- Returns:
- The ref
-
getAlgorithm
Get the algorithm- Returns:
- The algorithm
-
getRepository
Get the repository where to find the ref- Returns:
- The repository
-
forTarget
Return a container ref for the target repository- Parameters:
target- The target repository- Returns:
- The container ref
-
forTarget
Return a container ref for the target repository- Parameters:
target- The target repository- Returns:
- The container ref
-
getTarget
Get the target repository for the ref- Parameters:
target- The target repository- Returns:
- The target repository
-