KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > phoenix > components > kernel > beanshell > BeanShellKernel


1 /* Copyright (C) The Apache Software Foundation. All rights reserved.
2  *
3  * This software is published under the terms of the Apache Software License
4  * version 1.1, a copy of which has been included with this distribution in
5  * the LICENSE.txt file.
6  */

7 package org.apache.avalon.phoenix.components.kernel.beanshell;
8
9 import org.apache.avalon.excalibur.proxy.DynamicProxy;
10 import org.apache.avalon.phoenix.components.kernel.DefaultKernel;
11 import org.apache.avalon.phoenix.interfaces.Kernel;
12
13 public class BeanShellKernel
14     extends DefaultKernel
15 {
16     private Kernel m_kernel;
17
18     /**
19      * Overides Initialize from DefaultKernel
20      */

21     public void initialize()
22         throws Exception JavaDoc
23     {
24         super.initialize();
25
26         final BeanShellKernelProxy proxy = new BeanShellKernelProxy( this );
27         final Class JavaDoc[] interfaces = new Class JavaDoc[]{Kernel.class};
28         m_kernel = (Kernel)DynamicProxy.newInstance( proxy, interfaces );
29
30         final BeanShellGUI beanShell = new BeanShellGUI( m_kernel );
31         beanShell.init();
32     }
33 }
34
Popular Tags