use of org.reflections.serializers.JavaCodeSerializer in project reflections by ronmamo.
the class JavaCodeSerializerTest method generateAndSave.
@BeforeClass
public static void generateAndSave() {
Predicate<String> filter = new FilterBuilder().include("org.reflections.TestModel\\$.*");
Reflections reflections = new Reflections(new ConfigurationBuilder().filterInputsBy(filter).setScanners(new TypeElementsScanner().includeFields().publicOnly(false)).setUrls(asList(ClasspathHelper.forClass(TestModel.class))));
//save
String filename = ReflectionsTest.getUserDir() + "/src/test/java/org.reflections.MyTestModelStore";
reflections.save(filename, new JavaCodeSerializer());
}
Aggregations