private Object createScriptProxy(Class<?> artifactType,
String scriptName,
Object root) {
if (Renderer.class.equals(artifactType)) {
return new RendererProxy(scriptName);
} else if (PhaseListener.class.equals(artifactType)) {
return new PhaseListenerProxy(scriptName);
} else if (ViewHandler.class.equals(artifactType)) {
return new ViewHandlerProxy(scriptName, (ViewHandler) root);
} else if (NavigationHandler.class.equals(artifactType)) {