code: 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;
    }
docs: Returns the root object of the JAXB structure for the content
  cast to a more specific class.
  @param as	the class of the object
  @param <T> the type to return
  @return	the root JAXB object