inspector
inspector copied to clipboard
Missing default support for GenerateValidator notation?
In the service provider interface: io.sweers.inspector.compiler.plugins.spi.InspectorExtension
, the default implement for Set<String> applicableAnnotations()
return a empty set, as effect, nothing will be generated for a simple pojo class with GenerateValidator
notation. Maybe it should be as follows better.
default Set<String> applicableAnnotations() {
return Collections.singleton("io.sweers.inspector.compiler.annotations.GenerateValidator");
// return Collections.emptySet();
}
or just add the GenerateValidator
's class path into the result of io.sweers.inspector.compiler.InspectorProcessor#getSupportedAnnotationTypes
umm...I forgot the Factory in GenerateValidator. maybe it's better to use dynamic generated instances of validator to validate simple pojo class's instance. it can minimize the size of the apk, is't it?
By the way, it's awesome to add a custom implement of InspectorExtension in the application to guide apt generating validator class.😊