Decision shouldVisitMethod()

in test-discovery/src/com/intellij/rt/coverage/testDiscovery/instrumentation/InstrumentedMethodsFilter.java [36:57]


  Decision shouldVisitMethod(final int access,
                             final String name,
                             final String desc,
                             final String signature,
                             final String[] exceptions,
                             boolean instrumentConstructorsForce) {
    if ((access & Opcodes.ACC_BRIDGE) != 0) return Decision.NO; //try to skip bridge methods
    if ((access & Opcodes.ACC_ABSTRACT) != 0) return Decision.NO; //skip abstracts; do not include interfaces without non-abstract methods in result
    if ("<clinit>".equals(name) || //static initializer
        (access & Opcodes.ACC_SYNTHETIC) != 0) {//skip all synthetic methods
      return Decision.NO;
    }
    if (name.equals("<init>") && desc.equals("()V")) {
      // should check deep
      return instrumentConstructorsForce ? Decision.YES : Decision.CHECK_IS_CONSTRUCTOR_DEFAULT;
    }

    if (myEnum && isDefaultEnumMethod(name, desc, signature, myClassName)) {
      return Decision.NO;
    }
    return Decision.YES;
  }