Package org.reflections.serializers
Class JsonSerializer
java.lang.Object
org.reflections.serializers.JsonSerializer
- All Implemented Interfaces:
Serializer
json serialization for
Reflections
reflections.save(file, new JsonSerializer())
an example of produced json:
{
"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 -
Method Summary
Modifier and TypeMethodDescriptionread
(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 filename
-
Constructor Details
-
JsonSerializer
public JsonSerializer()
-
-
Method Details
-
read
Description copied from interface:Serializer
reads the input stream into a new Reflections instance, populating it's store- Specified by:
read
in interfaceSerializer
-
save
Description copied from interface:Serializer
saves a Reflections instance into the given filename- Specified by:
save
in interfaceSerializer
-