Skip to content

Commit 50137c0

Browse files
java-team-github-botError Prone Team
authored and
Error Prone Team
committed
RedundancyRemover: Remove redundant static and final from records.
PiperOrigin-RevId: 744756874
1 parent acf915d commit 50137c0

File tree

1 file changed

+5
-0
lines changed
  • check_api/src/main/java/com/google/errorprone/matchers

1 file changed

+5
-0
lines changed

check_api/src/main/java/com/google/errorprone/matchers/Matchers.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,11 @@ public static Matcher<ClassTree> isEnum() {
994994
return (classTree, state) -> getSymbol(classTree).getKind() == ElementKind.ENUM;
995995
}
996996

997+
/** Matches if a {@link ClassTree} is a {@code record} declaration. */
998+
public static Matcher<ClassTree> isRecord() {
999+
return (classTree, state) -> getSymbol(classTree).getKind() == ElementKind.RECORD;
1000+
}
1001+
9971002
/**
9981003
* Matches an class based on whether it is nested in another class or method.
9991004
*

0 commit comments

Comments
 (0)