microsoft-azure-storage/src/com/microsoft/azure/storage/table/PropertyPair.java
protected void consumeEntityProperty(final EntityProperty prop, final Object instance)
            throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
        Class<?> paramType = this.setter.getParameterTypes()[0];
        if (prop.getIsNull()) {
            if (!paramType.isPrimitive()) {
                this.setter.invoke(instance, (Object) null);
            }
        }
        else {
            if (prop.getEdmType() == EdmType.STRING) {
                if (paramType.equals(String.class)) {
                    this.setter.invoke(instance, prop.getValueAsString());
                }
            }
            else if (prop.getEdmType() == EdmType.BINARY) {
                if (paramType.equals(Byte[].class)) {
                    this.setter.invoke(instance, (Object) prop.getValueAsByteObjectArray());
                }
                else if (paramType.equals(byte[].class)) {
                    this.setter.invoke(instance, prop.getValueAsByteArray());
                }
            }
            else if (prop.getEdmType() == EdmType.BOOLEAN) {
                if (paramType.equals(Boolean.class)) {
                    this.setter.invoke(instance, prop.getValueAsBooleanObject());
                }
                else if (paramType.equals(boolean.class)) {
                    this.setter.invoke(instance, prop.getValueAsBoolean());
                }
            }
            else if (prop.getEdmType() == EdmType.DOUBLE) {
                if (paramType.equals(Double.class)) {
                    this.setter.invoke(instance, prop.getValueAsDoubleObject());
                }
                else if (paramType.equals(double.class)) {
                    this.setter.invoke(instance, prop.getValueAsDouble());
                }
            }
            else if (prop.getEdmType() == EdmType.GUID) {                
                if (paramType.equals(UUID.class)) {
                    this.setter.invoke(instance, prop.getValueAsUUID());
                }
            }
            else if (prop.getEdmType() == EdmType.INT32) {
                if (paramType.equals(Integer.class)) {
                    this.setter.invoke(instance, prop.getValueAsIntegerObject());
                }
                else if (paramType.equals(int.class)) {
                    this.setter.invoke(instance, prop.getValueAsInteger());
                }
            }
            else if (prop.getEdmType() == EdmType.INT64) {
                if (paramType.equals(Long.class)) {
                    this.setter.invoke(instance, prop.getValueAsLongObject());
                }
                else if (paramType.equals(long.class)) {
                    this.setter.invoke(instance, prop.getValueAsLong());
                }
            }
            else if (prop.getEdmType() == EdmType.DATE_TIME) {
                if (paramType.equals(Date.class)) {
                    this.setter.invoke(instance, prop.getValueAsDate());
                }
            }
            else {
                throw new IllegalArgumentException(String.format(SR.PROPERTY_CANNOT_BE_SERIALIZED_AS_GIVEN_EDMTYPE,
                        this.name, prop.getEdmType().toString()));
            }
        }
    }
protected void consumeEntityProperty(final EntityProperty prop, final Object instance)
            throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
        Class<?> paramType = this.setter.getParameterTypes()[0];
        if (prop.getIsNull()) {
            if (!paramType.isPrimitive()) {
                this.setter.invoke(instance, (Object) null);
            }
        }
        else {
            if (prop.getEdmType() == EdmType.STRING) {
                if (paramType.equals(String.class)) {
                    this.setter.invoke(instance, prop.getValueAsString());
                }
            }
            else if (prop.getEdmType() == EdmType.BINARY) {
                if (paramType.equals(Byte[].class)) {
                    this.setter.invoke(instance, (Object) prop.getValueAsByteObjectArray());
                }
                else if (paramType.equals(byte[].class)) {
                    this.setter.invoke(instance, prop.getValueAsByteArray());
                }
            }
            else if (prop.getEdmType() == EdmType.BOOLEAN) {
                if (paramType.equals(Boolean.class)) {
                    this.setter.invoke(instance, prop.getValueAsBooleanObject());
                }
                else if (paramType.equals(boolean.class)) {
                    this.setter.invoke(instance, prop.getValueAsBoolean());
                }
            }
            else if (prop.getEdmType() == EdmType.DOUBLE) {
                if (paramType.equals(Double.class)) {
                    this.setter.invoke(instance, prop.getValueAsDoubleObject());
                }
                else if (paramType.equals(double.class)) {
                    this.setter.invoke(instance, prop.getValueAsDouble());
                }
            }
            else if (prop.getEdmType() == EdmType.GUID) {                
                if (paramType.equals(UUID.class)) {
                    this.setter.invoke(instance, prop.getValueAsUUID());
                }
            }
            else if (prop.getEdmType() == EdmType.INT32) {
                if (paramType.equals(Integer.class)) {
                    this.setter.invoke(instance, prop.getValueAsIntegerObject());
                }
                else if (paramType.equals(int.class)) {
                    this.setter.invoke(instance, prop.getValueAsInteger());
                }
            }
            else if (prop.getEdmType() == EdmType.INT64) {
                if (paramType.equals(Long.class)) {
                    this.setter.invoke(instance, prop.getValueAsLongObject());
                }
                else if (paramType.equals(long.class)) {
                    this.setter.invoke(instance, prop.getValueAsLong());
                }
            }
            else if (prop.getEdmType() == EdmType.DATE_TIME) {
                if (paramType.equals(Date.class)) {
                    this.setter.invoke(instance, prop.getValueAsDate());
                }
            }
            else {
                throw new IllegalArgumentException(String.format(SR.PROPERTY_CANNOT_BE_SERIALIZED_AS_GIVEN_EDMTYPE,
                        this.name, prop.getEdmType().toString()));
            }
        }
    }
Reserved for internal use. Invokes the setter method on the specified instance parameter with the value of the
{@link EntityProperty} deserialized as the appropriate type.

@param prop
The {@link EntityProperty} containing the value to pass to the setter on the instance.
@param instance
An instance of a class supporting this property with getter and setter methods of the
appropriate name and parameter or return type.

@throws IllegalArgumentException
if the specified instance parameter is not an instance of the class
or interface declaring the setter method (or of a subclass or implementor thereof).
@throws IllegalAccessException
if the setter method is inaccessible.
@throws InvocationTargetException
if the setter method throws an exception.