public boolean shouldIgnore()

in instrumentation/src/com/intellij/rt/coverage/instrumentation/filters/methods/KotlinLocalFunctionInsideIgnoredMethodFilter.java [38:59]


  public boolean shouldIgnore(InstrumentationData context) {
    if (!OptionsUtil.IGNORE_LOCAL_FUNCTIONS_IN_IGNORED_METHODS) return false;
    int access = context.getMethodAccess();
    if (!((access & Opcodes.ACC_PRIVATE) != 0
        && (access & Opcodes.ACC_FINAL) != 0
        && (access & Opcodes.ACC_STATIC) != 0)) return false;
    int idx = -1;
    String name = context.getMethodName();
    String className = context.get(Key.CLASS_NAME);
    FilteredMethodStorage storage = context.getProjectContext().getFilteredStorage();
    while (true) {
      idx = name.indexOf('$', idx + 1);
      if (idx < 0) return false;
      String outerMethodName = name.substring(0, idx);
      for (boolean included : new boolean[]{false, true}) {
        if (storage.isMethodNameRegistered(className, outerMethodName, included)) {
          storage.addMethod(className, context.getMethodName() + context.getMethodDesc(), included);
          return !included;
        }
      }
    }
  }