public < T extends Post > T newPost ( String blogName , Class < T > klass ) throws IllegalAccessException , InstantiationException { T post = klass . newInstance ( ) ; post . setClient ( this ) ; post . setBlogName ( blogName ) ; return post ; }
Set up a new post of a given type