Prefer interface to implementation in type declaration

This fixes the build failure with JDK 8 due to animal sniffer error