Class StructuredSleigh.WrapIf

java.lang.Object
ghidra.pcode.struct.StructuredSleigh.WrapIf
Enclosing class:
StructuredSleigh

public class StructuredSleigh.WrapIf extends Object
The wrapper around an StructuredSleigh._if(RVal, Runnable) statement providing additional DSL syntax
  • Constructor Details

    • WrapIf

      protected WrapIf(ghidra.pcode.struct.IfStmt _if)
  • Method Details

    • _else

      public void _else(Runnable body)
      Generate an "else" clause for the wrapped "if" statement
      Parameters:
      body - the body of the clause
    • _elif

      public StructuredSleigh.WrapIf _elif(Expr cond, Runnable body)
      Generate an "else if" clause for the wrapped "if" statement

      This is shorthand for _else(_if(...)) but avoids the unnecessary nesting of parentheses.

      Parameters:
      cond - the condition
      body - the body of the clause
      Returns:
      a wrapper to the second "if" statement