Package com.webobjects.foundation.NSKeyValueCoding

Examples of com.webobjects.foundation.NSKeyValueCoding._KeyBinding.valueType()


    assertFalse(kb.isScalarProperty());
    obj.byteObjectField = FORTY_TWO_BYTE;
    assertEquals(FORTY_TWO_BYTE, kb.valueInObject(obj));
   
    kb = DefaultImplementation._keyGetBindingForKey(obj, "byteField");
    assertEquals(Byte.TYPE, kb.valueType());
    assertTrue(kb.isScalarProperty());
    obj.byteField = FORTY_TWO_BYTE;
    assertEquals(FORTY_TWO_BYTE, kb.valueInObject(obj));
  }
 
View Full Code Here


 
  public void testDefaultImplementation$_keyGetBindingForKey$charField() {   
    KeyBindingTypeTest obj = new KeyBindingTypeTest();

    _KeyBinding kb = DefaultImplementation._keyGetBindingForKey(obj, "charObjectField");
    assertEquals(Character.class, kb.valueType());
    assertFalse(kb.isScalarProperty());
    obj.charObjectField = FORTY_TWO_CHAR;
    assertEquals(FORTY_TWO_CHAR, kb.valueInObject(obj));
   
    kb = DefaultImplementation._keyGetBindingForKey(obj, "charField");
View Full Code Here

    assertFalse(kb.isScalarProperty());
    obj.charObjectField = FORTY_TWO_CHAR;
    assertEquals(FORTY_TWO_CHAR, kb.valueInObject(obj));
   
    kb = DefaultImplementation._keyGetBindingForKey(obj, "charField");
    assertEquals(Character.TYPE, kb.valueType());
    assertTrue(kb.isScalarProperty());
    obj.charField = FORTY_TWO_CHAR;
    assertEquals(FORTY_TWO_CHAR, kb.valueInObject(obj));
  }
View Full Code Here

  public void testDefaultImplementation$_keyGetBindingForKey$shortField() {   
    KeyBindingTypeTest obj = new KeyBindingTypeTest();

    _KeyBinding kb = DefaultImplementation._keyGetBindingForKey(obj, "shortObjectField");
    assertEquals(Short.class, kb.valueType());
    assertFalse(kb.isScalarProperty());
    obj.shortObjectField = FORTY_TWO_SHORT;
    assertEquals(FORTY_TWO_SHORT, kb.valueInObject(obj));
   
    kb = DefaultImplementation._keyGetBindingForKey(obj, "shortField");
View Full Code Here

    assertFalse(kb.isScalarProperty());
    obj.shortObjectField = FORTY_TWO_SHORT;
    assertEquals(FORTY_TWO_SHORT, kb.valueInObject(obj));
   
    kb = DefaultImplementation._keyGetBindingForKey(obj, "shortField");
    assertEquals(Short.class, kb.valueType());
    assertTrue(kb.isScalarProperty());
    obj.shortField = FORTY_TWO_SHORT;
    assertEquals(FORTY_TWO_SHORT, kb.valueInObject(obj));
  }
View Full Code Here

  public void testDefaultImplementation$_keyGetBindingForKey$integerField() {   
    KeyBindingTypeTest obj = new KeyBindingTypeTest();

    _KeyBinding kb = DefaultImplementation._keyGetBindingForKey(obj, "integerField");
    assertEquals(Integer.class, kb.valueType());
    assertFalse(kb.isScalarProperty());
    obj.integerField = FORTY_TWO;
    assertEquals(FORTY_TWO, kb.valueInObject(obj));
   
    kb = DefaultImplementation._keyGetBindingForKey(obj, "intField");
View Full Code Here

    assertFalse(kb.isScalarProperty());
    obj.integerField = FORTY_TWO;
    assertEquals(FORTY_TWO, kb.valueInObject(obj));
   
    kb = DefaultImplementation._keyGetBindingForKey(obj, "intField");
    assertEquals(Integer.class, kb.valueType());
    assertTrue(kb.isScalarProperty());
    obj.intField = FORTY_TWO;
    assertEquals(FORTY_TWO, kb.valueInObject(obj));
  }
View Full Code Here

  public void testDefaultImplementation$_keyGetBindingForKey$longField() {   
    KeyBindingTypeTest obj = new KeyBindingTypeTest();

    _KeyBinding kb = DefaultImplementation._keyGetBindingForKey(obj, "longObjectField");
    assertEquals(Long.class, kb.valueType());
    assertFalse(kb.isScalarProperty());
    obj.longObjectField = FORTY_TWO_LONG;
    assertEquals(FORTY_TWO_LONG, kb.valueInObject(obj));
   
    kb = DefaultImplementation._keyGetBindingForKey(obj, "longField");
View Full Code Here

      NSKeyValueCoding._KeyBinding keyBinding = ((lookup >= _KeyBindingFactory.MethodLookup) && (lookup <= _KeyBindingFactory.UnderbarFieldLookup)) ? keyBindings[lookup] : null;
      if (keyBinding == null) {
        Class<?> valueType = null;
        if (trueForSetAndFalseForGet) {
          _KeyBinding getKeyBinding = _createKeyBindingForKey(key, lookupOrder, false);
          valueType = getKeyBinding != null ? getKeyBinding.valueType() : null;
        }

        switch (lookup) {
          case _KeyBindingFactory.MethodLookup:
            String methodName = prefixedKey((trueForSetAndFalseForGet) ? "set" : "get", key);
View Full Code Here

    assertFalse(kb.isScalarProperty());
    obj.longObjectField = FORTY_TWO_LONG;
    assertEquals(FORTY_TWO_LONG, kb.valueInObject(obj));
   
    kb = DefaultImplementation._keyGetBindingForKey(obj, "longField");
    assertEquals(Long.class, kb.valueType());
    assertTrue(kb.isScalarProperty());
    obj.longField = FORTY_TWO_LONG;
    assertEquals(FORTY_TWO_LONG, kb.valueInObject(obj));
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.