MissingRefasterAnnotation
The Refaster template contains a method without any Refaster annotations

Severity
WARNING
Tags
LikelyError

The problem

A Refaster template consists of multiple methods. Typically, each method in the class has an annotation. If a method has no annotation, this is likely an oversight.

static final class MethodLacksBeforeTemplateAnnotation {
  @BeforeTemplate
  boolean before1(String string) {
    return string.equals("");
  }

  // @BeforeTemplate is missing
  boolean before2(String string) {
    return string.length() == 0;
  }

  @AfterTemplate
  @AlsoNegation
  boolean after(String string) {
    return string.isEmpty();
  }
}

Suppression

Suppress false positives by adding the suppression annotation @SuppressWarnings("MissingRefasterAnnotation") to the enclosing element.