Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / libjava / classpath / java / beans / beancontext / BeanContextSupport.java
blob60ccc3af3e415ffbf963ab7a833d7a6f977b8bbc
1 /* BeanContextSupport.java --
2 Copyright (C) 2003, 2005 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 02110-1301 USA.
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package java.beans.beancontext;
41 import java.beans.PropertyChangeEvent;
42 import java.beans.PropertyChangeListener;
43 import java.beans.PropertyVetoException;
44 import java.beans.VetoableChangeListener;
45 import java.beans.Visibility;
46 import java.io.IOException;
47 import java.io.InputStream;
48 import java.io.ObjectInputStream;
49 import java.io.ObjectOutputStream;
50 import java.io.Serializable;
51 import java.net.URL;
52 import java.util.ArrayList;
53 import java.util.Collection;
54 import java.util.HashMap;
55 import java.util.Iterator;
56 import java.util.Locale;
58 /**
59 * @author Michael Koch
60 * @since 1.2
62 public class BeanContextSupport extends BeanContextChildSupport
63 implements BeanContext, Serializable, PropertyChangeListener,
64 VetoableChangeListener
66 private static final long serialVersionUID = -4879613978649577204L;
68 private void readObject (ObjectInputStream s)
69 throws ClassNotFoundException, IOException
71 throw new Error ("Not implemented");
74 private void writeObject (ObjectOutputStream s)
75 throws ClassNotFoundException, IOException
77 throw new Error ("Not implemented");
80 protected class BCSChild implements Serializable
82 private static final long serialVersionUID = -5815286101609939109L;
85 protected static final class BCSIterator implements Iterator
87 public boolean hasNext ()
89 throw new Error ("Not implemented");
92 public Object next ()
94 throw new Error ("Not implemented");
97 public void remove ()
99 // This must be a noop remove operation.
103 protected transient ArrayList bcmListeners;
105 protected transient HashMap children;
107 protected transient boolean designTime;
109 protected transient Locale locale;
111 protected transient boolean okToUseGui;
114 * Construct a BeanContextSupport instance.
116 public BeanContextSupport ()
118 this (null, null, true, true);
122 * Construct a BeanContextSupport instance.
124 public BeanContextSupport (BeanContext peer)
126 this (peer, null, true, true);
130 * Construct a BeanContextSupport instance.
132 public BeanContextSupport (BeanContext peer, Locale lcle)
134 this (peer, lcle, true, true);
138 * Construct a BeanContextSupport instance.
140 public BeanContextSupport (BeanContext peer, Locale lcle, boolean dtime)
142 this (peer, lcle, dtime, true);
146 * Construct a BeanContextSupport instance.
148 public BeanContextSupport (BeanContext peer, Locale lcle, boolean dtime,
149 boolean visible)
151 locale = lcle;
152 designTime = dtime;
153 okToUseGui = visible;
155 initialize ();
158 public boolean add (Object targetChild)
160 if (targetChild == null)
161 throw new IllegalArgumentException();
163 if (children.containsKey(targetChild))
164 return false;
166 // FIXME: The second argument is surely wrong.
167 children.put(targetChild, targetChild);
168 return true;
171 public boolean addAll (Collection c)
173 throw new UnsupportedOperationException();
176 public void addBeanContextMembershipListener
177 (BeanContextMembershipListener listener)
179 if (! bcmListeners.contains(listener))
180 bcmListeners.add(listener);
183 public boolean avoidingGui ()
185 throw new Error ("Not implemented");
188 protected Iterator bcsChildren ()
190 throw new Error ("Not implemented");
193 protected void bcsPreDeserializationHook (ObjectInputStream ois)
194 throws ClassNotFoundException, IOException
196 throw new Error ("Not implemented");
199 protected void bcsPreSerializationHook (ObjectOutputStream oos)
200 throws IOException
202 throw new Error ("Not implemented");
205 protected void childDeserializedHook (Object child, BeanContextSupport.BCSChild bcsc)
207 throw new Error ("Not implemented");
210 protected void childJustAddedHook (Object child, BeanContextSupport.BCSChild bcsc)
212 throw new Error ("Not implemented");
215 protected void childJustRemovedHook (Object child, BeanContextSupport.BCSChild bcsc)
217 throw new Error ("Not implemented");
220 protected static final boolean classEquals (Class first, Class second)
222 throw new Error ("Not implemented");
225 public void clear ()
227 throw new UnsupportedOperationException();
230 public boolean contains (Object o)
232 throw new Error ("Not implemented");
235 public boolean containsAll (Collection c)
237 throw new Error ("Not implemented");
240 public boolean containsKey (Object o)
242 throw new Error ("Not implemented");
245 protected final Object[] copyChildren ()
247 throw new Error ("Not implemented");
250 protected BeanContextSupport.BCSChild createBCSChild (Object targetChild, Object peer)
252 throw new Error ("Not implemented");
255 protected final void deserialize (ObjectInputStream ois, Collection coll)
256 throws ClassNotFoundException, IOException
258 throw new Error ("Not implemented");
261 public void dontUseGui ()
263 throw new Error ("Not implemented");
266 protected final void fireChildrenAdded (BeanContextMembershipEvent bcme)
268 throw new Error ("Not implemented");
271 protected final void fireChildrenRemoved (BeanContextMembershipEvent bcme)
273 throw new Error ("Not implemented");
276 public BeanContext getBeanContextPeer ()
278 throw new Error ("Not implemented");
281 protected static final BeanContextChild getChildBeanContextChild (Object child)
283 throw new Error ("Not implemented");
286 protected static final BeanContextMembershipListener getChildBeanContextMembershipListener (Object child)
288 throw new Error ("Not implemented");
291 protected static final PropertyChangeListener getChildPropertyChangeListener (Object child)
293 throw new Error ("Not implemented");
296 protected static final Serializable getChildSerializable (Object child)
298 throw new Error ("Not implemented");
301 protected static final VetoableChangeListener getChildVetoableChangeListener (Object child)
303 throw new Error ("Not implemented");
306 protected static final Visibility getChildVisibility (Object child)
308 throw new Error ("Not implemented");
311 public Locale getLocale ()
313 return locale;
316 public URL getResource (String name, BeanContextChild bcc)
318 throw new Error ("Not implemented");
321 public InputStream getResourceAsStream (String name, BeanContextChild bcc)
323 throw new Error ("Not implemented");
326 protected void initialize ()
328 bcmListeners = new ArrayList();
329 children = new HashMap();
332 public Object instantiateChild (String beanName)
333 throws IOException, ClassNotFoundException
335 throw new Error ("Not implemented");
338 public boolean isDesignTime ()
340 throw new Error ("Not implemented");
343 public boolean isEmpty ()
345 throw new Error ("Not implemented");
348 public boolean isSerializing ()
350 throw new Error ("Not implemented");
353 public Iterator iterator ()
355 return children.keySet().iterator();
358 public boolean needsGui ()
360 throw new Error ("Not implemented");
363 public void okToUseGui ()
365 throw new Error ("Not implemented");
368 public void propertyChange (PropertyChangeEvent pce)
370 throw new Error ("Not implemented");
373 public final void readChildren (ObjectInputStream ois)
374 throws IOException, ClassNotFoundException
376 throw new Error ("Not implemented");
379 public boolean remove (Object targetChild)
381 return remove(targetChild, true);
384 protected boolean remove (Object targetChild, boolean callChildSetBC)
386 if (targetChild == null)
387 throw new IllegalArgumentException();
389 throw new Error ("Not implemented");
392 public boolean removeAll (Collection c)
394 throw new UnsupportedOperationException();
397 public void removeBeanContextMembershipListener (BeanContextMembershipListener bcml)
399 throw new Error ("Not implemented");
402 public boolean retainAll (Collection c)
404 throw new UnsupportedOperationException();
407 protected final void serialize (ObjectOutputStream oos, Collection coll)
408 throws IOException
410 throw new Error ("Not implemented");
413 public void setDesignTime (boolean dtime)
415 throw new Error ("Not implemented");
418 public void setLocale (Locale newLocale)
419 throws PropertyVetoException
421 throw new Error ("Not implemented");
424 public int size ()
426 throw new Error ("Not implemented");
429 public Object[] toArray ()
431 return children.keySet().toArray();
434 public Object[] toArray(Object[] array)
436 return children.keySet().toArray(array);
439 protected boolean validatePendingAdd (Object targetChild)
441 throw new Error ("Not implemented");
444 protected boolean validatePendingRemove (Object targetChild)
446 throw new Error ("Not implemented");
449 public void vetoableChange (PropertyChangeEvent pce)
450 throws PropertyVetoException
452 throw new Error ("Not implemented");
455 public final void writeChildren (ObjectOutputStream oos)
456 throws IOException
458 throw new Error ("Not implemented");