This is the simplest way to limit method access.
这是限制方法访问的最简单方式。
Reflection is much slower than direct code when used for field and method access.
当用于字段和方法接入时反射要远慢于直接代码。
So far we have seen the Web application invoking EJB2.1 and EJB3 session beans with unrestricted method access.
到目前为止,我们看到的都是Web应用程序使用无限制的方法访问调用EJB2.1和EJB3会话Bean。
I'd really like to have that modularity that says, I'm only going to get access to the values, not by calling their names, but by calling some specific method to get access to their names.
这样我们就丢掉了代码的模块化,我很希望代码有这样的模块化:,我访问变量的值,不是通过直接调用它们的名字,而是通过调用某个可以,访问这些变量名的方法来访问。
I would only ever access the values through a method.
如果我真的很讲卫生,我只会通过一个方法来访问变量值。
应用推荐