public class JsonSerializer extends java.lang.Object implements Serializer
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", ...
Modifier and Type | Field and Description |
---|---|
private com.google.gson.Gson |
gson |
Constructor and Description |
---|
JsonSerializer() |
Modifier and Type | Method and Description |
---|---|
private com.google.gson.Gson |
getGson() |
Reflections |
read(java.io.InputStream inputStream)
reads the input stream into a new Reflections instance, populating it's store
|
java.io.File |
save(Reflections reflections,
java.lang.String filename)
saves a Reflections instance into the given filename
|
java.lang.String |
toString(Reflections reflections)
returns a string serialization of the given Reflections instance
|
public Reflections read(java.io.InputStream inputStream)
Serializer
read
in interface Serializer
public java.io.File save(Reflections reflections, java.lang.String filename)
Serializer
save
in interface Serializer
public java.lang.String toString(Reflections reflections)
Serializer
toString
in interface Serializer
private com.google.gson.Gson getGson()