proxytestplugin.java
来自「pojo的mvc框架」· Java 代码 · 共 35 行
JAVA
35 行
package xyz.frame.plugin;import java.util.Set;import xyz.frame.component.ComponentType;import xyz.frame.webapp.DefaultWebApplication;/** * A plugin capable of creating functional testing classes. * * @author Guilherme Silveira */public class ProxyTestPlugin implements XyzPlugin { private final HtmlTestCreator creator = new HtmlTestCreator(); public void init(DefaultWebApplication application) { Set<ComponentType> components = application.getComponentManager() .getComponents(); // LoggerInterceptor interceptor = new LoggerInterceptor(); for (ComponentType component : components) { //component.registerInterceptor(interceptor); application.getComponentManager() .register(wrapComponent(component)); } application.setViewManager(new HtmlProxyTestViewManager(application .getViewManager())); } private ComponentType wrapComponent(ComponentType component) { return new ProxyTestComponent(component, creator); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?