Skip to content

Commit

Permalink
Suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
rickie committed Nov 12, 2022
1 parent e495239 commit 541df42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ public final class MoreMatchers {
private MoreMatchers() {}

/**
* Determines whether an expression has a meta annotation of the given class name. This includes
* Determines whether a tree has a meta annotation of the given class name. This includes
* annotations inherited from superclasses due to {@link java.lang.annotation.Inherited}.
*
* @param <T> The type of the expression tree. // XXX: Not expression per se.
* @param <T> The type of the tree.
* @param annotationClass The binary class name of the annotation (e.g. "
* org.jspecify.nullness.Nullable", or "some.package.OuterClassName$InnerClassName")
* @return A {@link Matcher} that matches expressions with the specified meta annotation.
* @return A {@link Matcher} that matches trees with the specified meta annotation.
*/
public static <T extends Tree> Matcher<T> hasMetaAnnotation(String annotationClass) {
TypePredicate typePredicate = hasAnnotation(annotationClass);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,18 @@ void matcher() {
CompilationTestHelper.newInstance(TestMatcher.class, getClass())
.addSourceLines(
"/A.java",
"import org.junit.jupiter.api.AfterAll;",
"import org.junit.jupiter.api.RepeatedTest;",
"import org.junit.jupiter.api.Test;",
"import org.junit.jupiter.api.AfterAll;",
"import org.junit.jupiter.params.ParameterizedTest;",
"import org.junit.jupiter.api.TestTemplate;",
"import org.junit.jupiter.params.ParameterizedTest;",
"",
"class A {",
" private void negative1() {}",
"",
" @Test",
" void negative2() {}",
"",
"",
" @TestTemplate",
" void negative3() {}",
"",
Expand Down

0 comments on commit 541df42

Please sign in to comment.