code: public final void setSecurityController(SecurityController controller)
      {
          if (sealed) onSealedMutation();
          if (controller == null) throw new IllegalArgumentException();
          if (securityController != null) {
              throw new SecurityException("Can not overwrite existing SecurityController object");
          }
          if (SecurityController.hasGlobal()) {
              throw new SecurityException("Can not overwrite existing global SecurityController object");
          }
          securityController = controller;
      }
docs: Set the security controller for this context.
  <p> SecurityController may only be set if it is currently null
  and {@link SecurityController#hasGlobal()} is <tt>false</tt>.
  Otherwise a SecurityException is thrown.
  @param controller a SecurityController object
  @throws SecurityException if there is already a SecurityController
  object for this Context or globally installed.
  @see SecurityController#initGlobal(SecurityController controller)
  @see SecurityController#hasGlobal()