Class BeanContextSupport
- All Implemented Interfaces:
BeanContext,BeanContextChild,BeanContextServiceRevokedListener,BeanContextServicesListener,DesignMode,PropertyChangeListener,VetoableChangeListener,Visibility,Serializable,Iterable,Collection,EventListener
- Direct Known Subclasses:
BeanContextServicesSupport
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classDeprecated, for removal: This API element is subject to removal in a future version.A protected nested class containing per-child information in thechildrenhashtable.protected static final classDeprecated, for removal: This API element is subject to removal in a future version.protected final subclass that encapsulates an iterator but implements a noop remove() method. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ArrayList<BeanContextMembershipListener> Deprecated, for removal: This API element is subject to removal in a future version.all accesses to theprotected ArrayList bcmListenersfield shall be synchronized on that object.protected HashMap<Object, BeanContextSupport.BCSChild> Deprecated, for removal: This API element is subject to removal in a future version.all accesses to theprotected HashMap childrenfield shall be synchronized on that object.protected booleanDeprecated, for removal: This API element is subject to removal in a future version.Abooleanindicating whether or not this object is currently in design time mode.protected LocaleDeprecated, for removal: This API element is subject to removal in a future version.The current locale of this BeanContext.protected booleanDeprecated, for removal: This API element is subject to removal in a future version.Abooleanindicating if this instance may now render a GUI.Fields declared in class java.beans.beancontext.BeanContextChildSupport
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupportFields declared in interface java.beans.beancontext.BeanContext
globalHierarchyLockFields declared in interface java.beans.DesignMode
PROPERTYNAME -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Create an instance that is not a delegate of another objectDeprecated, for removal: This API element is subject to removal in a future version.Create an instance using with a default localeBeanContextSupport(BeanContext peer, Locale lcle) Deprecated, for removal: This API element is subject to removal in a future version.Create an instance using the specified localeBeanContextSupport(BeanContext peer, Locale lcle, boolean dtime) Deprecated, for removal: This API element is subject to removal in a future version.Create an instance using the specified Locale and design mode.BeanContextSupport(BeanContext peer, Locale lcle, boolean dTime, boolean visible) Deprecated, for removal: This API element is subject to removal in a future version.Construct a BeanContextSupport instance -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated, for removal: This API element is subject to removal in a future version.Adds/nests a child within thisBeanContext.booleanaddAll(Collection c) Deprecated, for removal: This API element is subject to removal in a future version.add Collection to set of Children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected fieldvoidDeprecated, for removal: This API element is subject to removal in a future version.Adds a BeanContextMembershipListenerbooleanDeprecated, for removal: This API element is subject to removal in a future version.Used to determine if theBeanContextchild is avoiding using its GUI.protected Iterator<BeanContextSupport.BCSChild> Deprecated, for removal: This API element is subject to removal in a future version.Returns an iterator of all children of thisBeanContext.protected voidDeprecated, for removal: This API element is subject to removal in a future version.called by readObject after defaultReadObject() but prior to deserialization of any children.protected voidDeprecated, for removal: This API element is subject to removal in a future version.called by writeObject after defaultWriteObject() but prior to serialization of currently serializable children.protected voidchildDeserializedHook(Object child, BeanContextSupport.BCSChild bcsc) Deprecated, for removal: This API element is subject to removal in a future version.Called by readObject with the newly deserialized child and BCSChild.protected voidchildJustAddedHook(Object child, BeanContextSupport.BCSChild bcsc) Deprecated, for removal: This API element is subject to removal in a future version.subclasses may override this method to simply extend add() semantics after the child has been added and before the event notification has occurred.protected voidchildJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc) Deprecated, for removal: This API element is subject to removal in a future version.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 final booleanclassEquals(Class<?> first, Class<?> second) Deprecated, for removal: This API element is subject to removal in a future version.Tests to see if two class objects, or their names are equal.voidclear()Deprecated, for removal: This API element is subject to removal in a future version.clear the children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected fieldbooleanDeprecated, for removal: This API element is subject to removal in a future version.Determines whether or not the specified object is currently a child of thisBeanContext.booleanDeprecated, for removal: This API element is subject to removal in a future version.Tests to see if all objects in the specifiedCollectionare children of thisBeanContext.booleanDeprecated, for removal: This API element is subject to removal in a future version.Determines whether or not the specified object is currently a child of thisBeanContext.protected final Object[]Deprecated, for removal: This API element is subject to removal in a future version.Gets a copy of the this BeanContext's children.protected BeanContextSupport.BCSChildcreateBCSChild(Object targetChild, Object peer) Deprecated, for removal: This API element is subject to removal in a future version.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 final voiddeserialize(ObjectInputStream ois, Collection coll) Deprecated, for removal: This API element is subject to removal in a future version.used by readObject to deserialize a collection.voidDeprecated, for removal: This API element is subject to removal in a future version.notify this instance that it may no longer render a GUI.protected final voidDeprecated, for removal: This API element is subject to removal in a future version.Fire a BeanContextMembershipEvent on the BeanContextMembershipListener interfaceprotected final voidDeprecated, for removal: This API element is subject to removal in a future version.Fire a BeanContextMembershipEvent on the BeanContextMembershipListener interfaceDeprecated, for removal: This API element is subject to removal in a future version.Gets the instance ofBeanContextthat this object is providing the implementation for.protected static final BeanContextChildgetChildBeanContextChild(Object child) Deprecated, for removal: This API element is subject to removal in a future version.Gets the BeanContextChild (if any) of the specified childprotected static final BeanContextMembershipListenerDeprecated, for removal: This API element is subject to removal in a future version.Gets the BeanContextMembershipListener (if any) of the specified childprotected static final PropertyChangeListenerDeprecated, for removal: This API element is subject to removal in a future version.Gets the PropertyChangeListener (if any) of the specified childprotected static final SerializablegetChildSerializable(Object child) Deprecated, for removal: This API element is subject to removal in a future version.Gets the Serializable (if any) associated with the specified Childprotected static final VetoableChangeListenerDeprecated, for removal: This API element is subject to removal in a future version.Gets the VetoableChangeListener (if any) of the specified childprotected static final VisibilitygetChildVisibility(Object child) Deprecated, for removal: This API element is subject to removal in a future version.Gets the Component (if any) associated with the specified child.Deprecated, for removal: This API element is subject to removal in a future version.Gets the locale for thisBeanContext.getResource(String name, BeanContextChild bcc) Deprecated, for removal: This API element is subject to removal in a future version.Analogous tojava.lang.ClassLoader.getResource(), this method allows aBeanContextimplementation to interpose behavior between the childComponentand underlyingClassLoader.getResourceAsStream(String name, BeanContextChild bcc) Deprecated, for removal: This API element is subject to removal in a future version.Analogous tojava.lang.ClassLoader.getResourceAsStream(), this method allows aBeanContextimplementation to interpose behavior between the childComponentand underlyingClassLoader.protected voidDeprecated, for removal: This API element is subject to removal in a future version.protected method called from constructor and readObject to initialize transient state of BeanContextSupport instance.instantiateChild(String beanName) Deprecated, for removal: This API element is subject to removal in a future version.The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into aBeanContext.booleanDeprecated, for removal: This API element is subject to removal in a future version.Reports whether or not this object is in currently in design time mode.booleanisEmpty()Deprecated, for removal: This API element is subject to removal in a future version.Reports whether or not thisBeanContextis empty.booleanDeprecated, for removal: This API element is subject to removal in a future version.Is thisBeanContextin the process of being serialized?iterator()Deprecated, for removal: This API element is subject to removal in a future version.Gets all JavaBean orBeanContextinstances currently nested in thisBeanContext.booleanneedsGui()Deprecated, for removal: This API element is subject to removal in a future version.This method is typically called from the environment in order to determine if the implementor "needs" a GUI.voidDeprecated, for removal: This API element is subject to removal in a future version.Notify this instance that it may now render a GUIvoidDeprecated, for removal: This API element is subject to removal in a future version.subclasses may envelope to monitor child property changes.final voidDeprecated, for removal: This API element is subject to removal in a future version.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 deserializationbooleanDeprecated, for removal: This API element is subject to removal in a future version.Removes a child from this BeanContext.protected booleanDeprecated, for removal: This API element is subject to removal in a future version.internal remove used when removal caused by unexpectedsetBeanContextor byremove()invocation.booleanDeprecated, for removal: This API element is subject to removal in a future version.remove all specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected fieldvoidDeprecated, for removal: This API element is subject to removal in a future version.Removes a BeanContextMembershipListenerbooleanDeprecated, for removal: This API element is subject to removal in a future version.retain only specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected fieldprotected final voidserialize(ObjectOutputStream oos, Collection<?> coll) Deprecated, for removal: This API element is subject to removal in a future version.Used by writeObject to serialize a Collection.voidsetDesignTime(boolean dTime) Deprecated, for removal: This API element is subject to removal in a future version.Sets the new design time value for thisBeanContext.voidDeprecated, for removal: This API element is subject to removal in a future version.Sets the locale of this BeanContext.intsize()Deprecated, for removal: This API element is subject to removal in a future version.Gets the number of children currently nested in this BeanContext.Object[]toArray()Deprecated, for removal: This API element is subject to removal in a future version.Gets all JavaBean orBeanContextinstances currently nested in this BeanContext.Object[]Deprecated, for removal: This API element is subject to removal in a future version.Gets an array containing all children of thisBeanContextthat match the types contained in arry.protected booleanvalidatePendingAdd(Object targetChild) Deprecated, for removal: This API element is subject to removal in a future version.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 booleanvalidatePendingRemove(Object targetChild) Deprecated, for removal: This API element is subject to removal in a future version.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.voidDeprecated, for removal: This API element is subject to removal in a future version.subclasses may envelope to monitor veto child property changes.final voidDeprecated, for removal: This API element is subject to removal in a future version.Used to serialize all children of thisBeanContext.Methods declared in class java.beans.beancontext.BeanContextChildSupport
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, initializeBeanContextResources, isDelegated, releaseBeanContextResources, removePropertyChangeListener, removeVetoableChangeListener, serviceAvailable, serviceRevoked, setBeanContext, validatePendingSetBeanContextMethods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods declared in interface java.beans.beancontext.BeanContextChild
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContextMethods declared in interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Field Details
-
children
Deprecated, for removal: This API element is subject to removal in a future version.all accesses to theprotected HashMap childrenfield shall be synchronized on that object. -
bcmListeners
Deprecated, for removal: This API element is subject to removal in a future version.all accesses to theprotected ArrayList bcmListenersfield shall be synchronized on that object. -
locale
Deprecated, for removal: This API element is subject to removal in a future version.The current locale of this BeanContext. -
okToUseGui
protected boolean okToUseGuiDeprecated, for removal: This API element is subject to removal in a future version.Abooleanindicating if this instance may now render a GUI. -
designTime
protected boolean designTimeDeprecated, for removal: This API element is subject to removal in a future version.Abooleanindicating whether or not this object is currently in design time mode.
-
-
Constructor Details
-
BeanContextSupport
Deprecated, for removal: This API element is subject to removal in a future version.Construct a BeanContextSupport instance- Parameters:
peer- The peerBeanContextwe are supplying an implementation for, ornullif this object is its own peerlcle- The current Locale for this BeanContext. Iflcleisnull, the default locale is assigned to theBeanContextinstance.dTime- The initial state,trueif in design mode,falseif runtime.visible- The initial visibility.- See Also:
-
BeanContextSupport
Deprecated, for removal: This API element is subject to removal in a future version.Create an instance using the specified Locale and design mode.- Parameters:
peer- The peerBeanContextwe are supplying an implementation for, ornullif this object is its own peerlcle- The current Locale for thisBeanContext. Iflcleisnull, the default locale is assigned to theBeanContextinstance.dtime- The initial state,trueif in design mode,falseif runtime.- See Also:
-
BeanContextSupport
Deprecated, for removal: This API element is subject to removal in a future version.Create an instance using the specified locale- Parameters:
peer- The peer BeanContext we are supplying an implementation for, ornullif this object is its own peerlcle- The current Locale for thisBeanContext. Iflcleisnull, the default locale is assigned to theBeanContextinstance.- See Also:
-
BeanContextSupport
Deprecated, for removal: This API element is subject to removal in a future version.Create an instance using with a default locale- Parameters:
peer- The peerBeanContextwe are supplying an implementation for, ornullif this object is its own peer
-
BeanContextSupport
public BeanContextSupport()Deprecated, for removal: This API element is subject to removal in a future version.Create an instance that is not a delegate of another object
-
-
Method Details
-
getBeanContextPeer
Deprecated, for removal: This API element is subject to removal in a future version.Gets the instance ofBeanContextthat this object is providing the implementation for.- Returns:
- the BeanContext instance
-
instantiateChild
Deprecated, for removal: This API element is subject to removal in a future version.The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into a
BeanContext.The semantics of the beanName parameter are defined by java.beans.Beans.instantiate.
- Specified by:
instantiateChildin interfaceBeanContext- Parameters:
beanName- the name of the Bean to instantiate within this BeanContext- Returns:
- the new object
- Throws:
IOException- if there is an I/O error when the bean is being deserializedClassNotFoundException- if the class identified by the beanName parameter is not found
-
size
public int size()Deprecated, for removal: This API element is subject to removal in a future version.Gets the number of children currently nested in this BeanContext.- Specified by:
sizein interfaceCollection- Returns:
- number of children
-
isEmpty
public boolean isEmpty()Deprecated, for removal: This API element is subject to removal in a future version.Reports whether or not thisBeanContextis empty. ABeanContextis considered empty when it contains zero nested children.- Specified by:
isEmptyin interfaceCollection- Returns:
trueif there are no children, otherwisefalse
-
contains
Deprecated, for removal: This API element is subject to removal in a future version.Determines whether or not the specified object is currently a child of thisBeanContext.- Specified by:
containsin interfaceCollection- Parameters:
o- the Object in question- Returns:
trueif this object is a child, otherwisefalse
-
containsKey
Deprecated, for removal: This API element is subject to removal in a future version.Determines whether or not the specified object is currently a child of thisBeanContext.- Parameters:
o- the Object in question- Returns:
trueif this object is a child, otherwisefalse
-
iterator
Deprecated, for removal: This API element is subject to removal in a future version.Gets all JavaBean orBeanContextinstances currently nested in thisBeanContext.- Specified by:
iteratorin interfaceCollection- Specified by:
iteratorin interfaceIterable- Returns:
- an
Iteratorof the nested children
-
toArray
Deprecated, for removal: This API element is subject to removal in a future version.Gets all JavaBean orBeanContextinstances currently nested in this BeanContext.- Specified by:
toArrayin interfaceCollection- Returns:
- an array, whose runtime component
type is
Object, containing all of the elements in this collection
-
toArray
Deprecated, for removal: This API element is subject to removal in a future version.Gets an array containing all children of thisBeanContextthat match the types contained in arry.- Specified by:
toArrayin interfaceCollection- Parameters:
arry- The array of object types that are of interest.- Returns:
- an array of children
-
createBCSChild
Deprecated, for removal: This API element is subject to removal in a future version.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.
- Parameters:
targetChild- the child to create the Child on behalf ofpeer- the peer if the tragetChild and the peer are related by an implementation of BeanContextProxy- Returns:
- Subtype-specific subclass of Child without overriding collection methods
-
add
Deprecated, for removal: This API element is subject to removal in a future version.Adds/nests a child within thisBeanContext.Invoked as a side effect of java.beans.Beans.instantiate(). If the child object is not valid for adding then this method throws an IllegalStateException.
- Specified by:
addin interfaceCollection- Parameters:
targetChild- The child objects to nest within thisBeanContext- Returns:
- true if the child was added successfully.
- See Also:
-
remove
Deprecated, for removal: This API element is subject to removal in a future version.Removes a child from this BeanContext. If the child object is not for adding then this method throws an IllegalStateException.- Specified by:
removein interfaceCollection- Parameters:
targetChild- The child objects to remove- Returns:
trueif an element was removed as a result of this call- See Also:
-
remove
Deprecated, for removal: This API element is subject to removal in a future version.internal remove used when removal caused by unexpectedsetBeanContextor byremove()invocation.- Parameters:
targetChild- the JavaBean, BeanContext, or Object to be removedcallChildSetBC- used to indicate that the child should be notified that it is no longer nested in thisBeanContext.- Returns:
- whether or not was present before being removed
-
containsAll
Deprecated, for removal: This API element is subject to removal in a future version.Tests to see if all objects in the specifiedCollectionare children of thisBeanContext.- Specified by:
containsAllin interfaceCollection- Parameters:
c- the specifiedCollection- Returns:
trueif all objects in the collection are children of thisBeanContext, false if not.- See Also:
-
addAll
Deprecated, for removal: This API element is subject to removal in a future version.add Collection to set of Children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field- Specified by:
addAllin interfaceCollection- Parameters:
c- collection containing elements to be added to this collection- Returns:
- this implementation unconditionally throws
UnsupportedOperationException - Throws:
UnsupportedOperationException- thrown unconditionally by this implementation- See Also:
-
removeAll
Deprecated, for removal: This API element is subject to removal in a future version.remove all specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field- Specified by:
removeAllin interfaceCollection- Parameters:
c- collection containing elements to be removed from this collection- Returns:
- this implementation unconditionally throws
UnsupportedOperationException - Throws:
UnsupportedOperationException- thrown unconditionally by this implementation- See Also:
-
retainAll
Deprecated, for removal: This API element is subject to removal in a future version.retain only specified children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field- Specified by:
retainAllin interfaceCollection- Parameters:
c- collection containing elements to be retained in this collection- Returns:
- this implementation unconditionally throws
UnsupportedOperationException - Throws:
UnsupportedOperationException- thrown unconditionally by this implementation- See Also:
-
clear
public void clear()Deprecated, for removal: This API element is subject to removal in a future version.clear the children (Unsupported) implementations must synchronized on the hierarchy lock and "children" protected field- Specified by:
clearin interfaceCollection- Throws:
UnsupportedOperationException- thrown unconditionally by this implementation
-
addBeanContextMembershipListener
Deprecated, for removal: This API element is subject to removal in a future version.Adds a BeanContextMembershipListener- Specified by:
addBeanContextMembershipListenerin interfaceBeanContext- Parameters:
bcml- the BeanContextMembershipListener to add- Throws:
NullPointerException- if the argument is null
-
removeBeanContextMembershipListener
Deprecated, for removal: This API element is subject to removal in a future version.Removes a BeanContextMembershipListener- Specified by:
removeBeanContextMembershipListenerin interfaceBeanContext- Parameters:
bcml- the BeanContextMembershipListener to remove- Throws:
NullPointerException- if the argument is null
-
getResourceAsStream
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:BeanContextAnalogous tojava.lang.ClassLoader.getResourceAsStream(), this method allows aBeanContextimplementation to interpose behavior between the childComponentand underlyingClassLoader.- Specified by:
getResourceAsStreamin interfaceBeanContext- Parameters:
name- the name of the resource requested.bcc- the child object making the request.- Returns:
- the requested resource as an InputStream
- Throws:
NullPointerException- if the argument is null
-
getResource
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:BeanContextAnalogous tojava.lang.ClassLoader.getResource(), this method allows aBeanContextimplementation to interpose behavior between the childComponentand underlyingClassLoader.- Specified by:
getResourcein interfaceBeanContext- Parameters:
name- the name of the resource requested.bcc- the child object making the request.- Returns:
- the requested resource as an InputStream
-
setDesignTime
public void setDesignTime(boolean dTime) Deprecated, for removal: This API element is subject to removal in a future version.Sets the new design time value for thisBeanContext.- Specified by:
setDesignTimein interfaceDesignMode- Parameters:
dTime- the new designTime value- See Also:
-
isDesignTime
public boolean isDesignTime()Deprecated, for removal: This API element is subject to removal in a future version.Reports whether or not this object is in currently in design time mode.- Specified by:
isDesignTimein interfaceDesignMode- Returns:
trueif in design time mode,falseif not
-
setLocale
Deprecated, for removal: This API element is subject to removal in a future version.Sets the locale of this BeanContext.- Parameters:
newLocale- the new locale. This method call will have no effect if newLocale isnull.- Throws:
PropertyVetoException- if the new value is rejected
-
getLocale
Deprecated, for removal: This API element is subject to removal in a future version.Gets the locale for thisBeanContext.- Returns:
- the current Locale of the
BeanContext
-
needsGui
public boolean needsGui()Deprecated, for removal: This API element is subject to removal in a future version.This method is typically called from the environment in order to determine if the implementor "needs" a GUI.
The algorithm used herein tests the BeanContextPeer, and its current children to determine if they are either Containers, Components, or if they implement Visibility and return needsGui() == true.
- Specified by:
needsGuiin interfaceVisibility- Returns:
trueif the implementor needs a GUI
-
dontUseGui
public void dontUseGui()Deprecated, for removal: This API element is subject to removal in a future version.notify this instance that it may no longer render a GUI.- Specified by:
dontUseGuiin interfaceVisibility
-
okToUseGui
public void okToUseGui()Deprecated, for removal: This API element is subject to removal in a future version.Notify this instance that it may now render a GUI- Specified by:
okToUseGuiin interfaceVisibility
-
avoidingGui
public boolean avoidingGui()Deprecated, for removal: This API element is subject to removal in a future version.Used to determine if theBeanContextchild is avoiding using its GUI.- Specified by:
avoidingGuiin interfaceVisibility- Returns:
- is this instance avoiding using its GUI?
- See Also:
-
isSerializing
public boolean isSerializing()Deprecated, for removal: This API element is subject to removal in a future version.Is thisBeanContextin the process of being serialized?- Returns:
trueif thisBeanContextis currently being serialized, otherwisefalse
-
bcsChildren
Deprecated, for removal: This API element is subject to removal in a future version.Returns an iterator of all children of thisBeanContext.- Returns:
- an iterator for all the current BCSChild values
-
bcsPreSerializationHook
Deprecated, for removal: This API element is subject to removal in a future version.called by writeObject after defaultWriteObject() but prior to serialization of currently serializable children. This method may be overridden by subclasses to perform custom serialization of their state prior to this superclass serializing the children. This method should not however be used by subclasses to replace their own implementation (if any) of writeObject().- Parameters:
oos- theObjectOutputStreamto use during serialization- Throws:
IOException- if serialization failed
-
bcsPreDeserializationHook
protected void bcsPreDeserializationHook(ObjectInputStream ois) throws IOException, ClassNotFoundException Deprecated, for removal: This API element is subject to removal in a future version.called by readObject after defaultReadObject() but prior to deserialization of any children. This method may be overridden by subclasses to perform custom deserialization of their state prior to this superclass deserializing the children. This method should not however be used by subclasses to replace their own implementation (if any) of readObject().- Parameters:
ois- theObjectInputStreamto use during deserialization- Throws:
IOException- if deserialization failedClassNotFoundException- if needed classes are not found
-
childDeserializedHook
Deprecated, for removal: This API element is subject to removal in a future version.Called by readObject with the newly deserialized child and BCSChild.- Parameters:
child- the newly deserialized childbcsc- the newly deserialized BCSChild
-
serialize
Deprecated, for removal: This API element is subject to removal in a future version.Used by writeObject to serialize a Collection.- Parameters:
oos- theObjectOutputStreamto use during serializationcoll- theCollectionto serialize- Throws:
IOException- if serialization failed
-
deserialize
protected final void deserialize(ObjectInputStream ois, Collection coll) throws IOException, ClassNotFoundException Deprecated, for removal: This API element is subject to removal in a future version.used by readObject to deserialize a collection.- Parameters:
ois- the ObjectInputStream to usecoll- the Collection- Throws:
IOException- if deserialization failedClassNotFoundException- if needed classes are not found
-
writeChildren
Deprecated, for removal: This API element is subject to removal in a future version.Used to serialize all children of thisBeanContext.- Parameters:
oos- theObjectOutputStreamto use during serialization- Throws:
IOException- if serialization failed
-
readChildren
Deprecated, for removal: This API element is subject to removal in a future version.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- Parameters:
ois- the ObjectInputStream to use- Throws:
IOException- if deserialization failedClassNotFoundException- if needed classes are not found
-
vetoableChange
Deprecated, for removal: This API element is subject to removal in a future version.subclasses may envelope to monitor veto child property changes.- Specified by:
vetoableChangein interfaceVetoableChangeListener- Parameters:
pce- aPropertyChangeEventobject describing the event source and the property that has changed.- Throws:
PropertyVetoException- if the recipient wishes the property change to be rolled back.
-
propertyChange
Deprecated, for removal: This API element is subject to removal in a future version.subclasses may envelope to monitor child property changes.- Specified by:
propertyChangein interfacePropertyChangeListener- Parameters:
pce- A PropertyChangeEvent object describing the event source and the property that has changed.
-
validatePendingAdd
Deprecated, for removal: This API element is subject to removal in a future version.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.
- Parameters:
targetChild- the child to create the Child on behalf of- Returns:
- true iff the child may be added to this BeanContext, otherwise false.
-
validatePendingRemove
Deprecated, for removal: This API element is subject to removal in a future version.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.
- Parameters:
targetChild- the child to create the Child on behalf of- Returns:
- true iff the child may be removed from this BeanContext, otherwise false.
-
childJustAddedHook
Deprecated, for removal: This API element is subject to removal in a future version.subclasses may override this method to simply extend add() semantics after the child has been added and before the event notification has occurred. The method is called with the child synchronized.- Parameters:
child- the childbcsc- the BCSChild
-
childJustRemovedHook
Deprecated, for removal: This API element is subject to removal in a future version.subclasses may override this method to simply extend remove() semantics after the child has been removed and before the event notification has occurred. The method is called with the child synchronized.- Parameters:
child- the childbcsc- the BCSChild
-
getChildVisibility
Deprecated, for removal: This API element is subject to removal in a future version.Gets the Component (if any) associated with the specified child.- Parameters:
child- the specified child- Returns:
- the Component (if any) associated with the specified child.
-
getChildSerializable
Deprecated, for removal: This API element is subject to removal in a future version.Gets the Serializable (if any) associated with the specified Child- Parameters:
child- the specified child- Returns:
- the Serializable (if any) associated with the specified Child
-
getChildPropertyChangeListener
Deprecated, for removal: This API element is subject to removal in a future version.Gets the PropertyChangeListener (if any) of the specified child- Parameters:
child- the specified child- Returns:
- the PropertyChangeListener (if any) of the specified child
-
getChildVetoableChangeListener
Deprecated, for removal: This API element is subject to removal in a future version.Gets the VetoableChangeListener (if any) of the specified child- Parameters:
child- the specified child- Returns:
- the VetoableChangeListener (if any) of the specified child
-
getChildBeanContextMembershipListener
protected static final BeanContextMembershipListener getChildBeanContextMembershipListener(Object child) Deprecated, for removal: This API element is subject to removal in a future version.Gets the BeanContextMembershipListener (if any) of the specified child- Parameters:
child- the specified child- Returns:
- the BeanContextMembershipListener (if any) of the specified child
-
getChildBeanContextChild
Deprecated, for removal: This API element is subject to removal in a future version.Gets the BeanContextChild (if any) of the specified child- Parameters:
child- the specified child- Returns:
- the BeanContextChild (if any) of the specified child
- Throws:
IllegalArgumentException- if child implements both BeanContextChild and BeanContextProxy
-
fireChildrenAdded
Deprecated, for removal: This API element is subject to removal in a future version.Fire a BeanContextMembershipEvent on the BeanContextMembershipListener interface- Parameters:
bcme- the event to fire
-
fireChildrenRemoved
Deprecated, for removal: This API element is subject to removal in a future version.Fire a BeanContextMembershipEvent on the BeanContextMembershipListener interface- Parameters:
bcme- the event to fire
-
initialize
protected void initialize()Deprecated, for removal: This API element is subject to removal in a future version.protected method called from constructor and readObject to initialize transient state of BeanContextSupport instance. This class uses this method to instantiate inner class listeners used to monitor PropertyChange and VetoableChange events on children. subclasses may envelope this method to add their own initialization behavior -
copyChildren
Deprecated, for removal: This API element is subject to removal in a future version.Gets a copy of the this BeanContext's children.- Returns:
- a copy of the current nested children
-
classEquals
Deprecated, for removal: This API element is subject to removal in a future version.Tests to see if two class objects, or their names are equal.- Parameters:
first- the first objectsecond- the second object- Returns:
- true if equal, false if not
-