title: Setting the Java SecurityManager for one method only
body: <p>I have a method A which might look like following:</p>
  
  <pre><code>public double A{
    if (secM == null) {
      secM = new SecurityManager();
      System.setSecurityManager(secM);
    }
    //do something and return a double
  
  }
  </code></pre>
  
  <p>The problem is that once the SecurityManager is set, it is for the entire project, but I only need it to be for the class this method is in.
  How can I tell the SecurityManager to only verify the permissions for this method/class?</p>