Call `superType.getErasedType()` outside the anonymous class:

    final Class<?> erasedType = superType.getErasedType();
    return new TypeParameterMatcher() { ... erasedType.isInstance(..); ... }