Code example for PermissionCollection

Methods: add, implies

0
      MBeanServerPermission p1 = new MBeanServerPermission("createMBeanServer");
      assertTrue("createMBeanServer implies newMBeanServer", p1.implies(p0));
      assertTrue("createMBeanServer implies newMBeanServer", p0.implies(p1));
 
      PermissionCollection pc = p0.newPermissionCollection();
      pc.add(p0);
      assertTrue("PC(newMBeanServer) implies createMBeanServer", pc.implies(p1));
   } 
}