src/components/meta/Property/Type.js
function(value, params, property, fields, object) {

            if (!_.isObject(value)) {
                throw new Error('Value of property "' + property + '" must be an object!');
            }

            if ('instanceOf' in params) {

                var instanceOf = params.instanceOf;
                var clazzClazz = object.__isClazz ? object.__clazz : object.__clazz.__clazz;

                if (_.isString(instanceOf)) {
                    instanceOf = clazzClazz.getNamespace().adjustPath(instanceOf);

                    if (!value.__clazz) {
                        instanceOf = clazzClazz(instanceOf);
                    }
                }

                if (value.__clazz ? !value.__clazz.__isSubclazzOf(instanceOf) : !(value instanceof instanceOf)) {

                    var className = instanceOf.__isClazz
                        ? instanceOf.__name
                        : (_.isString(instanceOf) ? instanceOf : 'another');


                    throw new Error('Value of property "' + property +
                        '" must be instance of ' + className + ' clazz!');
                }
            }

            return value;
        }
function(value, params, property, fields, object) {

            if (!_.isObject(value)) {
                throw new Error('Value of property "' + property + '" must be an object!');
            }

            if ('instanceOf' in params) {

                var instanceOf = params.instanceOf;
                var clazzClazz = object.__isClazz ? object.__clazz : object.__clazz.__clazz;

                if (_.isString(instanceOf)) {
                    instanceOf = clazzClazz.getNamespace().adjustPath(instanceOf);

                    if (!value.__clazz) {
                        instanceOf = clazzClazz(instanceOf);
                    }
                }

                if (value.__clazz ? !value.__clazz.__isSubclazzOf(instanceOf) : !(value instanceof instanceOf)) {

                    var className = instanceOf.__isClazz
                        ? instanceOf.__name
                        : (_.isString(instanceOf) ? instanceOf : 'another');


                    throw new Error('Value of property "' + property +
                        '" must be instance of ' + className + ' clazz!');
                }
            }

            return value;
        }
function ( value , params , property , fields , object ) { if ( ! _ . isObject ( value ) ) { throw new Error ( 'Value of property "' + property + '" must be an object!' ) ; } if ( 'instanceOf' in params ) { var instanceOf = params . instanceOf ; var clazzClazz = object . __isClazz ? object . __clazz : object . __clazz . __clazz ; if ( _ . isString ( instanceOf ) ) { instanceOf = clazzClazz . getNamespace ( ) . adjustPath ( instanceOf ) ; if ( ! value . __clazz ) { instanceOf = clazzClazz ( instanceOf ) ; } } if ( value . __clazz ? ! value . __clazz . __isSubclazzOf ( instanceOf ) : ! ( value instanceof instanceOf ) ) { var className = instanceOf . __isClazz ? instanceOf . __name : ( _ . isString ( instanceOf ) ? instanceOf : 'another' ) ; throw new Error ( 'Value of property "' + property + '" must be instance of ' + className + ' clazz!' ) ; } } return value ; }
Object property type
Check 'object' type of value, applies 'instanceOf' parameters

@param {*}      value    Property value
@param {object} params   Property parameters
@param {string} property Property name
@param {array}  fields   Property fields
@param {object} object   Object to which property belongs

@throws {Error} if property value does not an object
@throws {Error} if hash has unsupported keys

@returns {object} Processed property value

@this {metaProcessor}
Object property type Check object type of value applies instanceOf parameters