public boolean isScratch() {
    return "".equals(registry)
        && SCRATCH.equals(repository)
        && Strings.isNullOrEmpty(tag)
        && Strings.isNullOrEmpty(digest);
  }
Returns {@code true} if the {@link ImageReference} is a scratch image; {@code false} if not.

@return {@code true} if the {@link ImageReference} is a scratch image; {@code false} if not
jib-core/src/main/java/com/google/cloud/tools/jib/api/ImageReference.java