Avoid reflective calls by structural subtyping