Package io.codemodder.javaparser
Class ASTExpectations
java.lang.Object
io.codemodder.javaparser.ASTExpectations
A utility for validating the shape of ASTs and filtering them to retrieve. It only exposes one
endpoint,
expect(Node)
, which allows folks to filter and telescope a further down an AST
subgraph.
The notable weakness of this API is use cases where you need to retrieve multiple parts of the AST, but we have not run into that much as of yet.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A type for querying and filtering expression statements.static class
A type for querying and filtering name expressions.static class
A type for querying and filtering a single variable declaration.static class
A type for querying and filtering method call expressions.static class
A type for querying and filtering name expressions.static class
A type for querying and filtering generic AST nodes.static class
A type for querying and filtering string literals.static class
A type for querying and filtering variable declaration(s). -
Method Summary
Modifier and TypeMethodDescriptionexpect
(com.github.javaparser.ast.Node node) The starting point for validating the shape of an AST and returning a subgraph.
-
Method Details
-
expect
The starting point for validating the shape of an AST and returning a subgraph.
-