private PropertyDescriptor getPropertyDescriptor(HintContainer deepIndexHintContainer) { if (pd == null) { pd = ReflectionUtils.findPropertyDescriptor(clazz, fieldName, deepIndexHintContainer); if (pd == null) { MappingUtils.throwMappingException("Property: '" + fieldName + "' not found in Class: " + clazz); } } return pd; }
private PropertyDescriptor getPropertyDescriptor(HintContainer deepIndexHintContainer) { if (pd == null) { pd = ReflectionUtils.findPropertyDescriptor(clazz, fieldName, deepIndexHintContainer); if (pd == null) { MappingUtils.throwMappingException("Property: " + fieldName + " not found in Class: " + clazz); } } return pd; }
private PropertyDescriptor getPropertyDescriptor(HintContainer deepIndexHintContainer) { if (pd == null) { pd = ReflectionUtils.findPropertyDescriptor(clazz, fieldName, deepIndexHintContainer); if (pd == null) { MappingUtils.throwMappingException("Property: " + fieldName + " not found in Class: " + clazz); } } return pd; }
PropertyDescriptor propDescriptor = findPropertyDescriptor(latestClass, theFieldName, deepIndexHintContainer); DeepHierarchyElement r = new DeepHierarchyElement(propDescriptor, collectionIndex);
PropertyDescriptor propDescriptor = findPropertyDescriptor(latestClass, theFieldName, deepIndexHintContainer);
PropertyDescriptor propDescriptor = findPropertyDescriptor(latestClass, theFieldName, deepIndexHintContainer);
public boolean apply(ClassMap classMap, Configuration configuration) { Class<?> srcClass = classMap.getSrcClassToMap(); Class<?> destClass = classMap.getDestClassToMap(); PropertyDescriptor[] destProperties = ReflectionUtils.getPropertyDescriptors(destClass); for (PropertyDescriptor destPropertyDescriptor : destProperties) { String fieldName = destPropertyDescriptor.getName(); if (shouldIgnoreField(fieldName, srcClass, destClass)) { continue; } // If field has already been accounted for, then skip if (classMap.getFieldMapUsingDest(fieldName) != null || classMap .getFieldMapUsingSrc(fieldName) != null) { continue; } // If destination field does not have a write method, then skip if (destPropertyDescriptor.getWriteMethod() == null) { continue; } PropertyDescriptor srcProperty = ReflectionUtils.findPropertyDescriptor(srcClass, fieldName, null); // If the sourceProperty is null we know that there is not a // corresponding property to map to. // If source property does not have a read method, then skip if (srcProperty == null || srcProperty.getReadMethod() == null) { continue; } addGenericMapping(classMap, configuration, fieldName, fieldName); } return false; }
ReflectionUtils.findPropertyDescriptor(classMap.getSrcClassToMap(), "", null); ReflectionUtils.findPropertyDescriptor(classMap.getDestClassToMap(), "", null);
ReflectionUtils.findPropertyDescriptor(classMap.getSrcClassToMap(), "", null); ReflectionUtils.findPropertyDescriptor(classMap.getDestClassToMap(), "", null);
ReflectionUtils.findPropertyDescriptor(classMap.getSrcClassToMap(), "", null); ReflectionUtils.findPropertyDescriptor(classMap.getDestClassToMap(), "", null);