Major merge with Classpath.

Removed many duplicate files.
	* HACKING: Updated.x
	* classpath: Imported new directory.
	* standard.omit: New file.
	* Makefile.in, aclocal.m4, configure: Rebuilt.
	* sources.am: New file.
	* configure.ac: Run Classpath configure script.  Moved code around
	to support.  Disable xlib AWT peers (temporarily).
	* Makefile.am (SUBDIRS): Added 'classpath'
	(JAVAC): Removed.
	(AM_CPPFLAGS): Added more -I options.
	(BOOTCLASSPATH): Simplified.
	Completely redid how sources are built.
	Include sources.am.
	* include/Makefile.am (tool_include__HEADERS): Removed jni.h.
	* include/jni.h: Removed (in Classpath).
	* scripts/classes.pl: Updated to look at built classes.
	* scripts/makemake.tcl: New file.
	* testsuite/libjava.jni/jni.exp (gcj_jni_compile_c_to_so): Added
	-I options.
	(gcj_jni_invocation_compile_c_to_binary): Likewise.

From-SVN: r102082
This commit is contained in:
Tom Tromey 2005-07-16 01:27:14 +00:00 committed by Tom Tromey
parent ea54b29342
commit b0fa81eea9
2817 changed files with 11656 additions and 643398 deletions

View file

@ -1,272 +0,0 @@
/* java.beans.beancontext.BeanContext
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
import java.beans.DesignMode;
import java.beans.Visibility;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Collection;
/**
* Acts as a container for sub-beans and as a sub-bean,
* so that an entire hierarchy of beans can be made up of
* <code>BeanContext</code>s.
* <P>
*
* Since I can't sprinkle the <code>Collections</code> interface
* documentation with special information for <code>BeanContext</code>
* implementors, I'll have to document special requirements for
* implementors of those functions here.
* <P>
*
* <code><strong>add()</strong></code> or <code>addAll()</code>:
* <br>
* <OL>
* <LI>
* May add any <code>Object</code> into the hierarchy as well as a
* <code>BeanContextChild</code>, <code>BeanContext</code> or
* <code>BeanContextProxy</code> object.
* This way, any Bean can be in the hierarchy.
* </LI>
* <LI>
* Must synchronize on <code>BeanContext.globalHierarchyLock</code>.
* </LI>
* <LI>
* Don't add the <code>Object</code> if it's already there (only once
* per <code>BeanContext</code>).
* </LI>
* <LI>
* If it is a <code>BeanContextChild</code> implementor, call
* <code>setBeanContext()</code> on it. If it's a
* <code>BeanContextProxy</code> implementor, call
* <code>getBeanContextProxy().setBeanContext()</code> on it.
* If <code>setBeanContext()</code> vetoes the change, back out
* all changes so far and throw <code>IllegalStateException</code>.
* </LI>
* <LI>
* If it (or its proxy) implements <code>Visibility</code>, call
* <code>dontUseGui()</code> or <code>okToUseGui()</code> on it,
* depending on whether you (the <code>BeanContext</code>) feel like
* allowing it to use the GUI or not.
* </LI>
* <LI>
* If it implements <code>BeanContextChild</code> or
* <code>BeanContextProxy</code>, register yourself (the
* <code>BeanContext</code>) as both a
* <code>PropertyChangeListener</code> and
* <code>VetoableChangeListener</code> on the "beanContext"
* property (it may also add itself on any other properties it wishes
* to).
* </LI>
* <LI>
* If it is a listener or event source that you (the
* <code>BeanContext</code>) are interested in, you may register
* yourself to it or register it to you.
* </LI>
* <LI>
* Fire a <code>java.beans.beancontext.BeanContextMembershipEvent</code>
* before exiting. <code>addAll()</code> should wait until everything
* is done changing before firing the event (or events) so that if a
* failure occurs, the backing-out process can proceed without any
* events being fired at all.
* </LI>
* </OL>
* <P>
*
* <code><strong>remove()</strong></code> or <code>removeAll()</code>:
* <br>
* <OL>
* <LI>
* Must synchronize on <code>BeanContext.globalHierarchyLock</code>.
* </LI>
* <LI>
* If the specified <code>Object</code> is not a child of this
* <code>BeanContext</code>, just exit without performing any actions.
* </LI>
* <LI>
* Remove the <code>Object</code> from your collection of children.
* </LI>
* <LI>
* If it is a <code>BeanContextChild</code> implementor, call
* <code>setBeanContext(null)</code> on it. If it's a
* <code>BeanContextProxy</code> implementor, call
* <code>getBeanContextProxy().setBeanContext(null)</code> on it.
* If <code>setBeanContext()</code> vetoes the change, back out
* all changes so far and throw <code>IllegalStateException</code>.
* </LI>
* <LI>
* If you registered the <code>Object</code> to listen to you or
* registered yourself as a listener on the <code>Object</code> during
* <code>add()</code> or <code>addAll()</code>, undo the registration
* bycalling the appropriate <code>removeListener()</code> method.
* </LI>
* <LI>
* Fire a <code>java.beans.beancontext.BeanContextMembershipEvent</code>
* before exiting. <code>removeAll()</code> should wait until
* everything is done changing before firing the event (or events) so
* that if a failure occurs, the backing-out process can proceed
* without any events being fired at all.
* </LI>
* </OL>
* <P>
*
* <code>addAll()</code>, <code>removeAll()</code>,
* <code>retainAll()</code> and <code>clear()</code> do not need to be
* implemented, but may be if so desired.
* <P>
*
* Similarly, <code>Visibility</code> and <code>DesignMode</code> methods
* should propagate changed values to children that implement interfaces
* of the same name.
* <P>
*
* A hierarchy of beans is mainly useful so that different sets of beans
* can be established, each with their own set of resources.
*
* @author John Keiser
* @since JDK1.2
*/
public interface BeanContext
extends Collection, BeanContextChild, Visibility, DesignMode {
/**
* The global lock on changing any BeanContext hierarchy.
* It kinda sucks that there is only one lock, since there can be
* multiple hierarchies. Oh well, I didn't design, I just code.
* <P>
*
* Methods that must (or do) synchronize on the global lock:
* <BR>
* <UL>
* <LI>
* Implementors of <CODE>BeanContext.add()</CODE> and <code>addAll()</code>
* </LI>
* </UL>
* @fixme fill in the rest of the methods which use the global lock.
*/
Object globalHierarchyLock = new Object();
/**
* Instantiate a Bean using this Bean's <code>ClassLoader</code>
* and this <code>BeanContext</code> as the parent.
* <P>
*
* This method exists mainly so that <code>BeanContext</code>
* implementations can perform extra actions on Beans that are
* created within them.
*
* @param beanName the name of the bean to instantiate
* @return the created Bean
*
* @see java.beans.Beans#instantiate(java.lang.ClassLoader,java.lang.String)
* @see java.beans.Beans#instantiate(java.lang.ClassLoader,java.lang.String,java.lang.BeanContext)
* @exception IOException if there is an I/O problem during
* instantiation.
* @exception ClassNotFoundException if a serialized Bean's class
* is not found.
*/
Object instantiateChild(String beanName)
throws IOException,
ClassNotFoundException;
/**
* Get a resource. The <code>BeanContext</code> will typically
* call <code>ClassLoader.getResource()</code>, but may do it any
* way it wants to. This allows a <code>BeanContext</code> to
* have its own set of resources separate from the rest of the
* system.
* <P>
*
* Beans should call this method on their parent rather than the
* associated <code>ClassLoader</code> method.
* <P>
*
* I am assuming, but am not entirely sure, that if a
* <code>BeanContext</code> cannot find a resource, its
* responsibility is to call the <code>getResource</code> method
* of its parent <code>BeanContext</code>.
*
* @return a URL to the requested resource.
* @param resourceName the name of the resource requested.
* @param requestor a reference to the child requesting the resource.
* @see java.lang.ClassLoader#getResource(java.lang.String)
*/
URL getResource(String resourceName, BeanContextChild requestor);
/**
* Get a resource as a stream. The <code>BeanContext</code> will
* typically call <code>ClassLoader.getResourceAsStream()</code>,
* but may do it any way it wants to. This allows a
* <code>BeanContext</code>'s children to have their own set of
* resources separate from the rest of the system.
* <P>
*
* Beans should call this method on their parent rather than the
* associated <code>ClassLoader</code> method.
* <P>
*
* I am assuming, but am not entirely sure, that if a
* <code>BeanContext</code> cannot find a resource, its
* responsibility is to call the <code>getResourceAsStream</code>
* method of its parent <code>BeanContext</code>.
*
* @return the requested resource as a stream.
* @param resourceName the name of the resource requested.
* @param requestor a reference to the child requesting the resource.
* @see java.lang.ClassLoader#getResourceAsStream(java.lang.String)
*/
InputStream getResourceAsStream(String resourceName, BeanContextChild requestor);
/**
* Add a listener on changes to the membership of this
* <code>BeanContext</code> object.
* @param listener the listener to add.
*/
void addBeanContextMembershipListener(BeanContextMembershipListener listener);
/**
* Remove a listener on changes to the membership of this
* <code>BeanContext</code> object.
* @param listener the listener to remove.
*/
void removeBeanContextMembershipListener(BeanContextMembershipListener listener);
}

View file

@ -1,174 +0,0 @@
/* java.beans.beancontext.BeanContextChild
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
import java.beans.PropertyChangeListener;
import java.beans.PropertyVetoException;
import java.beans.VetoableChangeListener;
/**
* Beans implement this to get information about the execution environment and
* its services and to be placed in the hierarchy.
* <P>
*
* The difference between a <code>BeanContext</code> and a
* <code>BeanContextChild</code>, mainly, is that a
* <code>BeanContext</code> may be a parent.
* <P>
*
* <code>BeanContextChild</code> instances will be serialized at some
* point in their life, but you need to make sure your bean context does
* not contain a serializable reference (directly or indirectly) to the
* parent <code>BeanContext</code>, to any of the other
* <code>BeanContext</code>s in the tree, or to any resources obtained
* via the <code>BeanContextServices</code> interface. One way to do this
* is to mark any fields that contain such references as
* <code>transient</code>. Another way is to use a custom serializer.
* <P>
*
* If you do not do this, when the <code>BeanContext</code> is serialized,
* all the other <code>BeanContext</code>s and other unnecessary things
* will be serialized along with it.
* <P>
*
* Before dying, a <code>BeanContextChild</code> should call
* <code>getBeanContext().remove(this)</code> to detach from the
* hierarchy and exit cleanly.
*
* @author John Keiser
* @since JDK1.2
* @see java.beans.beancontext.BeanContext
*/
public interface BeanContextChild {
/**
* Set the parent <code>BeanContext</code>.
* <P>
*
* This method is called from <code>BeanContext.add()</code> and
* should not be called directly.
* <P>
*
* When this Object is being added to a new BeanContext or moved
* from an old one, a non-null value will be passed in.
* <P>
*
* When this Object is being removed from the current
* <code>BeanContext</code>, <code>setBeanContext()</code> will
* receive the parameter <code>null</code>.
* <P>
*
* When being removed from the current <code>BeanContext</code>,
* it is the <code>BeanContextChild</code>'s responsibility to
* release all services it has obtained.
* <P>
*
* This change should generate <code>PropertyChangeEvent</code>
* and <code>VetoableChangeEvent</code>s with the property name
* "beanContext". If the change is vetoed, it must re-throw the
* exception and not change anything. In this way, the parent
* <code>BeanContextChild</code>, who has registered himself with
* you, will have a chance to remove this child from its
* collection.
* <P>
*
* If the Bean does not wish to change the parent or be removed
* from one, it may throw the <code>PropertyVetoException</code>.
* If you veto a <code>setBeanContext(null)</code> call, then you
* should try your hardest to remedy whatever problem is keeping
* you from being removed from the <code>BeanContext</code> so
* that you can <em>not</em> veto it the next time.
* Otherwise, nasty pathological recursion stuff could occur in
* certain situations.
* <P>
*
* If you do veto the change, you must first back out any changes
* you made prior to the veto. Best not to make any such changes
* prior to the veto in the first place.
* <P>
*
* This method is called from <code>BeanContext.add()</code> and
* should not be called directly.
*
* @param parent the new parent for the <code>BeanContextChild</code>,
* or <code>null</code> to signify removal from a tree.
* @exception PropertyVetoException if the
* <code>BeanContextChild</code> implementor does not
* wish to have its parent changed.
*/
void setBeanContext(BeanContext parent)
throws PropertyVetoException;
/**
* Get the parent <code>BeanContext</code>.
* @return the parent <code>BeanContext</code>.
*/
BeanContext getBeanContext();
/**
* Add a listener that will be notified when a specific property changes.
* @param prop the name of the property to listen on
* @param listener the listener to listen on the property.
*/
void addPropertyChangeListener(String prop, PropertyChangeListener listener);
/**
* Remove a listener to a certain property.
* @param prop the name of the property being listened on
* @param listener the listener listening on the property.
*/
void removePropertyChangeListener(String prop, PropertyChangeListener listener);
/**
* Add a listener that will be notified when a specific property
* change is requested (a PropertyVetoException may be thrown) as
* well as after the change is successfully made.
*
* @param prop the name of the property to listen on
* @param listener the listener to listen on the property.
*/
void addVetoableChangeListener(String prop, VetoableChangeListener listener);
/**
* Remove a listener to a certain property.
* @param prop the name of the property being listened on
* @param listener the listener listening on the property.
*/
void removeVetoableChangeListener(String prop, VetoableChangeListener listener);
}

View file

@ -1,60 +0,0 @@
/* java.beans.beancontext.BeanContextChildComponentProxy
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
import java.awt.Component;
/**
* Interface for <code>BeanContextChild</code>s which wish to associate an
* AWT component with them. The proxy is provided because the
* <code>addPropertyChangeListener()</code> method would conflict with
* <code>Component</code> if you tried to extend.
*
* @author John Keiser
* @since JDK1.2
*/
public interface BeanContextChildComponentProxy {
/**
* Get the <code>Component</code> associated with this <code>BeanContextChild</code>.
* @return the <code>Component</code> associated with this
* <code>BeanContextChild</code>.
*/
Component getComponent();
}

View file

@ -1,381 +0,0 @@
/* java.beans.beancontext.BeanContextChildSupport
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.beans.PropertyVetoException;
import java.beans.VetoableChangeListener;
import java.beans.VetoableChangeSupport;
import java.io.Serializable;
/**
* Support for creating a <code>BeanContextChild</code>.
* This class contains the most common implementations of the methods in
* the <code>BeanContextChild</code>
*
* @specnote This class is not very well specified. I had to "fill in the
* blanks" in most places with what I thought was reasonable
* behavior. If there are problems, let me know.
*
* @author John Keiser
* @since 1.2
* @see java.beans.beancontext.BeanContextChild
*/
public class BeanContextChildSupport
implements BeanContextChild, BeanContextServicesListener, Serializable
{
static final long serialVersionUID = 6328947014421475877L;
/**
* The peer on which to perform <code>set</code> actions.
* This is here so that this class can be used as a peer.
* <P>
*
* When extending this class, this variable will be set to
* <code>this</code>.
*/
public BeanContextChild beanContextChildPeer;
/**
* The parent <code>BeanContext</code>.
*/
protected transient BeanContext beanContext;
/**
* If <code>setBeanContext()</code> was vetoed once before, this
* is set to <code>true</code> so that the next time, vetoes will
* be ignored.
*/
protected transient boolean rejectedSetBCOnce;
/**
* Listeners are registered here and events are fired through here.
*/
protected PropertyChangeSupport pcSupport;
/**
* Listeners are registered here and events are fired through here.
*/
protected VetoableChangeSupport vcSupport;
/**
* Create a new <code>BeanContextChildSupport</code> with itself as the peer.
* This is meant to be used when you subclass
* <code>BeanContextChildSupport</code> to create your child.
*/
public BeanContextChildSupport()
{
this (null);
}
/**
* Create a new <code>BeanContextChildSupport</code> with the specified peer.
* @param peer the peer to use, or <code>null</code> to specify
* <code>this</code>.
*/
public BeanContextChildSupport (BeanContextChild peer)
{
if (peer == null)
{
peer = this;
}
beanContextChildPeer = peer;
pcSupport = new PropertyChangeSupport (peer);
vcSupport = new VetoableChangeSupport (peer);
}
/**
* Set the parent <code>BeanContext</code>.
* <P>
*
* When this Object is being added to a new BeanContext or moved
* from an old one, a non-null value will be passed in.
* <P>
*
* When this Object is being removed from the current
* <code>BeanContext</code>, <code>setBeanContext()</code> will
* receive the parameter <code>null</code>.
* <P>
*
* Order of events:
* <OL>
* <LI>
* If the new <code>BeanContext</code> is the same as the old
* one, nothing happens.
* </LI>
* <LI>
* If the change has not been rejected or vetoed before, call
* <code>validatePendingSetBeanContext()</code>. If this call
* returns <code>false</code>, the change is rejected and a
* <code>PropertyVetoException</code> is thrown.
* </LI>
* <LI>
* If the change has not been rejected or vetoed before,
* <code>VetoableChangeEvent</code>s are fired with the name
* <code>"beanContext"</code>, using the
* <code>fireVetoableChange()</code> method. If a veto
* occurs, reversion events are fired using the same method,
* the change is rejected, and the veto is rethrown.
* </LI>
* <LI>
* <code>releaseBeanContextResources()</code> is called.
* </LI>
* <LI>
* The change is made.
* </LI>
* <LI>
* <code>PropertyChangeEvent</code>s are fired using the
* <code>firePropertyChange()</code> method.
* </LI>
* <LI>
* <code>initializeBeanContextResources()</code> is called.
* </LI>
* </OL>
* <P>
*
* @param newBeanContext the new parent for the
* <code>BeanContextChild</code>, or <code>null</code> to
* signify removal from a tree.
* @exception PropertyVetoException if the
* <code>BeanContextChild</code> implementor does not
* wish to have its parent changed.
*/
public void setBeanContext(BeanContext newBeanContext)
throws PropertyVetoException
{
synchronized (beanContextChildPeer)
{
if (newBeanContext == beanContext)
return;
if (!rejectedSetBCOnce)
{
if (!validatePendingSetBeanContext (newBeanContext))
{
rejectedSetBCOnce = true;
throw new PropertyVetoException ("validatePendingSetBeanContext() rejected change",
new PropertyChangeEvent(beanContextChildPeer, "beanContext", beanContext, newBeanContext));
}
try
{
fireVetoableChange ("beanContext", beanContext, newBeanContext);
}
catch (PropertyVetoException e)
{
rejectedSetBCOnce = true;
throw e;
}
}
releaseBeanContextResources ();
beanContext = newBeanContext;
rejectedSetBCOnce = false;
firePropertyChange ("beanContext", beanContext, newBeanContext);
initializeBeanContextResources ();
}
}
/**
* Get the parent <code>BeanContext</code>.
* @return the parent <code>BeanContext</code>.
*/
public BeanContext getBeanContext()
{
return beanContext;
}
/**
* Get the peer (or <code>this</code> if there is no peer).
* @return the peer, or <code>this</code> if there is no peer.
*/
public BeanContextChild getBeanContextChildPeer() {
return beanContextChildPeer;
}
/**
* Determine whether there is a peer.
* This is true iff <code>getBeanContextChildPeer() == this</code>.
* @return whether there is a peer.
*/
public boolean isDelegated() {
return beanContextChildPeer == this;
}
/**
* Add a listener that will be notified when a specific property changes.
* @param propertyName the name of the property to listen on.
* @param listener the listener to listen on the property.
*/
public void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
pcSupport.addPropertyChangeListener(propertyName, listener);
}
/**
* Remove a listener to a certain property.
*
* @param propertyName the name of the property being listened on.
* @param listener the listener listening on the property.
*/
public void removePropertyChangeListener(String propertyName, PropertyChangeListener listener) {
pcSupport.removePropertyChangeListener(propertyName, listener);
}
/**
* Add a listener that will be notified when a specific property
* change is requested (a PropertyVetoException may be thrown) as
* well as after the change is successfully made.
*
* @param propertyName the name of the property to listen on.
* @param listener the listener to listen on the property.
*/
public void addVetoableChangeListener(String propertyName, VetoableChangeListener listener) {
vcSupport.addVetoableChangeListener(propertyName, listener);
}
/**
* Remove a listener to a certain property.
*
* @param propertyName the name of the property being listened on
* @param listener the listener listening on the property.
*/
public void removeVetoableChangeListener(String propertyName, VetoableChangeListener listener) {
vcSupport.removeVetoableChangeListener(propertyName, listener);
}
/**
* Fire a property change.
*
* @param propertyName the name of the property that changed
* @param oldVal the old value of the property
* @param newVal the new value of the property
*/
public void firePropertyChange(String propertyName, Object oldVal, Object newVal) {
pcSupport.firePropertyChange(propertyName, oldVal, newVal);
}
/**
* Fire a vetoable property change.
*
* @param propertyName the name of the property that changed
* @param oldVal the old value of the property
* @param newVal the new value of the property
* @exception PropertyVetoException if the change is vetoed.
*/
public void fireVetoableChange(String propertyName, Object oldVal, Object newVal)
throws PropertyVetoException {
vcSupport.fireVetoableChange(propertyName, oldVal, newVal);
}
/**
* Called by <code>BeanContextServices.revokeService()</code> to indicate that a service has been revoked.
* If you have a reference to such a service, it should be
* discarded and may no longer function properly.
* <code>getService()</code> will no longer work on the specified
* service class after this event has been fired.
* <P>
*
* <EM>This method is meant to be overriden.</EM>
* <code>BeanContextChildSupport</code>'s implementation does
* nothing.
*
* @param event the service revoked event.
* @see java.beans.beancontext.BeanContextServices#revokeService(java.lang.Class,java.beans.beancontext.BeanContextServiceProvider,boolean)
*/
public void serviceRevoked(BeanContextServiceRevokedEvent event) {
}
/**
* Called by <code>BeanContextServices</code> whenever a service is made available.
* <P>
*
* <EM>This method is meant to be overriden.</EM>
* <code>BeanContextChildSupport</code>'s implementation does
* nothing.
*
* @param event the service revoked event, with useful information
* about the new service.
*/
public void serviceAvailable(BeanContextServiceAvailableEvent event) {
}
/**
* Called by <code>setBeanContext()</code> to determine whether the set should be rejected.
* <P>
*
* <EM>This method is meant to be overriden.</EM>
* <code>BeanContextChildSupport</code>'s implementation simply
* returns <code>true</code>.
*
* @param newBeanContext the new parent.
* @return whether to allow the parent to be changed to the new
* value.
*/
public boolean validatePendingSetBeanContext(BeanContext newBeanContext) {
return true;
}
/**
* Called by <code>setBeanContext()</code> to release resources of a what will soon no longer be the parent.
* <P>
*
* <EM>This method is meant to be overriden.</EM>
* <code>BeanContextChildSupport</code>'s implementation does
* nothing.
*/
protected void releaseBeanContextResources() {
}
/**
* Called by <code>setBeanContext()</code> to grab resources when the parent has been set.
* <P>
*
* <EM>This method is meant to be overriden.</EM>
* <code>BeanContextChildSupport</code>'s implementation does
* nothing.
*/
protected void initializeBeanContextResources() {
}
}

View file

@ -1,63 +0,0 @@
/* java.beans.beancontext.BeanContextContainerProxy
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
import java.awt.Container;
/**
* Interface for <code>BeanContext</code>s which wish to associate an
* AWT container with them. The proxy is provided because the
* <code>addPropertyChangeListener()</code> and <code>add()</code> methods
* would conflict with <code>Component</code> and <code>Container</code>
* if you tried to extend.
*
* @specnote It is unclear whether anything besides <code>BeanContext</code>s
* are allowed to implement this interface.
* @author John Keiser
* @since JDK1.2
*/
public interface BeanContextContainerProxy {
/**
* Get the <code>Container</code> associated with this <code>BeanContext</code>.
* @return the <code>Container</code> associated with this
* <code>BeanContext</code>.
*/
Container getContainer();
}

View file

@ -1,110 +0,0 @@
/* java.beans.beancontext.BeanContextEvent
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
import java.util.EventObject;
/**
* Generic superclass for events fired by <code>BeanContext</code>s.
*
* @author John Keiser
* @since 1.2
*/
public abstract class BeanContextEvent extends EventObject
{
private static final long serialVersionUID = 7267998073569045052L;
/**
* The <code>BeanContext</code> that most recently passed this
* event on.
*/
protected BeanContext propagatedFrom;
/**
* Create a new event, from the specified <code>BeanContext</code>.
* <code>propagatedFrom</code> will be initialized to
* <code>null</code>.
*
* @param source the source of the event.
*/
protected BeanContextEvent(BeanContext source)
{
super(source);
}
/**
* Get the <code>BeanContext</code> that originated this event.
* @return the originator of this event.
*/
public BeanContext getBeanContext()
{
return (BeanContext)getSource();
}
/**
* Get the most recent propagator of this event.
* If this value is <code>null</code>, you have received the event
* straight from the source.
*
* @return the most recent propagator of this event.
*/
public BeanContext getPropagatedFrom()
{
return propagatedFrom;
}
/**
* Tell whether this event has been propagated.
* @return <code>true</code> iff <code>getPropagatedFrom() != null</code>.
*/
public boolean isPropagated()
{
return propagatedFrom != null;
}
/**
* Set the most recent propagator of this event.
* @param propagator the most recent propagator of this event.
*/
public void setPropagatedFrom(BeanContext propagator)
{
propagatedFrom = propagator;
}
}

View file

@ -1,112 +0,0 @@
/* java.beans.beancontext.BeanContextMembershipEvent
Copyright (C) 1999, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
/**
* Event fired when children are added to or removed from a <code>BeanContext</code>.
* Whether they were added or removed depends entirely on which method
* of the listener interface was called.
*
* @author John Keiser
* @since 1.2
* @see java.beans.beancontext.BeanContextMembershipListener
*/
public class BeanContextMembershipEvent extends BeanContextEvent {
/**
* The children that were added or removed.
*/
protected Collection children;
/**
* Create a new membership event.
* @param context the event source.
* @param children the children added to or removed from the source.
*/
public BeanContextMembershipEvent(BeanContext context, Collection children) {
super(context);
this.children = children;
}
/**
* Create a new membership event.
* @param context the event source.
* @param children the children added to or removed from the source.
*/
public BeanContextMembershipEvent(BeanContext context, Object[] children) {
super(context);
this.children = Arrays.asList(children);
}
/**
* The number of children removed or added.
* @return the number of children removed or added.
*/
public int size() {
return children.size();
}
/**
* An iterator that will step through all the children.
* @return an iterator over all the children.
*/
public Iterator iterator() {
return children.iterator();
}
/**
* An array of the children.
* @return an array of the children.
*/
public Object[] toArray() {
return children.toArray();
}
/**
* Tell whether the <code>Object</code> is one of the children added or removed.
* @param child the child to check.
* @return whether the <code>Object</code> is added or removed.
*/
public boolean contains(Object child) {
return children.contains(child);
}
}

View file

@ -1,70 +0,0 @@
/* java.beans.beancontext.BeanContextMembershipListener
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
import java.util.EventListener;
/**
* This is the interface to which <code>BeanContextMembershipEvent</code>s are sent.
* This happens when children are added to or removed from a
* <code>BeanContext</code>.
*
* @author John Keiser
* @since JDK1.2
*/
public interface BeanContextMembershipListener extends EventListener {
/**
* When beans are added to a <code>BeanContext</code>,
* this method is called to fire the event.
*
* @param event the event, including which children were added.
* @see java.beans.beancontext.BeanContext#add(java.lang.Object)
*/
void childrenAdded(BeanContextMembershipEvent event);
/**
* When beans are removed from a <code>BeanContext</code>,
* this method is called to fire the event.
*
* @param event the event, including which children were removed.
* @see java.beans.beancontext.BeanContext#remove(java.lang.Object)
*/
void childrenRemoved(BeanContextMembershipEvent event);
}

View file

@ -1,65 +0,0 @@
/* java.beans.beancontext.BeanContextProxy
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
/**
* Beans that wish to have a <code>BeanContextChild</code> or <code>BeanContext</code> associated with them
* but do not wish to implement those interfaces directly, can implement this interface.
* <P>
*
* Don't shoot yourself in the foot: if you already implement
* <code>BeanContextChild</code>, directly or indirectly, the whole
* workings of this package will be unpredictable because it is
* indeterminate as to whether the <code>BeanContextChild</code> is used
* in preference to its proxy or vice versa.
*
* @author John Keiser
* @since JDK1.2
*/
public interface BeanContextProxy {
/**
* Return the <code>BeanContextChild</code> associated with this
* <code>Object</code>.
*
* @return the <code>BeanContextChild</code> associated with this
* <code>Object</code>.
*/
BeanContextChild getBeanContextProxy();
}

View file

@ -1,95 +0,0 @@
/* java.beans.beancontext.BeanContextServiceAvailableEvent
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
import java.util.Iterator;
/**
* Event fired when new services become available through a <code>BeanContextServices</code>.
*
* @author John Keiser
* @since JDK1.2
* @see java.beans.beancontext.BeanContextServicesListener
*/
public class BeanContextServiceAvailableEvent extends BeanContextEvent {
/**
* The <code>Class</code> representing the service which is now
* available.
*/
protected Class serviceClass;
/**
* Create a new service available event.
* @param services the <code>BeanContextServices</code> through
* which the service is available. This is also the source
* of the event.
* @param serviceClass the service class that is now available.
*/
public BeanContextServiceAvailableEvent(BeanContextServices services, Class serviceClass) {
super(services);
this.serviceClass = serviceClass;
}
/**
* Get the current service selectors of the service class.
* This is identical to <code>getSourceAsBeanContextServices().getCurrentServiceSelectors(getServiceClass())</code>
* @return the current service selectors of the service class.
*/
public Iterator getCurrentServiceSelectors() {
return getSourceAsBeanContextServices().getCurrentServiceSelectors(serviceClass);
}
/**
* Get the newly available service class.
* @return the service class.
*/
public Class getServiceClass() {
return serviceClass;
}
/**
* Get the <code>BeanContextServices</code> through which the new service is available.
* @return the <code>BeanContextServices</code> through which the
* new service is available.
*/
public BeanContextServices getSourceAsBeanContextServices() {
return (BeanContextServices)getSource();
}
}

View file

@ -1,138 +0,0 @@
/* java.beans.beancontext.BeanContextServiceProvider
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
import java.util.Iterator;
/**
* An actual factory for services.
* <P>
*
* It is the <code>BeanContextServiceProvider</code>'s responsibility to
* register itself with whatever <code>BeanContextServices</code> object
* it wishes to provide services through using the
* <code>addService()</code> method.
* <P>
*
* If for some reason it can no longer provide services for a particular
* class, this class must invoke
* <code>BeanContextServices.revokeService(serviceClass,this,true)</code>
* for all the places it has registered the service.
*
* @author John Keiser
* @since JDK1.2
*/
public interface BeanContextServiceProvider {
/**
* Get a service.
* Called from <code>BeanContextServices.getService()</code>.
*
* <p>If the requested service class is not available, or if this
* <code>BeanContextServiceProvider</code> chooses not honor the
* request for some reason, then this method will return
* <code>null</code>.</p>
*
* This method may throw unchecked exceptions, so watch out.
*
* @param services the <code>BeanContextServices</code> that wants
* to get the service. Only weak references to this will
* be retained, and it will never be changed, only queried
* in a read-only manner.
* @param requestor the actual requestor of the service. Only
* weak references to this will be retained, and it will
* never be changed, only queried in a read-only manner.
* @param serviceClass the <code>Class</code> of the service being
* requested.
* @param serviceSelector a parameter to customize the service
* returned with.
* @return an instance of <code>serviceClass</code> (such that
* <code>instanceof</code> serviceClass is true), or
* <code>null</code>.
* @see java.beans.beancontext.BeanContextServices#getService(java.beans.beancontext.BeanContextChild,java.lang.Object,java.lang.Class,java.lang.Object,java.beans.beancontext.BeanContextServiceRevokedListener)
*/
Object getService(BeanContextServices services, Object requestor, Class serviceClass, Object serviceSelector);
/**
* Release the service.
* <P>
*
* Called by <code>BeanContextServices.releaseService()</code>.
* <P>
*
* Most <code>BeanContextServiceProvider</code>s won't have to do
* anything here.
*
* @param services the <code>BeanContextServices</code> that wants
* to release the service. Only weak references to this will
* be retained, and it will never be changed, only queried
* in a read-only manner.
* @param requestor the original requestor of the service.
* @param service the service to relinquish
* @see java.beans.beancontext.BeanContextServices#releaseService(java.beans.beancontext.BeanContextChild,java.lang.Object,java.lang.Object)
*/
void releaseService(BeanContextServices services, Object requestor, Object service);
/**
* Get a list of valid service selectors for the specified service class.
* This method is called from
* <code>BeanContextServices.getCurrentServiceSelectors()</code>.
* <P>
*
* If the specified service class does not have a finite number of
* valid service selectors, it should return <code>null</code>.
* If it takes a general <code>Integer</code> parameter, for
* example, you may as well return <code>null</code> or the poor
* soul who called this method will be iterating all day.
* <P>
*
* If it has no valid service selectors, it should still return an empty
* <code>Iterator</code>.
*
* @param services the <code>BeanContextServices</code> that wants
* to get the service selectors. Only weak references to this will
* be retained, and it will never be changed, only queried
* in a read-only manner.
* @param serviceClass the service class to get selectors for.
* @return a list of valid service selectors for the service
* class, or <code>null</code>.
* @see java.beans.beancontext.BeanContextServices#getCurrentServiceSelectors(java.lang.Class)
*/
Iterator getCurrentServiceSelectors(BeanContextServices services, Class serviceClass);
}

View file

@ -1,60 +0,0 @@
/* java.beans.beancontext.BeanContextServiceProviderBeanInfo
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
import java.beans.BeanInfo;
/**
* <code>BeanContextServiceProvider</code>s implement this to provide information about all of the services they provide.
* <P>
*
* This is apparently so that you can import a bunch of services into a
* RAD tool and it will know about all of them and export them to the
* user in a readable manner.
*
* @author John Keiser
* @since JDK1.2
*/
public interface BeanContextServiceProviderBeanInfo extends BeanInfo {
/**
* Get <code>BeanInfo</code>s for all of the service classes of this <code>BeanInfoServiceProvider</code>.
* @return <code>BeanInfo</code>s for all provided service classes.
*/
BeanInfo[] getServicesBeanInfo();
}

View file

@ -1,110 +0,0 @@
/* java.beans.beancontext.BeanContextServiceRevokedEvent
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
/**
* Event fired when services are revoked from a <code>BeanContextServices</code>.
*
* @author John Keiser
* @since JDK1.2
* @see java.beans.beancontext.BeanContextServiceRevokedListener
*/
public class BeanContextServiceRevokedEvent extends BeanContextEvent {
/**
* The <code>Class</code> representing the service which is now
* available.
*/
protected Class serviceClass;
private boolean invalidateRefs;
/**
* Create a new service revoked event.
* @param services the <code>BeanContextServices</code> through
* which the service was available. This is also the source
* of the event.
* @param serviceClass the service class that is now revoked.
* @param revokeNow whether the revocation is immediate for all
* classes or just a suggestion.
*/
public BeanContextServiceRevokedEvent(BeanContextServices services, Class serviceClass, boolean revokeNow) {
super(services);
this.serviceClass = serviceClass;
invalidateRefs = revokeNow;
}
/**
* Get the revoked service class.
* @return the service class.
*/
public Class getServiceClass() {
return serviceClass;
}
/**
* Tell whether the revoked service class is the same as the specified class.
* Identical to <code>getServiceClass().equals(c)</code>.
* @param c the class to compare.
* @return whether the clases are equal.
*/
public boolean isServiceClass(Class c) {
return serviceClass.equals(c);
}
/**
* Get the <code>BeanContextServices</code> through which the service was available.
* @return the <code>BeanContextServices</code> through which the
* service was available.
*/
public BeanContextServices getSourceAsBeanContextServices() {
return (BeanContextServices)getSource();
}
/**
* Tell whether current instances of the revoked service are usable or not.
* This is determined by whether the service was revoked
* immediately.
*
* @return whether current instances of the revoked service are
* usable.
*/
public boolean isCurrentServiceInvalidNow() {
return invalidateRefs;
}
}

View file

@ -1,62 +0,0 @@
/* java.beans.beancontext.BeanContextServiceRevokedListener
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
import java.util.EventListener;
/**
* Listens for service revoke events.
*
* @author John Keiser
* @since JDK1.2
*/
public interface BeanContextServiceRevokedListener extends EventListener {
/**
* Called by <code>BeanContextServices.revokeService()</code> to indicate that a service has been revoked.
* If you have a reference to such a service, it should be
* discarded and may no longer function properly.
* <code>getService()</code> will no longer work on the specified
* service class after this event has been fired.
*
* @param event the service revoked event.
* @see java.beans.beancontext.BeanContextServices#revokeService(java.lang.Class,java.beans.beancontext.BeanContextServiceProvider,boolean)
*/
void serviceRevoked(BeanContextServiceRevokedEvent event);
}

View file

@ -1,216 +0,0 @@
/* java.beans.beancontext.BeanContextServices
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
import java.util.Iterator;
import java.util.TooManyListenersException;
/**
* Allows a <code>BeanContext</code> to provide services to its children.
*
* @specnote it is unclear whether a <code>BeanContextServices</code>
* should delegate unhandled requests to parents. I assume so.
* @author John Keiser
* @since 1.2
*/
public interface BeanContextServices
extends BeanContext, BeanContextServicesListener
{
/**
* Register a service to make it available to others.
* This class may refuse to add the service based on whatever
* information it can gather, including whether the service
* provider is trusted.
*
* @param serviceClass the service class.
* @param provider the factory that will actually provide the service.
* @return whether the service was added or not.
*/
boolean addService (Class serviceClass,
BeanContextServiceProvider provider);
/**
* Make it so that no one else can use this service.
* <P>
*
* If <code>revokeNow</code> is <code>false</code>, the only
* effect of this method is to make all subsequent calls to
* <code>getService()</code> on this service class fail.
* <P>
*
* If it is <code>true</code>, a message is also sent out to all
* listeners on the service and all references to it are released.
*
* @param serviceClass the service class to revoke.
* @param provider the service provider providing the service class.
* @param revokeNow whether to release all current references to
* the service.
*/
void revokeService (Class serviceClass,
BeanContextServiceProvider provider,
boolean revokeNow);
/**
* Release your copy of this service.
* <P>
*
* If all copies of the service's class have been relinquished by
* the requestor, the <code>BeanContextServiceRevokedListener</code>
* previously registered by <code>getService()</code> will be
* unregistered.
*
* @param requestorChild the original <code>BeanContextChild</code>
* requesting the service.
* @param requestor the original requestor of the service.
* @param service the service to relinquish
* @see #getService(java.beans.beancontext.BeanContextChild,java.lang.Object,java.lang.Class,java.lang.Object,java.beans.beancontext.BeanContextServiceRevokedListener)
*/
void releaseService (BeanContextChild requestorChild, Object requestor,
Object service);
/**
* Get a service from this <code>BeanContextServices</code>.
* <P>
*
* The specified listener will be registered to receive a
* revocation notice for the specified serviceClass. One
* notification per service class per requestor object will be
* sent.
* <P>
*
* The listener will be unregistered when all services that were
* obtained by that requestor for that service class are released.
* <P>
*
* If the requested service class is not available, or if this
* <code>BeanContextServices</code> object chooses not honor the
* request because the service class has been revoked or for some
* other reason, then this method will return <code>null</code>.
* <P>
*
* This method may throw unchecked exceptions, so watch out.
*
* @specnote it is not specified what happens when two subsequent
* calls are made to <code>getService()</code> with the
* same requestor object and service class but different
* listeners. Which listener is to be notified?
*
* @param requestorChild the <code>BeanContextChild</code>
* associated with the requestor. Typically this will be
* the same as the requestor itself, but since any
* <code>Object</code>, even one outside the hierarchy, may
* make a request, this parameter is necessary. Only weak
* references to this will be retained, and it will never
* be changed, only queried in a read-only manner.
* @param requestor the actual requestor of the service. Only
* weak references to this will be retained, and it will
* never be changed, only queried in a read-only manner.
* @param serviceClass the <code>Class</code> of the service being
* requested.
* @param serviceSelector a parameter to customize the service
* returned with.
* @param listener a listener that will be notified if the service
* being requested is revoked.
* @return an instance of <code>serviceClass</code> (such that
* <code>instanceof</code> serviceClass is true), or
* <code>null</code>.
*/
Object getService (BeanContextChild requestorChild, Object requestor,
Class serviceClass, Object serviceSelector,
BeanContextServiceRevokedListener listener)
throws TooManyListenersException;
/**
* Get a list of all service classes supported.
* <P>
*
* This method must synchronize on
* <code>BeanContext.globalHierarchyLock</code>.
*
* @return a list of all service classes supported.
* @see java.beans.beancontext.BeanContext#globalHierarchyLock
*/
Iterator getCurrentServiceClasses ();
/**
* Get a list of valid service selectors for the specified service class.
* <P>
*
* If the specified service class does not have a finite number of
* valid service selectors, it should return <code>null</code>.
* If it takes a general <code>Integer</code> parameter, for
* example, you may as well return <code>null</code> or the poor
* soul who called this method will be iterating all day.
* <P>
*
* If it has no valid service selectors, it should still return an empty
* <code>Iterator</code>.
*
* @param serviceClass the service class to get selectors for.
* @return a list of valid service selectors for the service
* class, or <code>null</code>.
*/
Iterator getCurrentServiceSelectors (Class serviceClass);
/**
* Tell whether the specified service class is available.
* Iff getService() could return a non-null value for the
* specified service, this method will return <code>true</code>.
*
* @param serviceClass the service class to check on.
* @return whether the specified service class is available.
*/
boolean hasService (Class serviceClass);
/**
* Add a listener on all adds and removes of services.
* @param listener the listener to add.
*/
void addBeanContextServicesListener (BeanContextServicesListener listener);
/**
* Remove a listener on all adds and removes of services.
* @specnote it is not certain whether this should remove this
* listener if it was specified in
* <code>getService()</code>.
* @param listener the listener to add.
*/
void removeBeanContextServicesListener (BeanContextServicesListener listener);
}

View file

@ -1,56 +0,0 @@
/* java.beans.beancontext.BeanContextServicesListener
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
/**
* Listens for service add and revoke events.
*
* @author John Keiser
* @since JDK1.2
*/
public interface BeanContextServicesListener extends BeanContextServiceRevokedListener {
/**
* Called by <code>BeanContextServices</code> whenever a service is made available.
*
* @param event the service revoked event, with useful information
* about the new service.
*/
void serviceAvailable(BeanContextServiceAvailableEvent event);
}

View file

@ -1,300 +0,0 @@
/* BeanContextServicesSupport.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
import java.util.TooManyListenersException;
/**
* @author Michael Koch
* @since 1.2
*/
public class BeanContextServicesSupport
extends BeanContextSupport
implements BeanContextServices
{
private static final long serialVersionUID = -8494482757288719206L;
protected class BCSSChild
extends BeanContextSupport.BCSChild
{
private static final long serialVersionUID = -6848044915271367103L;
}
protected class BCSSProxyServiceProvider
implements BeanContextServiceProvider,
BeanContextServiceRevokedListener
{
private static final long serialVersionUID = 7078212910685744490L;
public Iterator getCurrentServiceSelectors (BeanContextServices bcs,
Class serviceClass)
{
throw new Error ("Not implemented");
}
public Object getService (BeanContextServices bcs,
Object requestor,
Class serviceClass,
Object serviceSelector)
{
throw new Error ("Not implemented");
}
public void releaseService (BeanContextServices bcs,
Object requestor,
Object service)
{
throw new Error ("Not implemented");
}
public void serviceRevoked (BeanContextServiceRevokedEvent bcsre)
{
throw new Error ("Not implemented");
}
}
protected static class BCSSServiceProvider
implements Serializable
{
private static final long serialVersionUID = 861278251667444782L;
protected BeanContextServiceProvider serviceProvider;
protected BeanContextServiceProvider getServiceProvider()
{
return serviceProvider;
}
}
protected transient ArrayList bcsListeners;
protected transient BCSSProxyServiceProvider proxy;
protected transient int serializable;
protected transient HashMap services;
public BeanContextServicesSupport ()
{
super();
}
public BeanContextServicesSupport (BeanContextServices peer)
{
super(peer);
}
public BeanContextServicesSupport(BeanContextServices peer, Locale locale)
{
super(peer, locale);
}
public BeanContextServicesSupport(BeanContextServices peer, Locale locale,
boolean dtime)
{
super(peer, locale, dtime);
}
public BeanContextServicesSupport(BeanContextServices peer, Locale locale,
boolean dtime, boolean visible)
{
super(peer, locale, dtime, visible);
}
public void addBeanContextServicesListener
(BeanContextServicesListener listener)
{
if (! bcsListeners.contains(listener))
bcsListeners.add(listener);
}
public boolean addService (Class serviceClass, BeanContextServiceProvider bcsp)
{
throw new Error ("Not implemented");
}
protected boolean addService (Class serviceClass,
BeanContextServiceProvider bcsp,
boolean fireEvent)
{
throw new Error ("Not implemented");
}
protected void bcsPreDeserializationHook (ObjectInputStream ois)
throws ClassNotFoundException, IOException
{
throw new Error ("Not implemented");
}
protected void bcsPreSerializationHook (ObjectOutputStream oos)
throws IOException
{
throw new Error ("Not implemented");
}
protected void childJustRemovedHook (Object child,
BeanContextSupport.BCSChild bcsc)
{
throw new Error ("Not implemented");
}
protected BeanContextSupport.BCSChild createBCSChild (Object targetChild,
Object peer)
{
throw new Error ("Not implemented");
}
protected BeanContextServicesSupport.BCSSServiceProvider
createBCSSServiceProvider (Class sc, BeanContextServiceProvider bcsp)
{
throw new Error ("Not implemented");
}
protected final void fireServiceAdded (BeanContextServiceAvailableEvent bcssae)
{
throw new Error ("Not implemented");
}
protected final void fireServiceAdded (Class serviceClass)
{
throw new Error ("Not implemented");
}
protected final void fireServiceRevoked(BeanContextServiceRevokedEvent event)
{
throw new Error ("Not implemented");
}
protected final void fireServiceRevoked (Class serviceClass,
boolean revokeNow)
{
throw new Error ("Not implemented");
}
public BeanContextServices getBeanContextServicesPeer ()
{
throw new Error ("Not implemented");
}
protected static final BeanContextServicesListener
getChildBeanContextServicesListener (Object child)
{
throw new Error ("Not implemented");
}
public Iterator getCurrentServiceClasses ()
{
throw new Error ("Not implemented");
}
public Iterator getCurrentServiceSelectors (Class serviceClass)
{
throw new Error ("Not implemented");
}
public Object getService (BeanContextChild child, Object requestor,
Class serviceClass, Object serviceSelector,
BeanContextServiceRevokedListener bcsrl)
throws TooManyListenersException
{
throw new Error ("Not implemented");
}
public boolean hasService (Class serviceClass)
{
throw new Error ("Not implemented");
}
public void initialize ()
{
super.initialize();
bcsListeners = new ArrayList();
services = new HashMap();
}
protected void initializeBeanContextResources ()
{
throw new Error ("Not implemented");
}
protected void releaseBeanContextResources ()
{
throw new Error ("Not implemented");
}
public void releaseService (BeanContextChild child, Object requestor,
Object service)
{
throw new Error ("Not implemented");
}
public void removeBeanContextServicesListener
(BeanContextServicesListener listener)
{
int index = bcsListeners.indexOf(listener);
if (index > -1)
bcsListeners.remove(index);
}
public void revokeService (Class serviceClass, BeanContextServiceProvider bcsp,
boolean revokeCurrentServicesNow)
{
throw new Error ("Not implemented");
}
public void serviceAvailable (BeanContextServiceAvailableEvent bcssae)
{
throw new Error ("Not implemented");
}
public void serviceRevoked (BeanContextServiceRevokedEvent bcssre)
{
throw new Error ("Not implemented");
}
}

View file

@ -1,460 +0,0 @@
/* BeanContextSupport.java --
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
package java.beans.beancontext;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyVetoException;
import java.beans.VetoableChangeListener;
import java.beans.Visibility;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
/**
* @author Michael Koch
* @since 1.2
*/
public class BeanContextSupport extends BeanContextChildSupport
implements BeanContext, Serializable, PropertyChangeListener,
VetoableChangeListener
{
private static final long serialVersionUID = -4879613978649577204L;
private void readObject (ObjectInputStream s)
throws ClassNotFoundException, IOException
{
throw new Error ("Not implemented");
}
private void writeObject (ObjectOutputStream s)
throws ClassNotFoundException, IOException
{
throw new Error ("Not implemented");
}
protected class BCSChild implements Serializable
{
private static final long serialVersionUID = 3289144128843950629L;
}
protected static final class BCSIterator implements Iterator
{
public boolean hasNext ()
{
throw new Error ("Not implemented");
}
public Object next ()
{
throw new Error ("Not implemented");
}
public void remove ()
{
// This must be a noop remove operation.
}
}
protected transient ArrayList bcmListeners;
protected transient HashMap children;
protected transient boolean designTime;
protected transient Locale locale;
protected transient boolean okToUseGui;
/**
* Construct a BeanContextSupport instance.
*/
public BeanContextSupport ()
{
this (null, null, true, true);
}
/**
* Construct a BeanContextSupport instance.
*/
public BeanContextSupport (BeanContext peer)
{
this (peer, null, true, true);
}
/**
* Construct a BeanContextSupport instance.
*/
public BeanContextSupport (BeanContext peer, Locale lcle)
{
this (peer, lcle, true, true);
}
/**
* Construct a BeanContextSupport instance.
*/
public BeanContextSupport (BeanContext peer, Locale lcle, boolean dtime)
{
this (peer, lcle, dtime, true);
}
/**
* Construct a BeanContextSupport instance.
*/
public BeanContextSupport (BeanContext peer, Locale lcle, boolean dtime,
boolean visible)
{
locale = lcle;
designTime = dtime;
okToUseGui = visible;
initialize ();
}
public boolean add (Object targetChild)
{
if (targetChild == null)
throw new IllegalArgumentException();
if (children.containsKey(targetChild))
return false;
// FIXME: The second argument is surely wrong.
children.put(targetChild, targetChild);
return true;
}
public boolean addAll (Collection c)
{
throw new UnsupportedOperationException();
}
public void addBeanContextMembershipListener
(BeanContextMembershipListener listener)
{
if (! bcmListeners.contains(listener))
bcmListeners.add(listener);
}
public boolean avoidingGui ()
{
throw new Error ("Not implemented");
}
protected Iterator bcsChildren ()
{
throw new Error ("Not implemented");
}
protected void bcsPreDeserializationHook (ObjectInputStream ois)
throws ClassNotFoundException, IOException
{
throw new Error ("Not implemented");
}
protected void bcsPreSerializationHook (ObjectOutputStream oos)
throws IOException
{
throw new Error ("Not implemented");
}
protected void childDeserializedHook (Object child, BeanContextSupport.BCSChild bcsc)
{
throw new Error ("Not implemented");
}
protected void childJustAddedHook (Object child, BeanContextSupport.BCSChild bcsc)
{
throw new Error ("Not implemented");
}
protected void childJustRemovedHook (Object child, BeanContextSupport.BCSChild bcsc)
{
throw new Error ("Not implemented");
}
protected static final boolean classEquals (Class first, Class second)
{
throw new Error ("Not implemented");
}
public void clear ()
{
throw new UnsupportedOperationException();
}
public boolean contains (Object o)
{
throw new Error ("Not implemented");
}
public boolean containsAll (Collection c)
{
throw new Error ("Not implemented");
}
public boolean containsKey (Object o)
{
throw new Error ("Not implemented");
}
protected final Object[] copyChildren ()
{
throw new Error ("Not implemented");
}
protected BeanContextSupport.BCSChild createBCSChild (Object targetChild, Object peer)
{
throw new Error ("Not implemented");
}
protected final void deserialize (ObjectInputStream ois, Collection coll)
throws ClassNotFoundException, IOException
{
throw new Error ("Not implemented");
}
public void dontUseGui ()
{
throw new Error ("Not implemented");
}
protected final void fireChildrenAdded (BeanContextMembershipEvent bcme)
{
throw new Error ("Not implemented");
}
protected final void fireChildrenRemoved (BeanContextMembershipEvent bcme)
{
throw new Error ("Not implemented");
}
public BeanContext getBeanContextPeer ()
{
throw new Error ("Not implemented");
}
protected static final BeanContextChild getChildBeanContextChild (Object child)
{
throw new Error ("Not implemented");
}
protected static final BeanContextMembershipListener getChildBeanContextMembershipListener (Object child)
{
throw new Error ("Not implemented");
}
protected static final PropertyChangeListener getChildPropertyChangeListener (Object child)
{
throw new Error ("Not implemented");
}
protected static final Serializable getChildSerializable (Object child)
{
throw new Error ("Not implemented");
}
protected static final VetoableChangeListener getChildVetoableChangeListener (Object child)
{
throw new Error ("Not implemented");
}
protected static final Visibility getChildVisibility (Object child)
{
throw new Error ("Not implemented");
}
public Locale getLocale ()
{
return locale;
}
public URL getResource (String name, BeanContextChild bcc)
{
throw new Error ("Not implemented");
}
public InputStream getResourceAsStream (String name, BeanContextChild bcc)
{
throw new Error ("Not implemented");
}
protected void initialize ()
{
bcmListeners = new ArrayList();
children = new HashMap();
}
public Object instantiateChild (String beanName)
throws IOException, ClassNotFoundException
{
throw new Error ("Not implemented");
}
public boolean isDesignTime ()
{
throw new Error ("Not implemented");
}
public boolean isEmpty ()
{
throw new Error ("Not implemented");
}
public boolean isSerializing ()
{
throw new Error ("Not implemented");
}
public Iterator iterator ()
{
return children.keySet().iterator();
}
public boolean needsGui ()
{
throw new Error ("Not implemented");
}
public void okToUseGui ()
{
throw new Error ("Not implemented");
}
public void propertyChange (PropertyChangeEvent pce)
{
throw new Error ("Not implemented");
}
public final void readChildren (ObjectInputStream ois)
throws IOException, ClassNotFoundException
{
throw new Error ("Not implemented");
}
public boolean remove (Object targetChild)
{
return remove(targetChild, true);
}
protected boolean remove (Object targetChild, boolean callChildSetBC)
{
if (targetChild == null)
throw new IllegalArgumentException();
throw new Error ("Not implemented");
}
public boolean removeAll (Collection c)
{
throw new UnsupportedOperationException();
}
public void removeBeanContextMembershipListener (BeanContextMembershipListener bcml)
{
throw new Error ("Not implemented");
}
public boolean retainAll (Collection c)
{
throw new UnsupportedOperationException();
}
protected final void serialize (ObjectOutputStream oos, Collection coll)
throws IOException
{
throw new Error ("Not implemented");
}
public void setDesignTime (boolean dtime)
{
throw new Error ("Not implemented");
}
public void setLocale (Locale newLocale)
throws PropertyVetoException
{
throw new Error ("Not implemented");
}
public int size ()
{
throw new Error ("Not implemented");
}
public Object[] toArray ()
{
return children.keySet().toArray();
}
public Object[] toArray(Object[] array)
{
return children.keySet().toArray(array);
}
protected boolean validatePendingAdd (Object targetChild)
{
throw new Error ("Not implemented");
}
protected boolean validatePendingRemove (Object targetChild)
{
throw new Error ("Not implemented");
}
public void vetoableChange (PropertyChangeEvent pce)
throws PropertyVetoException
{
throw new Error ("Not implemented");
}
public final void writeChildren (ObjectOutputStream oos)
throws IOException
{
throw new Error ("Not implemented");
}
}