Skip to content

Commit

Permalink
Remove some deprecated matchers
Browse files Browse the repository at this point in the history
RELNOTES: `Matchers.instanceMethod` is no longer supported; prefer `MethodMatchers.instanceMethod()`
RELNOTES: `Matchers.isDescendantOfMethod(className, methodName)` is no longer supported; prefer `MethodMatchers.instanceMethod().onDescendantOf(className).named(methodName)`

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=236682057
  • Loading branch information
cushon authored and ronshapiro committed Apr 12, 2019
1 parent 1fcb40e commit f493911
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 628 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,6 @@ public static ConstructorMatcher constructor() {
return MethodMatchers.constructor();
}

/** @deprecated prefer {@link MethodMatchers#instanceMethod} */
@Deprecated
// TODO(cushon): expunge
public static InstanceMethod instanceMethod(
Matcher<? super ExpressionTree> receiverMatcher, String methodName) {
return new InstanceMethod(receiverMatcher, methodName);
}

/** Matches an AST node that represents a non-static field. */
public static Matcher<ExpressionTree> isInstanceField() {
return new Matcher<ExpressionTree>() {
Expand Down Expand Up @@ -344,6 +336,7 @@ public static MultiMatcher<ClassTree, MethodTree> constructor(
return new ConstructorOfClass(matchType, constructorMatcher);
}

// TODO(cushon): expunge
public static Matcher<MethodInvocationTree> methodSelect(
Matcher<ExpressionTree> methodSelectMatcher) {
return new MethodInvocationMethodSelect(methodSelectMatcher);
Expand Down Expand Up @@ -1128,22 +1121,6 @@ public boolean matches(ClassTree classTree, VisitorState state) {
};
}

/**
* Matches an instance method that is a descendant of the instance method specified by the class
* name and method name.
*
* @param fullClassName The name of the class whose instance method to match, e.g.,
* "java.util.Map"
* @param methodName The name of the method to match, including arguments, e.g.,
* "get(java.lang.Object)"
* @deprecated prefer {@link MethodMatchers#instanceMethod}
*/
@Deprecated
// TODO(cushon): expunge
public static Matcher<ExpressionTree> isDescendantOfMethod(
String fullClassName, String methodName) {
return new DescendantOf(fullClassName, methodName);
}

/**
* Matches a binary tree if the given matchers match the operands in either order. That is,
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit f493911

Please sign in to comment.