KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > impl > test > ComponentClassImpl


1 /*
2  * Sun Public License Notice
3  *
4  * The contents of this file are subject to the Sun Public License
5  * Version 1.0 (the "License"). You may not use this file except in
6  * compliance with the License. A copy of the License is available at
7  * http://www.sun.com/
8  *
9  * The Original Code is NetBeans. The Initial Developer of the Original
10  * Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun
11  * Microsystems, Inc. All Rights Reserved.
12  */

13
14 package impl.test;
15
16 import test.*;
17 import java.util.*;
18 import org.netbeans.mdr.handlers.*;
19 import org.netbeans.mdr.storagemodel.*;
20 import javax.jmi.reflect.*;
21
22 public abstract class ComponentClassImpl extends ClassProxyHandler implements ComponentClass {
23     
24     /** Creates a new instance of ComponentClassImpl */
25     public ComponentClassImpl(StorableClass storable) {
26         super(storable);
27     }
28
29     public Component createComponent(java.lang.String JavaDoc name, int version) {
30         for (Iterator it = refAllOfClass().iterator(); it.hasNext();)
31             if (name == null || name.equals(((Component)it.next()).getName()))
32                 return null;
33         return super_createComponent(name, version);
34     }
35
36     public abstract Component super_createComponent(java.lang.String JavaDoc name, int version);
37 }
38
Popular Tags