Class MethodTreeUtils
java.lang.Object
org.sonar.java.checks.helpers.MethodTreeUtils
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<MethodInvocationTree> static booleanstatic booleanstatic booleanstatic booleanstatic VariableTreelamdaArgumentAt(LambdaExpressionTree lambdaExpressionTree, int argumentPosition) static MethodInvocationTreeparentMethodInvocationOfArgumentAtPos(ExpressionTree argumentCandidate, int expectedArgumentPosition) static Optional<MethodInvocationTree> subsequentMethodInvocation(Tree tree, MethodMatchers methodMatchers)
-
Method Details
-
isMainMethod
-
parentMethodInvocationOfArgumentAtPos
@Nullable public static MethodInvocationTree parentMethodInvocationOfArgumentAtPos(@Nullable ExpressionTree argumentCandidate, int expectedArgumentPosition) - Returns:
- null when: - argumentCandidate is null - the parent is not a method invocation (ignoring parent parentheses) - argumentCandidate is not at the expected argument position Otherwise, returns the parent method invocation.
-
lamdaArgumentAt
@Nullable public static VariableTree lamdaArgumentAt(@Nullable LambdaExpressionTree lambdaExpressionTree, int argumentPosition) -
isEqualsMethod
-
isHashCodeMethod
-
isSetterMethod
-
consecutiveMethodInvocation
-
subsequentMethodInvocation
public static Optional<MethodInvocationTree> subsequentMethodInvocation(Tree tree, MethodMatchers methodMatchers)
-