Class ForStatement

    • Constructor Detail

      • ForStatement

        public ForStatement()
    • Method Detail

      • addChildBodyStatements

        public void addChildBodyStatements​(java.util.List<java.lang.Object> res)
        addChildBodyStatements in class Statement
      • transformTemplate

        public int transformTemplate​(int ix,
                                     boolean statefulContext)
        Description copied from class: JavaSemanticNode
        A pass over the semantic node tree to convert template statements into layer cake statements.
        transformTemplate in class JavaSemanticNode
      • addBreakpointNodes

        public void addBreakpointNodes​(java.util.List<ISrcStatement> res,
                                       ISrcStatement toFind)
        Description copied from interface: ISrcStatement
        Adds all of the generated statements to the resulting list, for the case where more than one fromStatement points to the same src statement. These are used to determine which statements in the generated code should cause a 'break' when the developer sets a breakpoint on this statement.
        Specified by:
        addBreakpointNodes in interface ISrcStatement
        addBreakpointNodes in class Statement
      • updateFromStatementRef

        public boolean updateFromStatementRef​(Statement fromSt,
                                              ISrcStatement defaultSt)
        Description copied from class: Statement
        During code-transformation, sometimes we end up parsing dynamically generated code which is derived from some source objects - e.g. during the object and property transformation. This method registers the generated code. You can provide a 'fromStatement' and a default statement. If the from statement matches, this node is updated. If the fromStatement is null the defaultStatement is used.

        To determine whether the fromStatement matches this statement, we call matchesStatement. For assignment expressions right now, that allows us to match the right assignment statement in the list to the source from which it was generated from.

        updateFromStatementRef in class Statement