Package org.reflections.serializers
Class JsonSerializer
- java.lang.Object
-
- org.reflections.serializers.JsonSerializer
-
- All Implemented Interfaces:
Serializer
public class JsonSerializer extends Object implements Serializer
json serialization forReflections
an example of produced json:reflections.save(file, new JsonSerializer())
{ "store": { "SubTypes": { "org.reflections.TestModel$C1": [ "org.reflections.TestModel$C2", "org.reflections.TestModel$C3" ] }, "TypesAnnotated": { "org.reflections.TestModel$AC2": [ "org.reflections.TestModel$C2", "org.reflections.TestModel$C3" ] } } }
-
-
Constructor Summary
Constructors Constructor Description JsonSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Reflections
read(InputStream inputStream)
reads the input stream into a new Reflections instance, populating it's storeFile
save(Reflections reflections, String filename)
saves a Reflections instance into the given filename
-
-
-
Method Detail
-
read
public Reflections read(InputStream inputStream)
Description copied from interface:Serializer
reads the input stream into a new Reflections instance, populating it's store- Specified by:
read
in interfaceSerializer
-
save
public File save(Reflections reflections, String filename)
Description copied from interface:Serializer
saves a Reflections instance into the given filename- Specified by:
save
in interfaceSerializer
-
-