Beispiel #1
0
  private void restoreDefinition(@Nonnull Class<?> redefinedClass) {
    if (redefinedClassesWithNativeMethods.contains(redefinedClass.getName())) {
      reregisterNativeMethodsForRestoredClass(redefinedClass);
    }

    removeMockedClass(redefinedClass);
  }
Beispiel #2
0
  public boolean isMockedClass(@Nonnull String targetClassName) {
    int n = mockedClasses.size();

    for (int i = 0; i < n; i++) {
      Class<?> mockedClass = mockedClasses.get(i);

      if (targetClassName.equals(mockedClass.getName())) {
        return true;
      }
    }

    return false;
  }