bindingStorage = new _BindingStorage();
_bindingStorageMapTable.setObjectForKey(bindingStorage, lookupBinding);
}
// MS: We just can't support callbacks without the original object
// ... I think this is PROBABLY OK for our purposes.
Callback keyBindingCreationCallbackObject = null;
// (object instanceof Callback) ? (Callback) object : null;
_KeyBinding keyBindings[] = trueForSetAndFalseForGet ? bindingStorage._keySetBindings : bindingStorage._keyGetBindings;
for (int i = 0; i < lookupOrder.length; i++) {
int lookup = lookupOrder[i];
_KeyBinding keyBinding = lookup < 0 || lookup > 3 ? null : keyBindings[lookup];
if (keyBinding == null) {
switch (lookup) {
case 0:
StringBuilder methodNameBuffer = new StringBuilder(key.length() + 3);
methodNameBuffer.append(trueForSetAndFalseForGet ? "set" : "get");
methodNameBuffer.append(Character.toUpperCase(key.charAt(0)));
methodNameBuffer.append(key.substring(1));
String methodName = methodNameBuffer.toString();
if (trueForSetAndFalseForGet) {
keyBinding = keyBindingCreationCallbackObject == null ? _methodKeySetBinding(objectClass, key, methodName) : keyBindingCreationCallbackObject._methodKeySetBinding(key, methodName);
}
else {
keyBinding = keyBindingCreationCallbackObject == null ? _methodKeyGetBinding(objectClass, key, methodName) : keyBindingCreationCallbackObject._methodKeyGetBinding(key, methodName);
if (keyBinding == null) {
keyBinding = keyBindingCreationCallbackObject == null ? _methodKeyGetBinding(objectClass, key, key) : keyBindingCreationCallbackObject._methodKeyGetBinding(key, key);
}
if (keyBinding == null) {
methodNameBuffer.setLength(0);
methodNameBuffer.append("is");
methodNameBuffer.append(Character.toUpperCase(key.charAt(0)));
methodNameBuffer.append(key.substring(1));
methodName = methodNameBuffer.toString();
keyBinding = keyBindingCreationCallbackObject == null ? _methodKeyGetBinding(objectClass, key, methodName) : keyBindingCreationCallbackObject._methodKeyGetBinding(key, methodName);
}
}
break;
case 1:
StringBuilder underbarMethodNameBuffer = new StringBuilder(key.length() + 4);
underbarMethodNameBuffer.append(trueForSetAndFalseForGet ? "_set" : "_get");
underbarMethodNameBuffer.append(Character.toUpperCase(key.charAt(0)));
underbarMethodNameBuffer.append(key.substring(1));
String underbarMethodName = underbarMethodNameBuffer.toString();
if (trueForSetAndFalseForGet) {
keyBinding = keyBindingCreationCallbackObject == null ? _methodKeySetBinding(objectClass, key, underbarMethodName) : keyBindingCreationCallbackObject._methodKeySetBinding(key, underbarMethodName);
}
else {
keyBinding = keyBindingCreationCallbackObject == null ? _methodKeyGetBinding(objectClass, key, underbarMethodName) : keyBindingCreationCallbackObject._methodKeyGetBinding(key, underbarMethodName);
if (keyBinding == null) {
underbarMethodNameBuffer.setLength(0);
underbarMethodNameBuffer.append('_');
underbarMethodNameBuffer.append(key);
underbarMethodName = underbarMethodNameBuffer.toString();
keyBinding = keyBindingCreationCallbackObject == null ? _methodKeyGetBinding(objectClass, key, underbarMethodName) : keyBindingCreationCallbackObject._methodKeyGetBinding(key, underbarMethodName);
}
if (keyBinding == null) {
underbarMethodNameBuffer.setLength(0);
underbarMethodNameBuffer.append("_is");
underbarMethodNameBuffer.append(Character.toUpperCase(key.charAt(0)));
underbarMethodNameBuffer.append(key.substring(1));
underbarMethodName = underbarMethodNameBuffer.toString();
keyBinding = keyBindingCreationCallbackObject == null ? _methodKeyGetBinding(objectClass, key, underbarMethodName) : keyBindingCreationCallbackObject._methodKeyGetBinding(key, underbarMethodName);
}
}
break;
case 2:
if (!canAccessFieldsDirectlyTestPerformed) {
canAccessFieldsDirectlyTestPerformed = true;
canAccessFieldsDirectly = NSKeyValueCoding._ReflectionKeyBindingCreation._canAccessFieldsDirectlyForClass(objectClass);
}
if (canAccessFieldsDirectly) {
keyBinding = keyBindingCreationCallbackObject == null ? _fieldKeyBinding(objectClass, key, key) : keyBindingCreationCallbackObject._fieldKeyBinding(key, key);
if (keyBinding == null) {
StringBuilder fieldNameBuffer = new StringBuilder(key.length() + 2);
fieldNameBuffer.append("is");
fieldNameBuffer.append(Character.toUpperCase(key.charAt(0)));
fieldNameBuffer.append(key.substring(1));
String fieldName = fieldNameBuffer.toString();
keyBinding = keyBindingCreationCallbackObject == null ? _fieldKeyBinding(objectClass, key, fieldName) : keyBindingCreationCallbackObject._fieldKeyBinding(key, fieldName);
}
}
break;
case 3:
if (!canAccessFieldsDirectlyTestPerformed) {
canAccessFieldsDirectlyTestPerformed = true;
canAccessFieldsDirectly = NSKeyValueCoding._ReflectionKeyBindingCreation._canAccessFieldsDirectlyForClass(objectClass);
}
if (canAccessFieldsDirectly) {
StringBuilder underbarFieldNameBuffer = new StringBuilder(key.length() + 3);
underbarFieldNameBuffer.append('_');
underbarFieldNameBuffer.append(key);
String underbarFieldName = underbarFieldNameBuffer.toString();
keyBinding = keyBindingCreationCallbackObject == null ? _fieldKeyBinding(objectClass, key, underbarFieldName) : keyBindingCreationCallbackObject._fieldKeyBinding(key, underbarFieldName);
if (keyBinding == null) {
underbarFieldNameBuffer.setLength(0);
underbarFieldNameBuffer.append("_is");
underbarFieldNameBuffer.append(Character.toUpperCase(key.charAt(0)));
underbarFieldNameBuffer.append(key.substring(1));
underbarFieldName = underbarFieldNameBuffer.toString();
keyBinding = keyBindingCreationCallbackObject == null ? _fieldKeyBinding(objectClass, key, underbarFieldName) : keyBindingCreationCallbackObject._fieldKeyBinding(key, underbarFieldName);
}
}
break;
case 4:
keyBinding = keyBindingCreationCallbackObject == null ? null : keyBindingCreationCallbackObject._otherStorageBinding(key);
break;
}
if (keyBinding == null) {
keyBinding = _NotAvailableIndicator;
}