Dynamic proxy classes have many interesting USES within an application, one of which is to effectively handle pre - and post-method invocation operations in a uniform fashion.
动态代理类有许多应用程序中使用的接口,其中一个可以用统一的方式有效地处理方法前和方法后的调用操作。
Because validation is often a pre-method invocation operation, dynamic proxies provide us with a solution to the problems outlined in the previous examples.
因为验证通常是方法前调用操作,所以动态代理为我们提供了针对前面示例所指出的问题的解决方案。
A good, hygienic way of doing this is, not only do I not go in and change things except through a pre-defined method, I shouldn't read it other Cartesian than through a pre-defined method.
做这个的方式是,我不仅仅要通过提前定义好的方法,来改变数值,我还应该通过提前定义好的方法,来读这个值,我应该用。
应用推荐