src/aria/templates/ClassGenerator.js
function (out, tree) {
            var rootStatement = tree.content[0];
            if (tree.content.length != 1 || (rootStatement.name != this._rootStatement)) {
                return out.logError(tree, this.TEMPLATE_STATEMENT_EXPECTED, [this._rootStatement]);
            }
            if (rootStatement.content == null) {
                return out.logError(rootStatement, this.EXPECTED_CONTAINER, [this._rootStatement]);
            }
            var param;
            try {
                // The parameter should be a JSON object
                param = Aria["eval"]("return (" + rootStatement.paramBlock + ");");
            } catch (e) {
                return out.logError(rootStatement, this.ERROR_IN_TEMPLATE_PARAMETER, [this._rootStatement], e);
            }

            if (!ariaCoreJsonValidator.normalize({
                json : param,
                beanName : this._templateParamBean
            })) {
                return out.logError(rootStatement, this.CHECK_ERROR_IN_TEMPLATE_PARAMETER, [this._rootStatement]);
            }
            out.templateParam = param;
            rootStatement.properties = param;

            this._processTemplateContent({
                out : out,
                statement : rootStatement
            });
        }
function (out, tree) {
            var rootStatement = tree.content[0];
            if (tree.content.length != 1 || (rootStatement.name != this._rootStatement)) {
                return out.logError(tree, this.TEMPLATE_STATEMENT_EXPECTED, [this._rootStatement]);
            }
            if (rootStatement.content == null) {
                return out.logError(rootStatement, this.EXPECTED_CONTAINER, [this._rootStatement]);
            }
            var param;
            try {
                // The parameter should be a JSON object
                param = Aria["eval"]("return (" + rootStatement.paramBlock + ");");
            } catch (e) {
                return out.logError(rootStatement, this.ERROR_IN_TEMPLATE_PARAMETER, [this._rootStatement], e);
            }

            if (!ariaCoreJsonValidator.normalize({
                json : param,
                beanName : this._templateParamBean
            })) {
                return out.logError(rootStatement, this.CHECK_ERROR_IN_TEMPLATE_PARAMETER, [this._rootStatement]);
            }
            out.templateParam = param;
            rootStatement.properties = param;

            this._processTemplateContent({
                out : out,
                statement : rootStatement
            });
        }
function ( out , tree ) { var rootStatement = tree . content [ 0 ] ; if ( tree . content . length != 1 || ( rootStatement . name != this . _rootStatement ) ) { return out . logError ( tree , this . TEMPLATE_STATEMENT_EXPECTED , [ this . _rootStatement ] ) ; } if ( rootStatement . content == null ) { return out . logError ( rootStatement , this . EXPECTED_CONTAINER , [ this . _rootStatement ] ) ; } var param ; try { // The parameter should be a JSON object param = Aria [ "eval" ] ( "return (" + rootStatement . paramBlock + ");" ) ; } catch ( e ) { return out . logError ( rootStatement , this . ERROR_IN_TEMPLATE_PARAMETER , [ this . _rootStatement ] , e ) ; } if ( ! ariaCoreJsonValidator . normalize ( { json : param , beanName : this . _templateParamBean } ) ) { return out . logError ( rootStatement , this . CHECK_ERROR_IN_TEMPLATE_PARAMETER , [ this . _rootStatement ] ) ; } out . templateParam = param ; rootStatement . properties = param ; this . _processTemplateContent ( { out : out , statement : rootStatement } ) ; }
Process the root statement of the template.
@param {aria.templates.ClassWriter} out
@param {aria.templates.TreeBeans:Statement} tree
@protected
Process the root statement of the template .