java.beans.beancontext
Class BeanContextSupport

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.beans.beancontext.BeanContextChildSupport sample code for java.beans.beancontext.BeanContextChildSupport definition code for java.beans.beancontext.BeanContextChildSupport 
      extended by java.beans.beancontext.BeanContextSupport
All Implemented Interfaces:
BeanContext sample code for java.beans.beancontext.BeanContext definition code for java.beans.beancontext.BeanContext , BeanContextChild sample code for java.beans.beancontext.BeanContextChild definition code for java.beans.beancontext.BeanContextChild , BeanContextServiceRevokedListener sample code for java.beans.beancontext.BeanContextServiceRevokedListener definition code for java.beans.beancontext.BeanContextServiceRevokedListener , BeanContextServicesListener sample code for java.beans.beancontext.BeanContextServicesListener definition code for java.beans.beancontext.BeanContextServicesListener , DesignMode sample code for java.beans.DesignMode definition code for java.beans.DesignMode , PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener , VetoableChangeListener sample code for java.beans.VetoableChangeListener definition code for java.beans.VetoableChangeListener , Visibility sample code for java.beans.Visibility definition code for java.beans.Visibility , Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Iterable sample code for java.lang.Iterable definition code for java.lang.Iterable , Collection sample code for java.util.Collection definition code for java.util.Collection , EventListener sample code for java.util.EventListener definition code for java.util.EventListener
Direct Known Subclasses:
BeanContextServicesSupport sample code for java.beans.beancontext.BeanContextServicesSupport definition code for java.beans.beancontext.BeanContextServicesSupport

public class BeanContextSupport
extends BeanContextChildSupport sample code for java.beans.beancontext.BeanContextChildSupport definition code for java.beans.beancontext.BeanContextChildSupport
implements BeanContext sample code for java.beans.beancontext.BeanContext definition code for java.beans.beancontext.BeanContext , Serializable sample code for java.io.Serializable definition code for java.io.Serializable , PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener , VetoableChangeListener sample code for java.beans.VetoableChangeListener definition code for java.beans.VetoableChangeListener

This helper class provides a utility implementation of the java.beans.beancontext.BeanContext interface.

Since this class directly implements the BeanContext interface, the class can, and is intended to be used either by subclassing this implementation, or via ad-hoc delegation of an instance of this class from another.

Since:
1.2
See Also:
Serialized Form

Nested Class Summary
protected  class BeanContextSupport.BCSChild sample code for java.beans.beancontext.BeanContextSupport.BCSChild definition code for java.beans.beancontext.BeanContextSupport.BCSChild
           
protected static class BeanContextSupport.BCSIterator sample code for java.beans.beancontext.BeanContextSupport.BCSIterator definition code for java.beans.beancontext.BeanContextSupport.BCSIterator
          protected final subclass that encapsulates an iterator but implements a noop remove() method.
 
Field Summary
protected  ArrayList sample code for java.util.ArrayList definition code for java.util.ArrayList bcmListeners sample code for java.beans.beancontext.BeanContextSupport.bcmListeners definition code for java.beans.beancontext.BeanContextSupport.bcmListeners
          all accesses to the protected ArrayList bcmListeners field shall be synchronized on that object.
protected  HashMap sample code for java.util.HashMap definition code for java.util.HashMap children sample code for java.beans.beancontext.BeanContextSupport.children definition code for java.beans.beancontext.BeanContextSupport.children
          all accesses to the protected HashMap children field shall be synchronized on that object.
protected  boolean designTime sample code for java.beans.beancontext.BeanContextSupport.designTime definition code for java.beans.beancontext.BeanContextSupport.designTime
          A boolean indicating whether or not this object is currently in design time mode.
protected  Locale sample code for java.util.Locale definition code for java.util.Locale locale sample code for java.beans.beancontext.BeanContextSupport.locale definition code for java.beans.beancontext.BeanContextSupport.locale
          The current locale of this BeanContext.
protected  boolean okToUseGui sample code for java.beans.beancontext.BeanContextSupport.okToUseGui definition code for java.beans.beancontext.BeanContextSupport.okToUseGui
          A boolean indicating if this instance may now render a GUI.
 
Fields inherited from class java.beans.beancontext.BeanContextChildSupport sample code for java.beans.beancontext.BeanContextChildSupport definition code for java.beans.beancontext.BeanContextChildSupport
beanContext sample code for java.beans.beancontext.BeanContextChildSupport.beanContext definition code for java.beans.beancontext.BeanContextChildSupport.beanContext , beanContextChildPeer sample code for java.beans.beancontext.BeanContextChildSupport.beanContextChildPeer definition code for java.beans.beancontext.BeanContextChildSupport.beanContextChildPeer , pcSupport sample code for java.beans.beancontext.BeanContextChildSupport.pcSupport definition code for java.beans.beancontext.BeanContextChildSupport.pcSupport , rejectedSetBCOnce sample code for java.beans.beancontext.BeanContextChildSupport.rejectedSetBCOnce definition code for java.beans.beancontext.BeanContextChildSupport.rejectedSetBCOnce , vcSupport sample code for java.beans.beancontext.BeanContextChildSupport.vcSupport definition code for java.beans.beancontext.BeanContextChildSupport.vcSupport
 
Fields inherited from interface java.beans.beancontext.BeanContext sample code for java.beans.beancontext.BeanContext definition code for java.beans.beancontext.BeanContext
globalHierarchyLock sample code for java.beans.beancontext.BeanContext.globalHierarchyLock definition code for java.beans.beancontext.BeanContext.globalHierarchyLock
 
Fields inherited from interface java.beans.DesignMode sample code for java.beans.DesignMode definition code for java.beans.DesignMode
PROPERTYNAME sample code for java.beans.DesignMode.PROPERTYNAME definition code for java.beans.DesignMode.PROPERTYNAME
 
Constructor Summary
BeanContextSupport sample code for java.beans.beancontext.BeanContextSupport.BeanContextSupport() definition code for java.beans.beancontext.BeanContextSupport.BeanContextSupport() ()
          Create an instance that is not a delegate of another object
BeanContextSupport sample code for java.beans.beancontext.BeanContextSupport.BeanContextSupport(java.beans.beancontext.BeanContext) definition code for java.beans.beancontext.BeanContextSupport.BeanContextSupport(java.beans.beancontext.BeanContext) (BeanContext sample code for java.beans.beancontext.BeanContext definition code for java.beans.beancontext.BeanContext  peer)
          Create an instance using with a default locale
BeanContextSupport sample code for java.beans.beancontext.BeanContextSupport.BeanContextSupport(java.beans.beancontext.BeanContext, java.util.Locale) definition code for java.beans.beancontext.BeanContextSupport.BeanContextSupport(java.beans.beancontext.BeanContext, java.util.Locale) (BeanContext sample code for java.beans.beancontext.BeanContext definition code for java.beans.beancontext.BeanContext  peer, Locale sample code for java.util.Locale definition code for java.util.Locale  lcle)
          Create an instance using the specified locale
BeanContextSupport sample code for java.beans.beancontext.BeanContextSupport.BeanContextSupport(java.beans.beancontext.BeanContext, java.util.Locale, boolean) definition code for java.beans.beancontext.BeanContextSupport.BeanContextSupport(java.beans.beancontext.BeanContext, java.util.Locale, boolean) (BeanContext sample code for java.beans.beancontext.BeanContext definition code for java.beans.beancontext.BeanContext  peer, Locale sample code for java.util.Locale definition code for java.util.Locale  lcle, boolean dtime)
          Create an instance using the specified Locale and design mode.
BeanContextSupport sample code for java.beans.beancontext.BeanContextSupport.BeanContextSupport(java.beans.beancontext.BeanContext, java.util.Locale, boolean, boolean) definition code for java.beans.beancontext.BeanContextSupport.BeanContextSupport(java.beans.beancontext.BeanContext, java.util.Locale, boolean, boolean) (BeanContext sample code for java.beans.beancontext.BeanContext definition code for java.beans.beancontext.BeanContext  peer, Locale sample code for java.util.Locale definition code for java.util.Locale  lcle, boolean dTime, boolean visible)
          Construct a BeanContextSupport instance
 
Method Summary
 boolean add sample code for java.beans.beancontext.BeanContextSupport.add(java.lang.Object) definition code for java.beans.beancontext.BeanContextSupport.add(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  targetChild)
          Adds/nests a child within this BeanContext.
 boolean addAll sample code for java.beans.beancontext.BeanContextSupport.addAll(java.util.Collection) definition code for java.beans.beancontext.BeanContextSupport.addAll(java.util.Collection) (Collection sample code for java.util.Collection definition code for java.util.Collection  c)
          add Collection to set of Children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
 void addBeanContextMembershipListener sample code for java.beans.beancontext.BeanContextSupport.addBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener) definition code for java.beans.beancontext.BeanContextSupport.addBeanContextMembershipListener(java.beans.beancontext.BeanContextMembershipListener) (BeanContextMembershipListener sample code for java.beans.beancontext.BeanContextMembershipListener definition code for java.beans.beancontext.BeanContextMembershipListener  bcml)
          Adds a BeanContextMembershipListener
 boolean avoidingGui sample code for java.beans.beancontext.BeanContextSupport.avoidingGui() definition code for java.beans.beancontext.BeanContextSupport.avoidingGui() ()
          Used to determine if the BeanContext child is avoiding using its GUI.
protected  Iterator sample code for java.util.Iterator definition code for java.util.Iterator bcsChildren sample code for java.beans.beancontext.BeanContextSupport.bcsChildren() definition code for java.beans.beancontext.BeanContextSupport.bcsChildren() ()
          Returns an iterator of all children of this BeanContext.
protected  void bcsPreDeserializationHook sample code for java.beans.beancontext.BeanContextSupport.bcsPreDeserializationHook(java.io.ObjectInputStream) definition code for java.beans.beancontext.BeanContextSupport.bcsPreDeserializationHook(java.io.ObjectInputStream) (ObjectInputStream sample code for java.io.ObjectInputStream definition code for java.io.ObjectInputStream  ois)
          called by readObject after defaultReadObject() but prior to deserialization of any children.
protected  void bcsPreSerializationHook sample code for java.beans.beancontext.BeanContextSupport.bcsPreSerializationHook(java.io.ObjectOutputStream) definition code for java.beans.beancontext.BeanContextSupport.bcsPreSerializationHook(java.io.ObjectOutputStream) (ObjectOutputStream sample code for java.io.ObjectOutputStream definition code for java.io.ObjectOutputStream  oos)
          called by writeObject after defaultWriteObject() but prior to serialization of currently serializable children.
protected  void childDeserializedHook sample code for java.beans.beancontext.BeanContextSupport.childDeserializedHook(java.lang.Object, java.beans.beancontext.BeanContextSupport.BCSChild) definition code for java.beans.beancontext.BeanContextSupport.childDeserializedHook(java.lang.Object, java.beans.beancontext.BeanContextSupport.BCSChild) (Object sample code for java.lang.Object definition code for java.lang.Object  child, BeanContextSupport.BCSChild sample code for java.beans.beancontext.BeanContextSupport.BCSChild definition code for java.beans.beancontext.BeanContextSupport.BCSChild  bcsc)
          Called by readObject with the newly deserialized child and BCSChild.
protected  void childJustAddedHook sample code for java.beans.beancontext.BeanContextSupport.childJustAddedHook(java.lang.Object, java.beans.beancontext.BeanContextSupport.BCSChild) definition code for java.beans.beancontext.BeanContextSupport.childJustAddedHook(java.lang.Object, java.beans.beancontext.BeanContextSupport.BCSChild) (Object sample code for java.lang.Object definition code for java.lang.Object  child, BeanContextSupport.BCSChild sample code for java.beans.beancontext.BeanContextSupport.BCSChild definition code for java.beans.beancontext.BeanContextSupport.BCSChild  bcsc)
          subclasses may override this method to simply extend add() semantics after the child has been added and before the event notification has occurred.
protected  void childJustRemovedHook sample code for java.beans.beancontext.BeanContextSupport.childJustRemovedHook(java.lang.Object, java.beans.beancontext.BeanContextSupport.BCSChild) definition code for java.beans.beancontext.BeanContextSupport.childJustRemovedHook(java.lang.Object, java.beans.beancontext.BeanContextSupport.BCSChild) (Object sample code for java.lang.Object definition code for java.lang.Object  child, BeanContextSupport.BCSChild sample code for java.beans.beancontext.BeanContextSupport.BCSChild definition code for java.beans.beancontext.BeanContextSupport.BCSChild  bcsc)
          subclasses may override this method to simply extend remove() semantics after the child has been removed and before the event notification has occurred.
protected static boolean classEquals sample code for java.beans.beancontext.BeanContextSupport.classEquals(java.lang.Class, java.lang.Class) definition code for java.beans.beancontext.BeanContextSupport.classEquals(java.lang.Class, java.lang.Class) (Class sample code for java.lang.Class definition code for java.lang.Class  first, Class sample code for java.lang.Class definition code for java.lang.Class  second)
          Tests to see if two class objects, or their names are equal.
 void clear sample code for java.beans.beancontext.BeanContextSupport.clear() definition code for java.beans.beancontext.BeanContextSupport.clear() ()
          clear the children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field
 boolean contains sample code for java.beans.beancontext.BeanContextSupport.contains(java.lang.Object) definition code for java.beans.beancontext.BeanContextSupport.contains(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  o)
          Determines whether or not the specified object is currently a child of this BeanContext.
 boolean containsAll sample code for java.beans.beancontext.BeanContextSupport.containsAll(java.util.Collection) definition code for java.beans.beancontext.BeanContextSupport.containsAll(java.util.Collection) (Collection sample code for java.util.Collection definition code for java.util.Collection  c)
          Tests to see if all objects in the specified Collection are children of this BeanContext.
 boolean containsKey sample code for java.beans.beancontext.BeanContextSupport.containsKey(java.lang.Object) definition code for java.beans.beancontext.BeanContextSupport.containsKey(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  o)
          Determines whether or not the specified object is currently a child of this BeanContext.
protected  Object sample code for java.lang.Object definition code for java.lang.Object [] copyChildren sample code for java.beans.beancontext.BeanContextSupport.copyChildren() definition code for java.beans.beancontext.BeanContextSupport.copyChildren() ()
          Gets a copy of the this BeanContext's children.
protected  BeanContextSupport.BCSChild sample code for java.beans.beancontext.BeanContextSupport.BCSChild definition code for java.beans.beancontext.BeanContextSupport.BCSChild createBCSChild sample code for java.beans.beancontext.BeanContextSupport.createBCSChild(java.lang.Object, java.lang.Object) definition code for java.beans.beancontext.BeanContextSupport.createBCSChild(java.lang.Object, java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  targetChild, Object sample code for java.lang.Object definition code for java.lang.Object  peer)
           Subclasses can override this method to insert their own subclass of Child without having to override add() or the other Collection methods that add children to the set.
protected  void deserialize sample code for java.beans.beancontext.BeanContextSupport.deserialize(java.io.ObjectInputStream, java.util.Collection) definition code for java.beans.beancontext.BeanContextSupport.deserialize(java.io.ObjectInputStream, java.util.Collection) (ObjectInputStream sample code for java.io.ObjectInputStream definition code for java.io.ObjectInputStream  ois, Collection sample code for java.util.Collection definition code for java.util.Collection  coll)
          used by readObject to deserialize a collection.
 void dontUseGui sample code for java.beans.beancontext.BeanContextSupport.dontUseGui() definition code for java.beans.beancontext.BeanContextSupport.dontUseGui() ()
          notify this instance that it may no longer render a GUI.
protected  void fireChildrenAdded sample code for java.beans.beancontext.BeanContextSupport.fireChildrenAdded(java.beans.beancontext.BeanContextMembershipEvent) definition code for java.beans.beancontext.BeanContextSupport.fireChildrenAdded(java.beans.beancontext.BeanContextMembershipEvent) (BeanContextMembershipEvent sample code for java.beans.beancontext.BeanContextMembershipEvent definition code for java.beans.beancontext.BeanContextMembershipEvent  bcme)
          Fire a BeanContextshipEvent on the BeanContextMembershipListener interface
protected  void fireChildrenRemoved sample code for java.beans.beancontext.BeanContextSupport.fireChildrenRemoved(java.beans.beancontext.BeanContextMembershipEvent) definition code for java.beans.beancontext.BeanContextSupport.fireChildrenRemoved(java.beans.beancontext.BeanContextMembershipEvent) (BeanContextMembershipEvent sample code for java.beans.beancontext.BeanContextMembershipEvent definition code for java.beans.beancontext.BeanContextMembershipEvent  bcme)
          Fire a BeanContextshipEvent on the BeanContextMembershipListener interface
 BeanContext sample code for java.beans.beancontext.BeanContext definition code for java.beans.beancontext.BeanContext getBeanContextPeer sample code for java.beans.beancontext.BeanContextSupport.getBeanContextPeer() definition code for java.beans.beancontext.BeanContextSupport.getBeanContextPeer() ()
          Gets the instance of BeanContext that this object is providing the implementation for.
protected static BeanContextChild sample code for java.beans.beancontext.BeanContextChild definition code for java.beans.beancontext.BeanContextChild getChildBeanContextChild sample code for java.beans.beancontext.BeanContextSupport.getChildBeanContextChild(java.lang.Object) definition code for java.beans.beancontext.BeanContextSupport.getChildBeanContextChild(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  child)
          Gets the BeanContextChild (if any) of the specified child
protected static BeanContextMembershipListener sample code for java.beans.beancontext.BeanContextMembershipListener definition code for java.beans.beancontext.BeanContextMembershipListener getChildBeanContextMembershipListener sample code for java.beans.beancontext.BeanContextSupport.getChildBeanContextMembershipListener(java.lang.Object) definition code for java.beans.beancontext.BeanContextSupport.getChildBeanContextMembershipListener(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  child)
          Gets the BeanContextMembershipListener (if any) of the specified child
protected static PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener getChildPropertyChangeListener sample code for java.beans.beancontext.BeanContextSupport.getChildPropertyChangeListener(java.lang.Object) definition code for java.beans.beancontext.BeanContextSupport.getChildPropertyChangeListener(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  child)
          Gets the PropertyChangeListener (if any) of the specified child
protected static Serializable sample code for java.io.Serializable definition code for java.io.Serializable getChildSerializable sample code for java.beans.beancontext.BeanContextSupport.getChildSerializable(java.lang.Object) definition code for java.beans.beancontext.BeanContextSupport.getChildSerializable(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  child)
          Gets the Serializable (if any) associated with the specified Child
protected static VetoableChangeListener sample code for java.beans.VetoableChangeListener definition code for java.beans.VetoableChangeListener getChildVetoableChangeListener sample code for java.beans.beancontext.BeanContextSupport.getChildVetoableChangeListener(java.lang.Object) definition code for java.beans.beancontext.BeanContextSupport.getChildVetoableChangeListener(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  child)
          Gets the VetoableChangeListener (if any) of the specified child
protected static Visibility sample code for java.beans.Visibility definition code for java.beans.Visibility getChildVisibility sample code for java.beans.beancontext.BeanContextSupport.getChildVisibility(java.lang.Object) definition code for java.beans.beancontext.BeanContextSupport.getChildVisibility(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  child)
          Gets the Component (if any) associated with the specified child.
 Locale sample code for java.util.Locale definition code for java.util.Locale getLocale sample code for java.beans.beancontext.BeanContextSupport.getLocale() definition code for java.beans.beancontext.BeanContextSupport.getLocale() ()
          Gets the locale for this BeanContext.
 URL sample code for java.net.URL definition code for java.net.URL getResource sample code for java.beans.beancontext.BeanContextSupport.getResource(java.lang.String, java.beans.beancontext.BeanContextChild) definition code for java.beans.beancontext.BeanContextSupport.getResource(java.lang.String, java.beans.beancontext.BeanContextChild) (String sample code for java.lang.String definition code for java.lang.String  name, BeanContextChild sample code for java.beans.beancontext.BeanContextChild definition code for java.beans.beancontext.BeanContextChild  bcc)
          Analagous to java.lang.ClassLoader.getResource(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
 InputStream sample code for java.io.InputStream definition code for java.io.InputStream getResourceAsStream sample code for java.beans.beancontext.BeanContextSupport.getResourceAsStream(java.lang.String, java.beans.beancontext.BeanContextChild) definition code for java.beans.beancontext.BeanContextSupport.getResourceAsStream(java.lang.String, java.beans.beancontext.BeanContextChild) (String sample code for java.lang.String definition code for java.lang.String  name, BeanContextChild sample code for java.beans.beancontext.BeanContextChild definition code for java.beans.beancontext.BeanContextChild  bcc)
          Analagous to java.lang.ClassLoader.getResourceAsStream(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.
protected  void initialize sample code for java.beans.beancontext.BeanContextSupport.initialize() definition code for java.beans.beancontext.BeanContextSupport.initialize() ()
          protected method called from constructor and readObject to initialize transient state of BeanContextSupport instance.
 Object sample code for java.lang.Object definition code for java.lang.Object instantiateChild sample code for java.beans.beancontext.BeanContextSupport.instantiateChild(java.lang.String) definition code for java.beans.beancontext.BeanContextSupport.instantiateChild(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  beanName)
           The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into a BeanContext.
 boolean isDesignTime sample code for java.beans.beancontext.BeanContextSupport.isDesignTime() definition code for java.beans.beancontext.BeanContextSupport.isDesignTime() ()
          Reports whether or not this object is in currently in design time mode.
 boolean isEmpty sample code for java.beans.beancontext.BeanContextSupport.isEmpty() definition code for java.beans.beancontext.BeanContextSupport.isEmpty() ()
          Reports whether or not this BeanContext is empty.
 boolean isSerializing sample code for java.beans.beancontext.BeanContextSupport.isSerializing() definition code for java.beans.beancontext.BeanContextSupport.isSerializing() ()
          Is this BeanContext in the process of being serialized?
 Iterator sample code for java.util.Iterator definition code for java.util.Iterator iterator sample code for java.beans.beancontext.BeanContextSupport.iterator() definition code for java.beans.beancontext.BeanContextSupport.iterator() ()
          Gets all JavaBean or BeanContext instances currently nested in this BeanContext.
 boolean needsGui sample code for java.beans.beancontext.BeanContextSupport.needsGui() definition code for java.beans.beancontext.BeanContextSupport.needsGui() ()
           This method is typically called from the environment in order to determine if the implementor "needs" a GUI.
 void okToUseGui sample code for java.beans.beancontext.BeanContextSupport.okToUseGui() definition code for java.beans.beancontext.BeanContextSupport.okToUseGui() ()
          Notify this instance that it may now render a GUI