|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NSKeyValueCoding
NSKeyValueCoding defines an interface for classes that
need to have more control over the wotonomy's property
introspection facilities.
On an object that implements this interface, wotonomy
will call these methods, and otherwise use the static
methods on NSKeyValueCodingSupport.
NSKeyValueCodingSupport implements the default behaviors
for each of these methods, so classes implementing this
interface can call those methods to acheive the same
behavior.
valueForKey and takeValueForKey are called in response
to user actions, like viewing an object or updating its
value in a user interface. These should call the public
getter and setter methods on the object itself and the
operations should be subject to validation.
storedValueForKey and takeStoredValueForKey are called
in response to wotonomy actions, like snapshotting,
faulting, commits, and reverts. These operations should
bypass the public methods and directly modify the internal
state of the object without validation.
Nested Class Summary | |
---|---|
static class |
NSKeyValueCoding.DefaultImplementation
|
static class |
NSKeyValueCoding.Null
|
static class |
NSKeyValueCoding.Utility
Static utility methods that call the appropriate method if the object implements NSKeyValueCoding, otherwise calls the method on DefaultImplementation. |
Field Summary | |
---|---|
static NSKeyValueCoding.Null |
NullValue
|
Method Summary | |
---|---|
java.lang.Object |
handleQueryWithUnboundKey(java.lang.String aKey)
Called by valueForKey when the specified key is not found on this object. |
void |
handleTakeValueForUnboundKey(java.lang.Object aValue,
java.lang.String aKey)
Called by takeValueForKey when the specified key is not found on this object. |
java.lang.Object |
storedValueForKey(java.lang.String aKey)
Returns the value for the private field that corresponds to the specified property. |
void |
takeStoredValueForKey(java.lang.Object aValue,
java.lang.String aKey)
Sets the the private field that corresponds to the specified property to the specified value. |
void |
takeValueForKey(java.lang.Object aValue,
java.lang.String aKey)
Sets the property to the specified value. |
void |
unableToSetNullForKey(java.lang.String aKey)
Called by takeValueForKey when the type of the specified key is not allowed to be null, as is the case with primitive types. |
java.lang.Object |
valueForKey(java.lang.String aKey)
Returns the value for the specified property. |
Field Detail |
---|
static final NSKeyValueCoding.Null NullValue
Method Detail |
---|
java.lang.Object valueForKey(java.lang.String aKey)
void takeValueForKey(java.lang.Object aValue, java.lang.String aKey)
java.lang.Object storedValueForKey(java.lang.String aKey)
void takeStoredValueForKey(java.lang.Object aValue, java.lang.String aKey)
java.lang.Object handleQueryWithUnboundKey(java.lang.String aKey)
void handleTakeValueForUnboundKey(java.lang.Object aValue, java.lang.String aKey)
void unableToSetNullForKey(java.lang.String aKey)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |