Package io.codemodder.javaparser
Class ASTExpectations.LocalVariableDeclaratorExpectation
java.lang.Object
io.codemodder.javaparser.ASTExpectations.LocalVariableDeclaratorExpectation
- Enclosing class:
- ASTExpectations
A type for querying and filtering a single variable declaration.
-
Constructor Summary
ConstructorsConstructorDescriptionLocalVariableDeclaratorExpectation
(Optional<com.github.javaparser.ast.body.VariableDeclarator> variableDeclarator) -
Method Summary
Modifier and TypeMethodDescriptionOptional<com.github.javaparser.ast.body.VariableDeclarator>
result()
Return an expectation that asserts that the initializer is aMethodCallExpr
.withDirectReferenceCount
(int count) Return an expectation that asserts the variable declaration has only a single variable.
-
Constructor Details
-
LocalVariableDeclaratorExpectation
public LocalVariableDeclaratorExpectation(Optional<com.github.javaparser.ast.body.VariableDeclarator> variableDeclarator)
-
-
Method Details
-
withDirectReferenceCount
Return an expectation that asserts the variable declaration has only a single variable. -
toBeInitializedByMethodCall
Return an expectation that asserts that the initializer is aMethodCallExpr
. -
result
-