Class ApplicationModelSerializer

java.lang.Object
io.quarkus.bootstrap.app.ApplicationModelSerializer

public class ApplicationModelSerializer extends Object
Utility class providing various serializing and deserializing methods for ApplicationModel
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.quarkus.bootstrap.model.ApplicationModel
    Deserializes an ApplicationModel from a given file.
    static void
    exportGradleModel(io.quarkus.bootstrap.model.ApplicationModel model, boolean test)
    Serializes an ApplicationModel to a file and sets a system property BootstrapConstants.SERIALIZED_TEST_APP_MODEL to the value of the file path the model was serialized in.
    static Path
    serialize(io.quarkus.bootstrap.model.ApplicationModel model, boolean test)
    Serializes an ApplicationModel and returns a path to the file in which the application model was serialized.
    static void
    serialize(io.quarkus.bootstrap.model.ApplicationModel appModel, Path file)
    Serializes an ApplicationModel to a file.
    static Path
    serializeGradleModel(io.quarkus.bootstrap.model.ApplicationModel model, boolean test)
    Serializes an ApplicationModel and returns a path to the file in which the application model was serialized.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ApplicationModelSerializer

      public ApplicationModelSerializer()
  • Method Details

    • exportGradleModel

      public static void exportGradleModel(io.quarkus.bootstrap.model.ApplicationModel model, boolean test) throws IOException
      Serializes an ApplicationModel to a file and sets a system property BootstrapConstants.SERIALIZED_TEST_APP_MODEL to the value of the file path the model was serialized in.

      This method will make sure the serialization will work for Gradle proxies of ApplicationModel.

      Parameters:
      model - application model to serialize
      test - whether it's a test application model
      Throws:
      IOException - in case of a failure
    • serializeGradleModel

      public static Path serializeGradleModel(io.quarkus.bootstrap.model.ApplicationModel model, boolean test) throws IOException
      Serializes an ApplicationModel and returns a path to the file in which the application model was serialized.

      This method will make sure the serialization will work for Gradle proxies of ApplicationModel.

      Parameters:
      model - application model to serialize
      test - whether it's a test application model
      Returns:
      file in which the application model was serialized
      Throws:
      IOException - in case of a failure
    • serialize

      public static Path serialize(io.quarkus.bootstrap.model.ApplicationModel model, boolean test) throws IOException
      Serializes an ApplicationModel and returns a path to the file in which the application model was serialized.
      Parameters:
      model - application model to serialize
      test - whether it's a test application model
      Returns:
      file in which the application model was serialized
      Throws:
      IOException - in case of a failure
    • serialize

      public static void serialize(io.quarkus.bootstrap.model.ApplicationModel appModel, Path file) throws IOException
      Serializes an ApplicationModel to a file.
      Parameters:
      appModel - application model to serialize
      file - target file
      Throws:
      IOException - in case of a failure
    • deserialize

      public static io.quarkus.bootstrap.model.ApplicationModel deserialize(Path file) throws IOException
      Deserializes an ApplicationModel from a given file.
      Parameters:
      file - file to deserialize the application model from
      Returns:
      deserialized application model
      Throws:
      IOException - in case of a failure