Class IfStatementContext

    • Constructor Detail

      • IfStatementContext

        public IfStatementContext​(IfStmt wrappedNode,
                                  TypeSolver typeSolver)
    • Method Detail

      • patternExprsExposedToChild

        public List<PatternExpr> patternExprsExposedToChild​(Node child)
        Description copied from interface: Context
        The pattern expressions that are declared in this immediate context and made visible to a given child. This list could include values which are shadowed.
      • nodeContextIsChainedIfElseIf

        public boolean nodeContextIsChainedIfElseIf​(Context parentContext)
        
         if() {
             // Does not match here (doesn't need to, as stuff inside of the if() is likely in context..)
         } else if() {
             // Matches here
         } else {
             // Matches here
         }
         
        Returns:
        true, If this is an if inside of an if...
      • nodeContextIsImmediateChildElse

        public boolean nodeContextIsImmediateChildElse​(Context parentContext)
        
         if() {
             // Does not match here (doesn't need to, as stuff inside of the if() is likely in context..)
         } else {
             // Does not match here, as the else block is a field inside of an ifstmt as opposed to child
         }
         
        Returns:
        true, If this is an else inside of an if...
      • nodeContextIsThenOfIfStmt

        public boolean nodeContextIsThenOfIfStmt​(Context parentContext)
        
         if() {
             // Does not match here (doesn't need to, as stuff inside of the if() is likely in context..)
         } else {
             // Does not match here, as the else block is a field inside of an ifstmt as opposed to child
         }
         
        Returns:
        true, If this is an else inside of an if...
      • nodeContextIsConditionOfIfStmt

        public boolean nodeContextIsConditionOfIfStmt​(Context parentContext)