One technique that's useful during development work with many languages is to use the exception system's built-in introspection. This turns our example into something like this
在开发工作中许多语言采用了一种有用的技术 - 使用异常系统内置的内省。
Using open classes to add new methods to a built-in class is a common technique for adding expressiveness to DSLs.
使用打开类将新方法添加到内置类是一种将表现力添加到 DSL 的常用技术。
This example demonstrates the second technique because using filters takes advantage of built-in web application server technology and pre-written code from the Shiro project.
本例展示了第二种技巧,因为使用过滤器充分利用了内置web应用服务器技术以及来自Shiro项目的预先编写好的代码。
应用推荐