@Override
public boolean isValid(ConfigBeanProxy config, ConstraintValidatorContext cvc) throws UnexpectedTypeException {
if (config == null) {
return true;
}
Dom dom = Dom.unwrap(config);
if (rc.skipDuringCreation() && dom.getKey() == null) {
return true; //During creation the coresponding DOM is not fully loaded.
}
Collection<RemoteKeyInfo> remoteKeys = findRemoteKeys(config);
if (remoteKeys != null && !remoteKeys.isEmpty()) {
ServiceLocator habitat = dom.getHabitat();
boolean result = true;
boolean disableGlobalMessage = true;
for (RemoteKeyInfo remoteKeyInfo : remoteKeys) {
if (remoteKeyInfo.method.getParameterTypes().length > 0) {
throw new UnexpectedTypeException(localStrings.getLocalString("referenceValidator.not.getter",