Class ImageToJsonTranslator
- java.lang.Object
-
- com.google.cloud.tools.jib.image.json.ImageToJsonTranslator
-
public class ImageToJsonTranslator extends java.lang.Object
Translates anImage
into a manifest or container configuration JSON.
-
-
Constructor Summary
Constructors Constructor Description ImageToJsonTranslator(Image image)
Instantiate with anImage
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonTemplate
getContainerConfiguration()
Gets the container configuration.<T extends BuildableManifestTemplate>
TgetManifestTemplate(java.lang.Class<T> manifestTemplateClass, BlobDescriptor containerConfigurationBlobDescriptor)
Gets the manifest as a JSON template.
-
-
-
Method Detail
-
getContainerConfiguration
public JsonTemplate getContainerConfiguration()
Gets the container configuration.- Returns:
- the container configuration
-
getManifestTemplate
public <T extends BuildableManifestTemplate> T getManifestTemplate(java.lang.Class<T> manifestTemplateClass, BlobDescriptor containerConfigurationBlobDescriptor)
Gets the manifest as a JSON template. ThecontainerConfigurationBlobDescriptor
must be theBlobDescriptor
obtained by writing out the container configuration JSON returned fromgetContainerConfiguration()
.- Type Parameters:
T
- child type ofBuildableManifestTemplate
.- Parameters:
manifestTemplateClass
- the JSON template to translate the image to.containerConfigurationBlobDescriptor
- the container configuration descriptor.- Returns:
- the image contents serialized as JSON.
-
-