Package io.codemodder.remediation
Class WithoutScopePositionMatcher
java.lang.Object
io.codemodder.remediation.WithoutScopePositionMatcher
- All Implemented Interfaces:
NodePositionMatcher
Removes the range of the node's scope before matching it against a position.
-
Field Summary
Fields inherited from interface io.codemodder.remediation.NodePositionMatcher
DEFAULT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.github.javaparser.Range
getRange
(com.github.javaparser.ast.Node node) boolean
match
(com.github.javaparser.ast.Node node, int line) Matches a node with a range against a lineboolean
match
(com.github.javaparser.ast.Node node, int startLine, int endLine) Matches a node with a range against a line rangeboolean
match
(com.github.javaparser.ast.Node node, int startLine, int endLine, int startColumn) Matches a node with a range against a line range and columnboolean
match
(com.github.javaparser.ast.Node node, int startLine, int endLine, int startColumn, int endColumn) Matches a node with a range against another range
-
Constructor Details
-
WithoutScopePositionMatcher
public WithoutScopePositionMatcher()
-
-
Method Details
-
getRange
protected com.github.javaparser.Range getRange(com.github.javaparser.ast.Node node) -
match
public boolean match(com.github.javaparser.ast.Node node, int line) Description copied from interface:NodePositionMatcher
Matches a node with a range against a line- Specified by:
match
in interfaceNodePositionMatcher
- Returns:
-
match
public boolean match(com.github.javaparser.ast.Node node, int startLine, int endLine) Description copied from interface:NodePositionMatcher
Matches a node with a range against a line range- Specified by:
match
in interfaceNodePositionMatcher
- Returns:
-
match
public boolean match(com.github.javaparser.ast.Node node, int startLine, int endLine, int startColumn) Description copied from interface:NodePositionMatcher
Matches a node with a range against a line range and column- Specified by:
match
in interfaceNodePositionMatcher
- Returns:
-
match
public boolean match(com.github.javaparser.ast.Node node, int startLine, int endLine, int startColumn, int endColumn) Description copied from interface:NodePositionMatcher
Matches a node with a range against another range- Specified by:
match
in interfaceNodePositionMatcher
- Returns:
-