Package org.apache.velocity.util.introspection

Examples of org.apache.velocity.util.introspection.Info


    DEBUG.P("elementKey="+elementKey);
        /*
         * make an uberinfo - saves new's later on
         */

        uberInfo = new Info(this.getTemplateName(),
                getLine(),getColumn());

    }finally{//ζˆ‘εŠ δΈŠηš„
    DEBUG.P(0,this,"init(3)");
    }
View Full Code Here


              // mainly check the number of arguments
                vmProxy.init(rsvc, context, node);
            }
            catch (TemplateInitException die)
            {
                Info info = new Info(sourceTemplate, node.getLine(), node.getColumn());
                throw new ParseErrorException(die.getMessage() + " at "
                    + Log.formatFileString(info), info);
            }

            try
            {
                return vmProxy.render(context, writer, node);
            }
            catch (RuntimeException e)
            {
                /**
                 * We catch, the exception here so that we can record in
                 * the logs the template and line number of the macro call
                 * which generate the exception.  This information is
                 * especially important for multiple macro call levels.
                 * this is also true for the following catch blocks.
                 */
                rsvc.getLog().error("Exception in macro #" + macroName + " at " +
                  Log.formatFileString(sourceTemplate, getLine(), getColumn()));
                throw e;
            }
            catch (IOException e)
            {
                rsvc.getLog().error("Exception in macro #" + macroName + " at " +
                  Log.formatFileString(sourceTemplate, getLine(), getColumn()));
                throw e;
            }
        }
        else if (strictRef)
        {
            Info info = new Info(sourceTemplate, node.getLine(), node.getColumn());
            throw new ParseErrorException("Macro '#" + macroName + "' is not defined at "
                + Log.formatFileString(info), info);
        }
       
        /**
 
View Full Code Here

             *  init the tree correctly
             */
   
            super.init( context, data );
   
            uberInfo = new Info(getTemplateName(),
                    getLine(), getColumn());

      DEBUG.P("uberInfo="+uberInfo);
   
            right = getRightHandSide();
View Full Code Here

        /*
         * make an uberinfo - saves new's later on
         */

        uberInfo = new Info(getTemplateName(), getLine(),getColumn());

    DEBUG.P("uberInfo="+uberInfo);

        /*
         * track whether we log invalid references
View Full Code Here

            if (escapeType == null) {
                throw new ParseErrorException("Invalid escape type: "
                                              + escapeTypeObject
                                              + " at "
                                              + new Info(escapeTypeNode.getTemplateName(), escapeTypeNode.getColumn(),
                                                         escapeTypeNode.getLine()) + ".  Available escape types: " + EscapeType.getNames());
            }

            return renderWithEscape(escapeType, context, writer, node.jjtGetChild(1));
        }
View Full Code Here

            if (escapeType == null) {
                throw new ParseErrorException("Invalid escape type: "
                        + escapeTypeObject
                        + " at "
                        + new Info(escapeTypeNode.getTemplateName(), escapeTypeNode.getColumn(),
                                escapeTypeNode.getLine()) + ".  Available escape types: " + EscapeType.getNames());
            }

            return renderWithEscape(escapeType, context, writer, node.jjtGetChild(1));
        }
View Full Code Here

             *  init the tree correctly
             */
   
            super.init( context, data );
   
            uberInfo = new Info(context.getCurrentTemplateName(),
                    getLine(), getColumn());
   
            right = getRightHandSide();
            left = getLeftHandSide();
   
View Full Code Here

        /*
         * make an uberinfo - saves new's later on
         */

        uberInfo = new Info(context.getCurrentTemplateName(),
                getLine(),getColumn());
        /*
         *  this is about all we can do
         */

 
View Full Code Here

                /*
                 *  otherwise, do the introspection, and then
                 *  cache it
                 */

                method = rsvc.getUberspect().getMethod(o, methodName, params, new Info(context.getCurrentTemplateName(), getLine(), getColumn()));

                if ((method != null) && (o != null))
                {
                    icd = new IntrospectionCacheData();
                    icd.contextData = o.getClass();
View Full Code Here

        /*
         * make an uberinfo - saves new's later on
         */

        uberInfo = new Info(context.getCurrentTemplateName(),
                getLine(),getColumn());

        /*
         * track whether we log invalid references
         */
 
View Full Code Here

TOP

Related Classes of org.apache.velocity.util.introspection.Info

Copyright © 2018 www.massapicom. 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.