Using reflection in factories to avoid runtime warnings for unresolved super classes.