
Static Public Member Functions | |
| static Object | classValueForKey (Class clazz, String key) |
| static Field | fieldForKey (Object target, String key) |
| static Method | methodForKey (Object target, String key) |
| static Object | privateValueForKey (Object target, String key) |
| static void | registerClass (Class clazz) |
| static NSArray< ERXKeyValuePair > | staticStringsForClass (Class c) |
| static void | takeChangedValuesFromDictionary (Object object, NSDictionary< String,?> dictionary) |
| static void | takePrivateValueForKey (Object target, Object value, String key) |
Static Public Attributes | |
| static final NSKeyValueCodingAdditions | Statics |
Static Private Member Functions | |
| static Field | accessibleFieldForKey (Object target, String key) |
| static Method | accessibleMethodForKey (Object target, String key) |
Static Private Attributes | |
| static Hashtable | _classes = new Hashtable() |
ERXKeyValueCodingUtilities.registerClass(SomeClass.class);
NSKeyValueCodingAdditions statics = ERXKeyValueCodingUtilities.Statics;
myValue = statics.valueForKeyPath("SomeClass.SOME_FIELD");
Also has utilities for getting and private fields and methods on an object.
| static Field accessibleFieldForKey | ( | Object | target, | |
| String | key | |||
| ) | [static, private] |
| static Method accessibleMethodForKey | ( | Object | target, | |
| String | key | |||
| ) | [static, private] |
| static Object classValueForKey | ( | Class | clazz, | |
| String | key | |||
| ) | [static] |
Extends key-value coding to a class. Java arrays and collections are morphed into NSArrays. The implementation is pretty slow, but I didn't exactly want to re-implement all of NSKeyValueCoding here.
| clazz | ||
| key |
| static Field fieldForKey | ( | Object | target, | |
| String | key | |||
| ) | [static] |
| static Method methodForKey | ( | Object | target, | |
| String | key | |||
| ) | [static] |
| static Object privateValueForKey | ( | Object | target, | |
| String | key | |||
| ) | [static] |
| static void registerClass | ( | Class | clazz | ) | [static] |
Registers the class in the KVC resolving system, so you can use valueForKeyPath("MyClass.SOME_KEY"). Inner classes are registered with a "$", i.e. MyClass$InnerClass
| clazz |
| static NSArray<ERXKeyValuePair> staticStringsForClass | ( | Class | c | ) | [static] |
Returns final strings constants from an interface or class. Useful in particular when you want to create selection lists from your interfaces automatically.
| c |
| static void takeChangedValuesFromDictionary | ( | Object | object, | |
| NSDictionary< String,?> | dictionary | |||
| ) | [static] |
* Works like takeValuesFromDictionary, except that it only calls takeValueForKey if the current value * is different than the new value. *
| object | the object on which to operate | |
| dictionary | the key-value pairs to set |
| static void takePrivateValueForKey | ( | Object | target, | |
| Object | value, | |||
| String | key | |||
| ) | [static] |
Hashtable _classes = new Hashtable() [static, private] |
final NSKeyValueCodingAdditions Statics [static] |
1.5.8