net.wotonomy.foundation
Class NSKeyValueCoding.DefaultImplementation

java.lang.Object
  extended by net.wotonomy.foundation.NSKeyValueCoding.DefaultImplementation
Enclosing interface:
NSKeyValueCoding

public static class NSKeyValueCoding.DefaultImplementation
extends java.lang.Object


Constructor Summary
NSKeyValueCoding.DefaultImplementation()
           
 
Method Summary
static java.lang.Object handleQueryWithUnboundKey(java.lang.Object anObject, java.lang.String aKey)
          Called by valueForKey when the specified key is not found on the specified object, if that object does not implement NSKeyValueCoding.
static void handleTakeValueForUnboundKey(java.lang.Object anObject, java.lang.Object aValue, java.lang.String aKey)
          Called by takeValueForKey when the specified key is not found on the specified object, if that object does not implement NSKeyValueCoding.
static java.lang.Object storedValueForKey(java.lang.Object anObject, java.lang.String aKey)
          Returns the value for the private field that corresponds to the specified property on the specified object.
static void takeStoredValueForKey(java.lang.Object anObject, java.lang.Object aValue, java.lang.String aKey)
          Sets the the private field that corresponds to the specified property to the specified value on the specified object.
static void takeValueForKey(java.lang.Object anObject, java.lang.Object aValue, java.lang.String aKey)
          Sets the property to the specified value on the specified object.
static void unableToSetNullForKey(java.lang.Object anObject, 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, if the specified object does not implement NSKeyValueCoding.
static java.lang.Object valueForKey(java.lang.Object anObject, java.lang.String aKey)
          Returns the value for the specified property key on the specified object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NSKeyValueCoding.DefaultImplementation

public NSKeyValueCoding.DefaultImplementation()
Method Detail

valueForKey

public static java.lang.Object valueForKey(java.lang.Object anObject,
                                           java.lang.String aKey)
Returns the value for the specified property key on the specified object.

If the property does not exist, this method calls handleQueryWithUnboundKey on the object if it implements NSKeyValueCoding, otherwise calls handleQueryWithUnboundKey on this class.


takeValueForKey

public static void takeValueForKey(java.lang.Object anObject,
                                   java.lang.Object aValue,
                                   java.lang.String aKey)
Sets the property to the specified value on the specified object. If the property does not exist, this method calls handleTakeValueForUnboundKey on the object if it implements NSKeyValueCoding, otherwise calls handleTakeValueForUnboundKey on this class. If the property is of a type that cannot allow null (e.g. primitive types) and aValue is null, this method should call unableToSetNullForKey on the object if it implements NSKeyValueCoding, otherwise calls unableToSetNullForKey on this class.


storedValueForKey

public static java.lang.Object storedValueForKey(java.lang.Object anObject,
                                                 java.lang.String aKey)
Returns the value for the private field that corresponds to the specified property on the specified object. This implementation currently calls valueForKey, because java security currently prevents us from accessing the fields of another object.


takeStoredValueForKey

public static void takeStoredValueForKey(java.lang.Object anObject,
                                         java.lang.Object aValue,
                                         java.lang.String aKey)
Sets the the private field that corresponds to the specified property to the specified value on the specified object. This implementation currently calls takeValueForKey, because java security currently prevents us from accessing the fields of another object.


handleQueryWithUnboundKey

public static java.lang.Object handleQueryWithUnboundKey(java.lang.Object anObject,
                                                         java.lang.String aKey)
Called by valueForKey when the specified key is not found on the specified object, if that object does not implement NSKeyValueCoding. This implementation throws a WotonomyException.


handleTakeValueForUnboundKey

public static void handleTakeValueForUnboundKey(java.lang.Object anObject,
                                                java.lang.Object aValue,
                                                java.lang.String aKey)
Called by takeValueForKey when the specified key is not found on the specified object, if that object does not implement NSKeyValueCoding. This implementation throws a WotonomyException.


unableToSetNullForKey

public static void unableToSetNullForKey(java.lang.Object anObject,
                                         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, if the specified object does not implement NSKeyValueCoding. This implementation throws a WotonomyException.



Copyright © 2006 null. All Rights Reserved.