Class ASTExpectations.NodeExpectation

java.lang.Object
io.codemodder.javaparser.ASTExpectations.NodeExpectation
Enclosing class:
ASTExpectations

public static class ASTExpectations.NodeExpectation extends Object
A type for querying and filtering generic AST nodes.
  • Constructor Details

    • NodeExpectation

      public NodeExpectation(com.github.javaparser.ast.Node node)
  • Method Details

    • withBlockParent

      public ASTExpectations.NodeExpectation withBlockParent()
      Return an expectation that asserts the parent node is a BlockStmt.
    • toBeVariableDeclarationStatement

      public ASTExpectations.VariableDeclarationExprExpectation toBeVariableDeclarationStatement()
      Return an expectation that asserts the node is an ExpressionStmt with a VariableDeclarationExpr for its expression.
    • result

      public Optional<com.github.javaparser.ast.Node> result()