Class WhileStatement

    • Constructor Detail

      • WhileStatement

        public WhileStatement​(Expression condition,
                              IRuleElement[] body)
                       throws VilException
        Creates a while statement.
        Parameters:
        condition - the condition of the while (Boolean expression)
        body - the body of the while
        Throws:
        VilException - in case of initialization problems
    • Method Detail

      • getCondition

        public Expression getCondition()
        Returns the condition of the while statement.
        Returns:
        the condition
      • accept

        public java.lang.Object accept​(IVisitor visitor)
                                throws VilException
        Description copied from interface: IBuildlangElement
        Accepts the visitor for visiting.
        Specified by:
        accept in interface IBuildlangElement
        Parameters:
        visitor - the visitor to be used
        Returns:
        the result of visiting this instance (may be null)
        Throws:
        VilException - in case that visiting fails (e.g., execution)
      • isVirtual

        public boolean isVirtual()
        Description copied from interface: IRuleBlock
        Returns whether this block is a real block or consists just of a block element without brackets.
        Specified by:
        isVirtual in interface IRuleBlock
        Returns:
        true if this block is virtual, false else
      • returnActualValue

        public boolean returnActualValue()
        Description copied from interface: IRuleBlock
        Returns whether this body shall return an actual value (function) or a rule execution result.
        Specified by:
        returnActualValue in interface IRuleBlock
        Returns:
        true in case of an actual value, false else