예제 #1
0
  void restoreTransformedClasses(@Nonnull Set<ClassIdentification> previousTransformedClasses) {
    if (!transformedClasses.isEmpty()) {
      Set<ClassIdentification> classesToRestore;

      if (previousTransformedClasses.isEmpty()) {
        classesToRestore = transformedClasses.keySet();
      } else {
        classesToRestore = getTransformedClasses();
        classesToRestore.removeAll(previousTransformedClasses);
      }

      if (!classesToRestore.isEmpty()) {
        restoreAndRemoveTransformedClasses(classesToRestore);
      }
    }
  }
예제 #2
0
  private void restoreDefinition(@Nonnull Class<?> redefinedClass) {
    if (redefinedClassesWithNativeMethods.contains(redefinedClass.getName())) {
      reregisterNativeMethodsForRestoredClass(redefinedClass);
    }

    removeMockedClass(redefinedClass);
  }
예제 #3
0
 public void addRedefinedClassWithNativeMethods(@Nonnull String redefinedClassInternalName) {
   redefinedClassesWithNativeMethods.add(redefinedClassInternalName.replace('/', '.'));
 }