if (!(object instanceof PropertyDetails))
{
throw new IllegalStateException(object.getClass() + " is not a " + PropertyDetails.class.getName());
}
PropertyDetails propertyDetails = (PropertyDetails)object;
Class entityClass = ProxyUtils.getUnproxiedClass(propertyDetails.getBaseObject().getClass());
//TODO test with complex components
propertyInformation.setInformation(
PropertyInformationKeys.PROPERTY_DETAILS, propertyDetails);
/*
* find and add annotations
*/
PropertyStorage storage = ReflectionUtils.getPropertyStorage();
addPropertyAccessAnnotations(storage, entityClass, propertyDetails.getProperty(), propertyInformation);
addFieldAccessAnnotations(storage, entityClass, propertyDetails.getProperty(), propertyInformation);
return propertyInformation;
}