private Snitch(Configuration config) throws Exception {
AnnotationScanner annotationScanner;
List<String> packagesToScan = config.getPackagesToScan();
if (packagesToScan != null && !packagesToScan.isEmpty()) {
String[] packages = packagesToScan.toArray(new String[packagesToScan.size()]);
annotationScanner = new ClassPathAnnotationScanner(packages);
} else {
annotationScanner = new ClassPathAnnotationScanner();
}
Class<? extends Annotation> annotationClass = loadAnnotationClass(config);
NamingStrategy<? extends Annotation> namingStrategy = loadNamingStrategy(config);
_variableRegistry = new VariableRegistry(annotationClass, annotationScanner, namingStrategy);