Package io.quarkus.bootstrap.app
Class ApplicationModelSerializer
java.lang.Object
io.quarkus.bootstrap.app.ApplicationModelSerializer
Utility class providing various serializing and deserializing methods for
ApplicationModel-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic io.quarkus.bootstrap.model.ApplicationModeldeserialize(Path file) Deserializes anApplicationModelfrom a given file.static voidexportGradleModel(io.quarkus.bootstrap.model.ApplicationModel model, boolean test) Serializes anApplicationModelto a file and sets a system propertyBootstrapConstants.SERIALIZED_TEST_APP_MODELto the value of the file path the model was serialized in.static Pathserialize(io.quarkus.bootstrap.model.ApplicationModel model, boolean test) Serializes anApplicationModeland returns a path to the file in which the application model was serialized.static voidSerializes anApplicationModelto a file.static PathserializeGradleModel(io.quarkus.bootstrap.model.ApplicationModel model, boolean test) Serializes anApplicationModeland returns a path to the file in which the application model was serialized.
-
Constructor Details
-
ApplicationModelSerializer
public ApplicationModelSerializer()
-
-
Method Details
-
exportGradleModel
public static void exportGradleModel(io.quarkus.bootstrap.model.ApplicationModel model, boolean test) throws IOException Serializes anApplicationModelto a file and sets a system propertyBootstrapConstants.SERIALIZED_TEST_APP_MODELto the value of the file path the model was serialized in. This method will make sure the serialization will work for Gradle proxies ofApplicationModel.- Parameters:
model- application model to serializetest- 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 anApplicationModeland 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 ofApplicationModel.- Parameters:
model- application model to serializetest- 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 anApplicationModeland returns a path to the file in which the application model was serialized.- Parameters:
model- application model to serializetest- 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 anApplicationModelto a file.- Parameters:
appModel- application model to serializefile- target file- Throws:
IOException- in case of a failure
-
deserialize
Deserializes anApplicationModelfrom a given file.- Parameters:
file- file to deserialize the application model from- Returns:
- deserialized application model
- Throws:
IOException- in case of a failure
-