src/components/meta/Base.js
function(clazz, metaData) {

        // Apply clazz interface
        if (!clazz.__isClazz) {
            _.extend(clazz, this.clazz_interface);
        }

        // Apply interface common for clazz and its prototype
        if (!clazz.__interfaces) {
            clazz.__interfaces = [];
            clazz.prototype.__interfaces = [];

            _.extend(clazz, this.common_interface);
            _.extend(clazz.prototype, this.common_interface);
        }

        // Calls sub processors

        clazz.__metaProcessors = metaData.meta_processors || {};

        var parent = metaData.parent;

        if (parent) {
            if (!clazz.__isSubclazzOf(parent)) {
                throw new Error('Clazz "' + clazz.__name +
                    '" must be sub clazz of "' + parent.__isClazz ? parent.__name : parent + '"!');
            }
        }

        var processors = clazz.__getMetaProcessors();

        _.each(processors, function(processor) {
            processor.process(clazz, metaData);
        });

        // Sets clazz defaults

        if (_.isFunction(clazz.__setDefaults)) {
            clazz.__setDefaults();
        }
    }
function(clazz, metaData) {

        // Apply clazz interface
        if (!clazz.__isClazz) {
            _.extend(clazz, this.clazz_interface);
        }

        // Apply interface common for clazz and its prototype
        if (!clazz.__interfaces) {
            clazz.__interfaces = [];
            clazz.prototype.__interfaces = [];

            _.extend(clazz, this.common_interface);
            _.extend(clazz.prototype, this.common_interface);
        }

        // Calls sub processors

        clazz.__metaProcessors = metaData.meta_processors || {};

        var parent = metaData.parent;

        if (parent) {
            if (!clazz.__isSubclazzOf(parent)) {
                throw new Error('Clazz "' + clazz.__name +
                    '" must be sub clazz of "' + parent.__isClazz ? parent.__name : parent + '"!');
            }
        }

        var processors = clazz.__getMetaProcessors();

        _.each(processors, function(processor) {
            processor.process(clazz, metaData);
        });

        // Sets clazz defaults

        if (_.isFunction(clazz.__setDefaults)) {
            clazz.__setDefaults();
        }
    }
function ( clazz , metaData ) { // Apply clazz interface if ( ! clazz . __isClazz ) { _ . extend ( clazz , this . clazz_interface ) ; } // Apply interface common for clazz and its prototype if ( ! clazz . __interfaces ) { clazz . __interfaces = [ ] ; clazz . prototype . __interfaces = [ ] ; _ . extend ( clazz , this . common_interface ) ; _ . extend ( clazz . prototype , this . common_interface ) ; } // Calls sub processors clazz . __metaProcessors = metaData . meta_processors || { } ; var parent = metaData . parent ; if ( parent ) { if ( ! clazz . __isSubclazzOf ( parent ) ) { throw new Error ( 'Clazz "' + clazz . __name + '" must be sub clazz of "' + parent . __isClazz ? parent . __name : parent + '"!' ) ; } } var processors = clazz . __getMetaProcessors ( ) ; _ . each ( processors , function ( processor ) { processor . process ( clazz , metaData ) ; } ) ; // Sets clazz defaults if ( _ . isFunction ( clazz . __setDefaults ) ) { clazz . __setDefaults ( ) ; } }
Process meta data for specified clazz

@param {clazz}  clazz    Clazz
@param {object} metaData Meta data

@throw {Error} if wrong meta data are passed

@this {metaProcessor}
Process meta data for specified clazz