Exemplo n.º 1
0
 private void validateModificationOfNativeMethod(int access, String name) {
   if (isNative(access) && !Startup.isJava6OrLater()) {
     throw new IllegalArgumentException(
         "Mocking of native methods not supported under JDK 1.5; please filter out method \""
             + name
             + "\", or run under JDK 1.6+");
   }
 }
Exemplo n.º 2
0
  public void removeCaptureTransformers(int previousTransformerCount) {
    int currentTransformerCount = captureTransformers.size();

    for (int i = currentTransformerCount - 1; i >= previousTransformerCount; i--) {
      CaptureTransformer<?> transformer = captureTransformers.get(i);
      transformer.deactivate();
      Startup.instrumentation().removeTransformer(transformer);
      captureTransformers.remove(i);
    }
  }