code: @SuppressWarnings("unchecked")
     public <T> T newBean(Class<?> interfaceClass, ObjectName objectName)
     {
  	   if(interfaceClass == null)
  		   return null;
  	   
  	return (T)javax.management.JMX.newMBeanProxy(connection, objectName, interfaceClass);
     }
docs: --------------------------------------------------------