Use static factory method for fragment classes.