Class ImagePlatform

java.lang.Object
org.springframework.boot.buildpack.platform.docker.ImagePlatform

public class ImagePlatform extends Object
A platform specification for a Docker image.
Since:
4.0.0
Author:
Scott Frederick
  • Method Details

    • equals

      public boolean equals(@Nullable Object obj)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object
    • of

      public static ImagePlatform of(String value)
      Create a new ImagePlatform from the given value in the form os[/architecture[/variant]].
      Parameters:
      value - the value to parse
      Returns:
      an ImagePlatform instance
    • from

      public static ImagePlatform from(Image image)
      Create a new ImagePlatform matching the platform information from the provided Image.
      Parameters:
      image - the image to get platform information from
      Returns:
      an ImagePlatform instance
    • toJson

      public String toJson()
      Return a JSON-encoded representation of this platform.
      Returns:
      the JSON string