Class EffectSerializationFactory
-
- All Implemented Interfaces:
@Deprecated() public final class EffectSerializationFactory
Serialize Alchemist effects from/to file in human readable format.
-
-
Method Summary
Modifier and Type Method Description static List<Effect>
effectsFromFile(File effectFile)
Get a list of effects from the specified file. static void
effectToFile(File effectFile, Effect effect)
Write the given effect to the destination file. static void
effectsToFile(File effectFile, List<Effect> effects)
Write the given effects to the destination file. -
-
Method Detail
-
effectsFromFile
static List<Effect> effectsFromFile(File effectFile)
Get a list of effects from the specified file. Try to deserialize a JSON file at first. If this operation is not successful (for the sake of backward compatibility) try to deserialize a binary file.
- Parameters:
effectFile
- Source file
-
effectToFile
static void effectToFile(File effectFile, Effect effect)
Write the given effect to the destination file.
- Parameters:
effectFile
- Destination fileeffect
- Effect
-
effectsToFile
static void effectsToFile(File effectFile, List<Effect> effects)
Write the given effects to the destination file.
- Parameters:
effectFile
- Destination fileeffects
- List of effects
-
-
-
-