code: public static <T> Method implementation( T instance, Class<T> base, String methodName )
      {
          Method proto = Stream.of( base.getDeclaredMethods() )
                               .filter( method -> methodName.equals( method.getName() ) &&
                                                  isAbstract( method.getModifiers() ) )
                               .reduce( ( l, r ) -> {
                                   throw new IllegalStateException( "Too many methods '" + methodName + "' of " + base );
                               } )
                               .orElseThrow( () -> new IllegalStateException(
                                       "No method '" + methodName + "' of " + base ) );
          for ( Class<?> klass = instance.getClass(); klass != Object.class; klass = klass.getSuperclass() )
          {
              Method actual;
              try
              {
                  actual = klass.getDeclaredMethod( proto.getName(), proto.getParameterTypes() );
              }
              catch ( NoSuchMethodException e )
              {
                  continue;
              }
              if ( actual.isBridge() )
              {
                  return Stream.of( klass.getDeclaredMethods() )
                               .filter( method -> !method.isBridge() &&
                                                  methodName.equals( method.getName() ) &&
                                                  method.getParameterCount() == proto.getParameterCount() )
                               .reduce( ( l, r ) -> {
                                   throw new IllegalStateException( "Too many methods for bridge: " + actual );
                               } )
                               .orElseThrow( () -> new IllegalStateException( "No method for bridge: " + actual ) );
              }
              return actual;
          }
          throw new IllegalStateException( "Cannot find implementation of " + proto );
      }
docs: Find that method of a given instance that implements the specified abstract method of a given base class.
  <p>
  This is useful for finding the <i>actual</i> type that implements a type parameter of the base class.
  
  @param instance   the instance to find the implementation method of.
  @param base       the base class that declares the abstract method in question.
  @param methodName the name of the abstract method.
  @param <T>        the base type of the instance (the type of the base class).
  @return the method that implements the abstract method of the base class.