BeanContextSupport (Java SE 10 & JDK 10 )

All Methods Static Methods Instance Methods Concrete Methods  Modifier and Type Method Description boolean add​(Object targetChild)

Adds/nests a child within this BeanContext.

boolean addAll​(Collection c)

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

void addBeanContextMembershipListener​(BeanContextMembershipListener bcml)

Adds a BeanContextMembershipListener

boolean avoidingGui()

Used to determine if the BeanContext child is avoiding using its GUI.

protected Iterator<BeanContextSupport.BCSChild> bcsChildren()

Returns an iterator of all children of this BeanContext.

protected void bcsPreDeserializationHook​(ObjectInputStream ois)

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

protected void bcsPreSerializationHook​(ObjectOutputStream oos)

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

protected void childDeserializedHook​(Object child, BeanContextSupport.BCSChild bcsc)

Called by readObject with the newly deserialized child and BCSChild.

protected void childJustAddedHook​(Object child, 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​(Object child, 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​(Class<?> first, Class<?> second)

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

void clear()

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

boolean contains​(Object o)

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

boolean containsAll​(Collection c)

Tests to see if all objects in the specified Collection are children of this BeanContext.

boolean containsKey​(Object o)

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

protected Object[] copyChildren()

Gets a copy of the this BeanContext's children.

protected BeanContextSupport.BCSChild createBCSChild​(Object targetChild, 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​(ObjectInputStream ois, Collection coll)

used by readObject to deserialize a collection.

void dontUseGui()

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

protected void fireChildrenAdded​(BeanContextMembershipEvent bcme)

Fire a BeanContextshipEvent on the BeanContextMembershipListener interface

protected void fireChildrenRemoved​(BeanContextMembershipEvent bcme)

Fire a BeanContextshipEvent on the BeanContextMembershipListener interface

BeanContext getBeanContextPeer()

Gets the instance of BeanContext that this object is providing the implementation for.

protected static BeanContextChild getChildBeanContextChild​(Object child)

Gets the BeanContextChild (if any) of the specified child

protected static BeanContextMembershipListener getChildBeanContextMembershipListener​(Object child)

Gets the BeanContextMembershipListener (if any) of the specified child

protected static PropertyChangeListener getChildPropertyChangeListener​(Object child)

Gets the PropertyChangeListener (if any) of the specified child

protected static Serializable getChildSerializable​(Object child)

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

protected static VetoableChangeListener getChildVetoableChangeListener​(Object child)

Gets the VetoableChangeListener (if any) of the specified child

protected static Visibility getChildVisibility​(Object child)

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

Locale getLocale()

Gets the locale for this BeanContext.

URL getResource​(String name, 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 getResourceAsStream​(String name, 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()

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

Object instantiateChild​(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()

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

boolean isEmpty()

Reports whether or not this BeanContext is empty.

boolean isSerializing()

Is this BeanContext in the process of being serialized?

Iterator<Object> iterator()

Gets all JavaBean or BeanContext instances currently nested in this BeanContext.

boolean needsGui()

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

void okToUseGui()

Notify this instance that it may now render a GUI

void propertyChange​(PropertyChangeEvent pce)

subclasses may envelope to monitor child property changes.

void readChildren​(ObjectInputStream 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​(Object targetChild)

Removes a child from this BeanContext.

protected boolean remove​(Object targetChild, boolean callChildSetBC)

internal remove used when removal caused by unexpected setBeanContext or by remove() invocation.

boolean removeAll​(Collection c)

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

void removeBeanContextMembershipListener​(BeanContextMembershipListener bcml)

Removes a BeanContextMembershipListener

boolean retainAll​(Collection c)

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

protected void serialize​(ObjectOutputStream oos, Collection<?> coll)

Used by writeObject to serialize a Collection.

void setDesignTime​(boolean dTime)

Sets the new design time value for this BeanContext.

void setLocale​(Locale newLocale)

Sets the locale of this BeanContext.

int size()

Gets the number of children currently nested in this BeanContext.

Object[] toArray()

Gets all JavaBean or BeanContext instances currently nested in this BeanContext.

Object[] toArray​(Object[] arry)

Gets an array containing all children of this BeanContext that match the types contained in arry.

protected boolean validatePendingAdd​(Object 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​(Object 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​(PropertyChangeEvent pce)

subclasses may envelope to monitor veto child property changes.

void writeChildren​(ObjectOutputStream oos)

Used to serialize all children of this BeanContext.