for (int i = 0; i < fields.length; ++i) {
FieldDescriptor field = fields[i];
ClassDescriptor desc = getDescriptor(field.getFieldType().getName());
// Resolve ClassDescriptor from the file system as well.
if (desc == null && !field.getFieldType().isPrimitive()) {
ClassResolutionByFile resolutionCommand = new ClassResolutionByFile();
resolutionCommand.addNature(ClassLoaderNature.class.getName());
ClassLoaderNature clNature = new ClassLoaderNature(
resolutionCommand);
clNature.setClassLoader(getClassLoader());
desc = resolutionCommand.resolve(field.getFieldType());
((FieldDescriptorImpl) field).setClassDescriptor(desc);
}
if ((desc != null) && (field instanceof FieldDescriptorImpl)) {
((FieldDescriptorImpl) field).setClassDescriptor(desc);
}