Class ExpressionVersionRestrictionValidator

    • Constructor Detail

      • ExpressionVersionRestrictionValidator

        public ExpressionVersionRestrictionValidator​(IMessageHandler handler)
        Creates the validator with a message handler.
        Parameters:
        handler - the message handler (may be null for absent)
    • Method Detail

      • visitTemplate

        public java.lang.Object visitTemplate​(Template template)
                                       throws VilException
        Description copied from interface: IVisitor
        Visits a template.
        Specified by:
        visitTemplate in interface IVisitor
        Parameters:
        template - the template to visit
        Returns:
        the result of visiting the given statement (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • visitDef

        public java.lang.Object visitDef​(Def def)
                                  throws VilException
        Description copied from interface: IVisitor
        Visits a sub-template definition.
        Specified by:
        visitDef in interface IVisitor
        Parameters:
        def - the sub-template definition to visit
        Returns:
        the result of visiting the given statement (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • visitTemplateBlock

        public java.lang.Object visitTemplateBlock​(TemplateBlock block)
                                            throws VilException
        Description copied from interface: IVisitor
        Visits a template block.
        Specified by:
        visitTemplateBlock in interface IVisitor
        Parameters:
        block - the template block to visit
        Returns:
        the result of visiting the given statement (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • visitAlternative

        public java.lang.Object visitAlternative​(AlternativeStatement alternative)
                                          throws VilException
        Description copied from interface: IVisitor
        Visits an alternative statement.
        Specified by:
        visitAlternative in interface IVisitor
        Parameters:
        alternative - the alternative to visit
        Returns:
        the result of visiting the given statement (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • visitLoop

        public java.lang.Object visitLoop​(LoopStatement loop)
                                   throws VilException
        Description copied from interface: IVisitor
        Visits a loop statement.
        Specified by:
        visitLoop in interface IVisitor
        Parameters:
        loop - the loop statement to visit
        Returns:
        the result of visiting the given statement (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • visitSwitch

        public java.lang.Object visitSwitch​(SwitchStatement swtch)
                                     throws VilException
        Description copied from interface: IVisitor
        Visits a switch statement.
        Specified by:
        visitSwitch in interface IVisitor
        Parameters:
        swtch - the switch statement to visit
        Returns:
        the result of visiting the given statement (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • visitContentStatement

        public java.lang.Object visitContentStatement​(ContentStatement cnt)
                                               throws VilException
        Description copied from interface: IVisitor
        Visits a content statement.
        Specified by:
        visitContentStatement in interface IVisitor
        Parameters:
        cnt - the content statement
        Returns:
        the result of visiting the given statement (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • visitJavaExtension

        public java.lang.Object visitJavaExtension​(JavaExtension ext)
                                            throws VilException
        Description copied from interface: IVisitor
        Visits a java extension.
        Specified by:
        visitJavaExtension in interface IVisitor
        Parameters:
        ext - the java extension
        Returns:
        the result of visiting the given statement (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • visitTemplateCallExpression

        public java.lang.Object visitTemplateCallExpression​(TemplateCallExpression call)
                                                     throws VilException
        Description copied from interface: IVisitor
        Visits a template call expression.
        Specified by:
        visitTemplateCallExpression in interface IVisitor
        Parameters:
        call - the call expression
        Returns:
        the result of visiting the given expression (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • visitFlush

        public java.lang.Object visitFlush​(FlushStatement stmt)
                                    throws VilException
        Description copied from interface: IVisitor
        Visits a flush statement.
        Specified by:
        visitFlush in interface IVisitor
        Parameters:
        stmt - the flush statement
        Returns:
        the result visiting the given statement (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • visitWhile

        public java.lang.Object visitWhile​(WhileStatement stmt)
                                    throws VilException
        Description copied from interface: IVisitor
        Visits a while statement.
        Specified by:
        visitWhile in interface IVisitor
        Parameters:
        stmt - the while statement to visit
        Returns:
        the result of visiting the given statement (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • visitAdvice

        public java.lang.Object visitAdvice​(Advice advice)
                                     throws VilException
        Description copied from interface: IVisitor
        Visits an advice.
        Specified by:
        visitAdvice in interface IVisitor
        Parameters:
        advice - the advice to be visited
        Returns:
        the result of visiting the given statement (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • visitTypedef

        public java.lang.Object visitTypedef​(Typedef typedef)
                                      throws VilException
        Description copied from interface: IVisitor
        Visits a typedef.
        Specified by:
        visitTypedef in interface IVisitor
        Parameters:
        typedef - the typedef
        Returns:
        the result of visiting (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • visitExpressionStatement

        public java.lang.Object visitExpressionStatement​(ExpressionStatement statement)
                                                  throws VilException
        Description copied from interface: IVisitor
        Visits a statement.
        Specified by:
        visitExpressionStatement in interface IVisitor
        Parameters:
        statement - the statement
        Returns:
        the result of visiting the given statement (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • visitVariableDeclaration

        public java.lang.Object visitVariableDeclaration​(VariableDeclaration var)
                                                  throws VilException
        Description copied from interface: IVisitor
        Visits a variable declaration.
        Specified by:
        visitVariableDeclaration in interface IVisitor
        Parameters:
        var - the variable declaration
        Returns:
        the result of visiting the given statement (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • visitContentLoopExpression

        public java.lang.Object visitContentLoopExpression​(ContentLoopExpression ex)
                                                    throws VilException
        Description copied from interface: IVisitor
        Visits a content loop expression.
        Specified by:
        visitContentLoopExpression in interface IVisitor
        Parameters:
        ex - the expression
        Returns:
        the result visiting the given statement (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • visitContentVarDeclExpression

        public java.lang.Object visitContentVarDeclExpression​(ContentVarDeclExpression ex)
                                                       throws VilException
        Description copied from interface: IVisitor
        Visits a content variable declaration expression.
        Specified by:
        visitContentVarDeclExpression in interface IVisitor
        Parameters:
        ex - the expression
        Returns:
        the result visiting the given statement (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • visitCompound

        public java.lang.Object visitCompound​(Compound compound)
                                       throws VilException
        Description copied from interface: IVisitor
        Visits a compound.
        Specified by:
        visitCompound in interface IVisitor
        Parameters:
        compound - the compound
        Returns:
        the result of visiting (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)