static SecurityBreachHandler createBreachHandler ( Main main , SystemMail systemMail , String toAddress ) throws IllegalAccessException { if ( ! exists ) { SecurityBreachHandler breachHandler = new SecurityBreachHandler ( main , systemMail , toAddress ) ; exists = true ; return breachHandler ; } throw new IllegalAccessException ( "Cannot create more than one instance of SecurityBreachHandler" ) ; }
Creates a SecurityBreachHandler . There can only be one single SecurityBreachHandler so calling this method twice will cause an illegal access exception .