public final class Serializer extends Object
In order to transfer the information from the plugin to the reporting plugin, the data is serialized to disk. This also allows developers to deserialize the object and use the information in other plugins.
Constructor and Description |
---|
Serializer(org.apache.maven.project.MavenProject project)
Creates a new Serializer object.
|
Modifier and Type | Method and Description |
---|---|
ResultVO |
deserialize()
Deserialized the ResultVO from disk (the location is determined in the constructor).
|
void |
serialize(ResultVO result)
Serialized the ResultVO to disk (the location is determined in the constructor).
|
void |
textOutput(String fileName,
String stringOutput) |
public Serializer(org.apache.maven.project.MavenProject project) throws IOException
The directory where the object will be saved will also be created.
project
- a reference to the Maven project.IOException
- if failed to create the output directorypublic void serialize(ResultVO result) throws IOException
result
- the ResultVO to serialize.IOException
- if failed to serialize.public ResultVO deserialize() throws IOException, ClassNotFoundException
IOException
- if failed to deserialize.ClassNotFoundException
- if the ResultVO is not found on the classpath (should never occur).public void textOutput(String fileName, String stringOutput) throws IOException
IOException
Copyright © 2012-2013. All Rights Reserved.