for(Field field : fields) {
Class<?> type = field.getType();
Class<? extends DataDecoder> decoder = DataDecoder.Factory.getInstance(type);
if(decoder != null) {
bindings.add(new BindingConfig(field));
} else {
if(type.isArray()) {
addArrayConfig(classConfigs, bindings, rootPackage, field);
} else if(Collection.class.isAssignableFrom(type)) {
addCollectionConfig(classConfigs, bindings, rootPackage, field);
} else {
String typePackage = type.getPackage().getName();
if(isExcluded(typePackage)) {
continue;
} else if(typePackage.startsWith(rootPackage) || isIncluded(typePackage)) {
bindings.add(new BindingConfig(field, field.getName()));
addClassConfig(classConfigs, type, field.getName());
}
}
}
}