subclassEngine = new TypeCachingBytecodeGenerator(new SubclassBytecodeGenerator(withDefaultConfiguration() .withBinders(of(MockMethodAdvice.Identifier.class, identifier)) .to(MockMethodAdvice.ForReadObject.class), isAbstract().or(isNative()).or(isToString())), false); mockTransformer = new AsmVisitorWrapper.ForDeclaredMethods() .method(isVirtual()
protected ElementMatcher.Junction<MethodDescription> getMethodElementMatcher() { return not(isConstructor()) .and(not(isAbstract())) .and(not(isNative())) .and(not(isFinal())) .and(not(isSynthetic())) .and(not(isTypeInitializer())) .and(getExtraMethodElementMatcher()); }
.and(not(isNative())) .and(not(isSynthetic())) .and(not(isTypeInitializer()));