@Test public void testNonSpecializableSuperClassMethodIsNotInvokable() throws Exception { when(invokableMethod.isSpecializableFor(rawSuperClass)).thenReturn(false); when(resolution.isRebased()).thenReturn(false); when(resolution.getResolvedMethod()).thenReturn(invokableMethod); Implementation.SpecialMethodInvocation specialMethodInvocation = makeImplementationTarget().invokeSuper(invokableToken); assertThat(specialMethodInvocation.isValid(), is(false)); }
public Implementation.SpecialMethodInvocation invokeSuper(MethodDescription.SignatureToken token) { MethodRebaseResolver.Resolution resolution = rebaseableMethods.get(token); return resolution == null ? invokeSuper(methodGraph.getSuperClassGraph().locate(token)) : invokeSuper(resolution); }
RebaseImplementationTarget extends Implementation.Target.AbstractBase { public Implementation.SpecialMethodInvocation invokeSuper(MethodDescription.SignatureToken token) { MethodRebaseResolver.Resolution resolution = rebaseableMethods.get(token); return resolution == null ? invokeSuper(methodGraph.getSuperClassGraph().locate(token)) : invokeSuper(resolution); } }
RebaseImplementationTarget extends Implementation.Target.AbstractBase { public Implementation.SpecialMethodInvocation invokeSuper(MethodDescription.SignatureToken token) { MethodRebaseResolver.Resolution resolution = rebaseableMethods.get(token); return resolution == null ? invokeSuper(methodGraph.getSuperClassGraph().locate(token)) : invokeSuper(resolution); } protected  RebaseImplementationTarget(TypeDescription instrumentedType,
                                         MethodGraph.Linked methodGraph,
                                         DefaultMethodInvocation defaultMethodInvocation,
                                         Map<MethodDescription.SignatureToken, MethodRebaseResolver.Resolution> rebaseableMethods); }
RebaseImplementationTarget extends Implementation.Target.AbstractBase { public Implementation.SpecialMethodInvocation invokeSuper(MethodDescription.SignatureToken token) { MethodRebaseResolver.Resolution resolution = rebaseableMethods.get(token); return resolution == null ? invokeSuper(methodGraph.getSuperClassGraph().locate(token)) : invokeSuper(resolution); } protected  RebaseImplementationTarget(TypeDescription instrumentedType,
                                         MethodGraph.Linked methodGraph,
                                         DefaultMethodInvocation defaultMethodInvocation,
                                         Map<MethodDescription.SignatureToken, MethodRebaseResolver.Resolution> rebaseableMethods); Implementation.SpecialMethodInvocation invokeSuper(MethodDescription.SignatureToken token); TypeDescription getOriginType(); }
RebaseImplementationTarget extends Implementation.Target.AbstractBase { public Implementation.SpecialMethodInvocation invokeSuper(MethodDescription.SignatureToken token) { MethodRebaseResolver.Resolution resolution = rebaseableMethods.get(token); return resolution == null ? invokeSuper(methodGraph.getSuperClassGraph().locate(token)) : invokeSuper(resolution); } protected  RebaseImplementationTarget(TypeDescription instrumentedType,
                                         MethodGraph.Linked methodGraph,
                                         DefaultMethodInvocation defaultMethodInvocation,
                                         Map<MethodDescription.SignatureToken, MethodRebaseResolver.Resolution> rebaseableMethods); Implementation.SpecialMethodInvocation invokeSuper(MethodDescription.SignatureToken token); TypeDescription getOriginType();  }