Michael Jouravlev replied > On 2/16/06, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > > In the method you want to "protect", immediately throw an exception > > and catch it. Then, parse the stack trace and see who the > caller was. > > If it's not a class you want to have access to the method, throw an > > IllegalAccessException. > > I guess it can be costly if the callers are mostly the ones > that you want to allow access to. On the other hand, I don't > know the metrics on how costly is to create and throw an exception.
I don't think you'd have to throw and catch it. I think it's sufficient to create an instance of Throwable to check the stack trace. - George http://www.idiacomputing.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]