Package org.reflections.serializers
Class JsonSerializer
java.lang.Object
org.reflections.serializers.JsonSerializer
- All Implemented Interfaces:
Serializer
serialization of Reflections to json
an example of produced json:
{"store":{"storeMap":
{"org.reflections.scanners.TypeAnnotationsScanner":{
"org.reflections.TestModel$AC1":["org.reflections.TestModel$C1"],
"org.reflections.TestModel$AC2":["org.reflections.TestModel$I3",
...
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate com.google.gson.GsongetGson()read(InputStream inputStream) reads the input stream into a new Reflections instance, populating it's storesave(Reflections reflections, String filename) saves a Reflections instance into the given filenametoString(Reflections reflections) returns a string serialization of the given Reflections instance
-
Field Details
-
gson
private com.google.gson.Gson gson
-
-
Constructor Details
-
JsonSerializer
public JsonSerializer()
-
-
Method Details
-
read
Description copied from interface:Serializerreads the input stream into a new Reflections instance, populating it's store- Specified by:
readin interfaceSerializer
-
save
Description copied from interface:Serializersaves a Reflections instance into the given filename- Specified by:
savein interfaceSerializer
-
toString
Description copied from interface:Serializerreturns a string serialization of the given Reflections instance- Specified by:
toStringin interfaceSerializer
-
getGson
private com.google.gson.Gson getGson()
-