public String getQualifier() {
    if (!Strings.isNullOrEmpty(digest)) {
      return digest;
    }
    return Preconditions.checkNotNull(tag);
  }
Gets the digest portion of the {@link ImageReference} if set, else returns the tag.

@return the digest if set, else the tag
jib-core/src/main/java/com/google/cloud/tools/jib/api/ImageReference.java