public < T > T get ( Class < T > as ) { if ( content == null ) { return null ; } if ( as == null ) { throw new IllegalArgumentException ( "Cannot cast content to null class" ) ; } if ( ! as . isAssignableFrom ( content . getClass ( ) ) ) { throw new IllegalArgumentException ( "Cannot cast " + content . getClass ( ) . getName ( ) + " to " + as . getName ( ) ) ; } @ SuppressWarnings ( "unchecked" ) T content = ( T ) get ( ) ; return content ; }
Returns the root object of the JAXB structure for the content cast to a more specific class .