Class NoShadowingOrOverridesOnMethodsRule

java.lang.Object
com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule
All Implemented Interfaces:
org.junit.rules.TestRule
Direct Known Subclasses:
NoClassHooksShadowingRule, NoInstanceHooksOverridesRule

public abstract class NoShadowingOrOverridesOnMethodsRule extends Object implements org.junit.rules.TestRule
Discovers shadowing or override relationships among methods annotated with any of the provided annotations.
  • Field Details

  • Constructor Details

    • NoShadowingOrOverridesOnMethodsRule

      @SafeVarargs public NoShadowingOrOverridesOnMethodsRule(Class<? extends Annotation>... annotations)
  • Method Details

    • apply

      public final org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
      Specified by:
      apply in interface org.junit.rules.TestRule
    • validate

      public final void validate(Class<?> clazz) throws Throwable
      Throws:
      Throwable
    • checkNoShadowsOrOverrides

      private void checkNoShadowsOrOverrides(Class<?> clazz, ClassModel classModel, Class<? extends Annotation> ann)
    • verify

      protected boolean verify(Method key)
    • signature

      private String signature(Method m)