BeanContextSupport (Java Platform SE 8 ) (original) (raw)

Modifier and Type

Method

Description

boolean

[add](../../../java/beans/beancontext/BeanContextSupport.html#add-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") targetChild)

Adds/nests a child within this

BeanContext

.

boolean

[addAll](../../../java/beans/beancontext/BeanContextSupport.html#addAll-java.util.Collection-)([Collection](../../../java/util/Collection.html "interface in java.util") c)

add Collection to set of Children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field

void

[addBeanContextMembershipListener](../../../java/beans/beancontext/BeanContextSupport.html#addBeanContextMembershipListener-java.beans.beancontext.BeanContextMembershipListener-)([BeanContextMembershipListener](../../../java/beans/beancontext/BeanContextMembershipListener.html "interface in java.beans.beancontext") bcml)

Adds a BeanContextMembershipListener

boolean

[avoidingGui](../../../java/beans/beancontext/BeanContextSupport.html#avoidingGui--)()

Used to determine if the

BeanContext

child is avoiding using its GUI.

protected [Iterator](../../../java/util/Iterator.html "interface in java.util")

[bcsChildren](../../../java/beans/beancontext/BeanContextSupport.html#bcsChildren--)()

Returns an iterator of all children of this

BeanContext

.

protected void

[bcsPreDeserializationHook](../../../java/beans/beancontext/BeanContextSupport.html#bcsPreDeserializationHook-java.io.ObjectInputStream-)([ObjectInputStream](../../../java/io/ObjectInputStream.html "class in java.io") ois)

called by readObject after defaultReadObject() but prior to deserialization of any children.

protected void

[bcsPreSerializationHook](../../../java/beans/beancontext/BeanContextSupport.html#bcsPreSerializationHook-java.io.ObjectOutputStream-)([ObjectOutputStream](../../../java/io/ObjectOutputStream.html "class in java.io") oos)

called by writeObject after defaultWriteObject() but prior to serialization of currently serializable children.

protected void

[childDeserializedHook](../../../java/beans/beancontext/BeanContextSupport.html#childDeserializedHook-java.lang.Object-java.beans.beancontext.BeanContextSupport.BCSChild-)([Object](../../../java/lang/Object.html "class in java.lang") child,[BeanContextSupport.BCSChild](../../../java/beans/beancontext/BeanContextSupport.BCSChild.html "class in java.beans.beancontext") bcsc)

Called by readObject with the newly deserialized child and BCSChild.

protected void

[childJustAddedHook](../../../java/beans/beancontext/BeanContextSupport.html#childJustAddedHook-java.lang.Object-java.beans.beancontext.BeanContextSupport.BCSChild-)([Object](../../../java/lang/Object.html "class in java.lang") child,[BeanContextSupport.BCSChild](../../../java/beans/beancontext/BeanContextSupport.BCSChild.html "class in java.beans.beancontext") 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](../../../java/beans/beancontext/BeanContextSupport.html#childJustRemovedHook-java.lang.Object-java.beans.beancontext.BeanContextSupport.BCSChild-)([Object](../../../java/lang/Object.html "class in java.lang") child,[BeanContextSupport.BCSChild](../../../java/beans/beancontext/BeanContextSupport.BCSChild.html "class in java.beans.beancontext") 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](../../../java/beans/beancontext/BeanContextSupport.html#classEquals-java.lang.Class-java.lang.Class-)([Class](../../../java/lang/Class.html "class in java.lang") first,[Class](../../../java/lang/Class.html "class in java.lang") second)

Tests to see if two class objects, or their names are equal.

void

[clear](../../../java/beans/beancontext/BeanContextSupport.html#clear--)()

clear the children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field

boolean

[contains](../../../java/beans/beancontext/BeanContextSupport.html#contains-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") o)

Determines whether or not the specified object is currently a child of this

BeanContext

.

boolean

[containsAll](../../../java/beans/beancontext/BeanContextSupport.html#containsAll-java.util.Collection-)([Collection](../../../java/util/Collection.html "interface in java.util") c)

Tests to see if all objects in the specified

Collection

are children of this

BeanContext

.

boolean

[containsKey](../../../java/beans/beancontext/BeanContextSupport.html#containsKey-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") o)

Determines whether or not the specified object is currently a child of this

BeanContext

.

protected [Object](../../../java/lang/Object.html "class in java.lang")[]

[copyChildren](../../../java/beans/beancontext/BeanContextSupport.html#copyChildren--)()

Gets a copy of the this BeanContext's children.

protected [BeanContextSupport.BCSChild](../../../java/beans/beancontext/BeanContextSupport.BCSChild.html "class in java.beans.beancontext")

[createBCSChild](../../../java/beans/beancontext/BeanContextSupport.html#createBCSChild-java.lang.Object-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") targetChild,[Object](../../../java/lang/Object.html "class in java.lang") 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](../../../java/beans/beancontext/BeanContextSupport.html#deserialize-java.io.ObjectInputStream-java.util.Collection-)([ObjectInputStream](../../../java/io/ObjectInputStream.html "class in java.io") ois,[Collection](../../../java/util/Collection.html "interface in java.util") coll)

used by readObject to deserialize a collection.

void

[dontUseGui](../../../java/beans/beancontext/BeanContextSupport.html#dontUseGui--)()

notify this instance that it may no longer render a GUI.

protected void

[fireChildrenAdded](../../../java/beans/beancontext/BeanContextSupport.html#fireChildrenAdded-java.beans.beancontext.BeanContextMembershipEvent-)([BeanContextMembershipEvent](../../../java/beans/beancontext/BeanContextMembershipEvent.html "class in java.beans.beancontext") bcme)

Fire a BeanContextshipEvent on the BeanContextMembershipListener interface

protected void

[fireChildrenRemoved](../../../java/beans/beancontext/BeanContextSupport.html#fireChildrenRemoved-java.beans.beancontext.BeanContextMembershipEvent-)([BeanContextMembershipEvent](../../../java/beans/beancontext/BeanContextMembershipEvent.html "class in java.beans.beancontext") bcme)

Fire a BeanContextshipEvent on the BeanContextMembershipListener interface

[BeanContext](../../../java/beans/beancontext/BeanContext.html "interface in java.beans.beancontext")

[getBeanContextPeer](../../../java/beans/beancontext/BeanContextSupport.html#getBeanContextPeer--)()

Gets the instance of

BeanContext

that this object is providing the implementation for.

protected static [BeanContextChild](../../../java/beans/beancontext/BeanContextChild.html "interface in java.beans.beancontext")

[getChildBeanContextChild](../../../java/beans/beancontext/BeanContextSupport.html#getChildBeanContextChild-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") child)

Gets the BeanContextChild (if any) of the specified child

protected static [BeanContextMembershipListener](../../../java/beans/beancontext/BeanContextMembershipListener.html "interface in java.beans.beancontext")

[getChildBeanContextMembershipListener](../../../java/beans/beancontext/BeanContextSupport.html#getChildBeanContextMembershipListener-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") child)

Gets the BeanContextMembershipListener (if any) of the specified child

protected static [PropertyChangeListener](../../../java/beans/PropertyChangeListener.html "interface in java.beans")

[getChildPropertyChangeListener](../../../java/beans/beancontext/BeanContextSupport.html#getChildPropertyChangeListener-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") child)

Gets the PropertyChangeListener (if any) of the specified child

protected static [Serializable](../../../java/io/Serializable.html "interface in java.io")

[getChildSerializable](../../../java/beans/beancontext/BeanContextSupport.html#getChildSerializable-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") child)

Gets the Serializable (if any) associated with the specified Child

protected static [VetoableChangeListener](../../../java/beans/VetoableChangeListener.html "interface in java.beans")

[getChildVetoableChangeListener](../../../java/beans/beancontext/BeanContextSupport.html#getChildVetoableChangeListener-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") child)

Gets the VetoableChangeListener (if any) of the specified child

protected static [Visibility](../../../java/beans/Visibility.html "interface in java.beans")

[getChildVisibility](../../../java/beans/beancontext/BeanContextSupport.html#getChildVisibility-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") child)

Gets the Component (if any) associated with the specified child.

[Locale](../../../java/util/Locale.html "class in java.util")

[getLocale](../../../java/beans/beancontext/BeanContextSupport.html#getLocale--)()

Gets the locale for this

BeanContext

.

[URL](../../../java/net/URL.html "class in java.net")

[getResource](../../../java/beans/beancontext/BeanContextSupport.html#getResource-java.lang.String-java.beans.beancontext.BeanContextChild-)([String](../../../java/lang/String.html "class in java.lang") name,[BeanContextChild](../../../java/beans/beancontext/BeanContextChild.html "interface in java.beans.beancontext") bcc)

Analagous to java.lang.ClassLoader.getResource(), this method allows a BeanContext implementation to interpose behavior between the child Component and underlying ClassLoader.

[InputStream](../../../java/io/InputStream.html "class in java.io")

[getResourceAsStream](../../../java/beans/beancontext/BeanContextSupport.html#getResourceAsStream-java.lang.String-java.beans.beancontext.BeanContextChild-)([String](../../../java/lang/String.html "class in java.lang") name,[BeanContextChild](../../../java/beans/beancontext/BeanContextChild.html "interface in java.beans.beancontext") 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](../../../java/beans/beancontext/BeanContextSupport.html#initialize--)()

protected method called from constructor and readObject to initialize transient state of BeanContextSupport instance.

[Object](../../../java/lang/Object.html "class in java.lang")

[instantiateChild](../../../java/beans/beancontext/BeanContextSupport.html#instantiateChild-java.lang.String-)([String](../../../java/lang/String.html "class in java.lang") beanName)

The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into a

BeanContext

.

boolean

[isDesignTime](../../../java/beans/beancontext/BeanContextSupport.html#isDesignTime--)()

Reports whether or not this object is in currently in design time mode.

boolean

[isEmpty](../../../java/beans/beancontext/BeanContextSupport.html#isEmpty--)()

Reports whether or not this

BeanContext

is empty.

boolean

[isSerializing](../../../java/beans/beancontext/BeanContextSupport.html#isSerializing--)()

Is this

BeanContext

in the process of being serialized?

[Iterator](../../../java/util/Iterator.html "interface in java.util")

[iterator](../../../java/beans/beancontext/BeanContextSupport.html#iterator--)()

Gets all JavaBean or

BeanContext

instances currently nested in this

BeanContext

.

boolean

[needsGui](../../../java/beans/beancontext/BeanContextSupport.html#needsGui--)()

This method is typically called from the environment in order to determine if the implementor "needs" a GUI.

void

[okToUseGui](../../../java/beans/beancontext/BeanContextSupport.html#okToUseGui--)()

Notify this instance that it may now render a GUI

void

[propertyChange](../../../java/beans/beancontext/BeanContextSupport.html#propertyChange-java.beans.PropertyChangeEvent-)([PropertyChangeEvent](../../../java/beans/PropertyChangeEvent.html "class in java.beans") pce)

subclasses may envelope to monitor child property changes.

void

[readChildren](../../../java/beans/beancontext/BeanContextSupport.html#readChildren-java.io.ObjectInputStream-)([ObjectInputStream](../../../java/io/ObjectInputStream.html "class in java.io") ois)

When an instance of this class is used as a delegate for the implementation of the BeanContext protocols (and its subprotocols) there exists a 'chicken and egg' problem during deserialization

boolean

[remove](../../../java/beans/beancontext/BeanContextSupport.html#remove-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") targetChild)

Removes a child from this BeanContext.

protected boolean

[remove](../../../java/beans/beancontext/BeanContextSupport.html#remove-java.lang.Object-boolean-)([Object](../../../java/lang/Object.html "class in java.lang") targetChild, boolean callChildSetBC)

internal remove used when removal caused by unexpected

setBeanContext

or by

remove()

invocation.

boolean

[removeAll](../../../java/beans/beancontext/BeanContextSupport.html#removeAll-java.util.Collection-)([Collection](../../../java/util/Collection.html "interface in java.util") c)

remove all specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field

void

[removeBeanContextMembershipListener](../../../java/beans/beancontext/BeanContextSupport.html#removeBeanContextMembershipListener-java.beans.beancontext.BeanContextMembershipListener-)([BeanContextMembershipListener](../../../java/beans/beancontext/BeanContextMembershipListener.html "interface in java.beans.beancontext") bcml)

Removes a BeanContextMembershipListener

boolean

[retainAll](../../../java/beans/beancontext/BeanContextSupport.html#retainAll-java.util.Collection-)([Collection](../../../java/util/Collection.html "interface in java.util") c)

retain only specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field

protected void

[serialize](../../../java/beans/beancontext/BeanContextSupport.html#serialize-java.io.ObjectOutputStream-java.util.Collection-)([ObjectOutputStream](../../../java/io/ObjectOutputStream.html "class in java.io") oos,[Collection](../../../java/util/Collection.html "interface in java.util") coll)

Used by writeObject to serialize a Collection.

void

[setDesignTime](../../../java/beans/beancontext/BeanContextSupport.html#setDesignTime-boolean-)(boolean dTime)

Sets the new design time value for this

BeanContext

.

void

[setLocale](../../../java/beans/beancontext/BeanContextSupport.html#setLocale-java.util.Locale-)([Locale](../../../java/util/Locale.html "class in java.util") newLocale)

Sets the locale of this BeanContext.

int

[size](../../../java/beans/beancontext/BeanContextSupport.html#size--)()

Gets the number of children currently nested in this BeanContext.

[Object](../../../java/lang/Object.html "class in java.lang")[]

[toArray](../../../java/beans/beancontext/BeanContextSupport.html#toArray--)()

Gets all JavaBean or

BeanContext

instances currently nested in this BeanContext.

[Object](../../../java/lang/Object.html "class in java.lang")[]

[toArray](../../../java/beans/beancontext/BeanContextSupport.html#toArray-java.lang.Object:A-)([Object](../../../java/lang/Object.html "class in java.lang")[] arry)

Gets an array containing all children of this

BeanContext

that match the types contained in arry.

protected boolean

[validatePendingAdd](../../../java/beans/beancontext/BeanContextSupport.html#validatePendingAdd-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") targetChild)

Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being added to the BeanContext.

protected boolean

[validatePendingRemove](../../../java/beans/beancontext/BeanContextSupport.html#validatePendingRemove-java.lang.Object-)([Object](../../../java/lang/Object.html "class in java.lang") targetChild)

Subclasses of this class may override, or envelope, this method to add validation behavior for the BeanContext to examine child objects immediately prior to their being removed from the BeanContext.

void

[vetoableChange](../../../java/beans/beancontext/BeanContextSupport.html#vetoableChange-java.beans.PropertyChangeEvent-)([PropertyChangeEvent](../../../java/beans/PropertyChangeEvent.html "class in java.beans") pce)

subclasses may envelope to monitor veto child property changes.

void

[writeChildren](../../../java/beans/beancontext/BeanContextSupport.html#writeChildren-java.io.ObjectOutputStream-)([ObjectOutputStream](../../../java/io/ObjectOutputStream.html "class in java.io") oos)

Used to serialize all children of this

BeanContext

.