java.beans.beancontext.BeanContext |
Known Indirect Subclasses
BeanContextServices |
The BeanContextServices interface provides a mechanism for a BeanContext
to expose generic "services" to the BeanContextChild objects within. |
BeanContextServicesSupport |
This helper class provides a utility implementation of the
java.beans.beancontext.BeanContextServices interface. |
BeanContextSupport |
This helper class provides a utility implementation of the
java.beans.beancontext.BeanContext interface. |
|
Class Overview
The BeanContext acts a logical hierarchical container for JavaBeans.
Summary
Fields |
public
static
final
Object |
globalHierarchyLock |
This global lock is used by both BeanContext
and BeanContextServices implementors
to serialize changes in a BeanContext
hierarchy and any service requests etc. |
[Expand]
Inherited Methods |
From interface
java.beans.DesignMode
abstract
boolean
|
isDesignTime()
A value of true denotes that JavaBeans should behave in design time
mode, a value of false denotes runtime behavior.
|
abstract
void
|
setDesignTime(boolean designTime)
Sets the "value" of the "designTime" property.
|
|
From interface
java.beans.Visibility
abstract
boolean
|
avoidingGui()
Determines whether this bean is avoiding using a GUI.
|
abstract
void
|
dontUseGui()
This method instructs the bean that it should not use the Gui.
|
abstract
boolean
|
needsGui()
Determines whether this bean needs a GUI.
|
abstract
void
|
okToUseGui()
This method instructs the bean that it is OK to use the Gui.
|
|
From interface
java.beans.beancontext.BeanContextChild
abstract
void
|
addPropertyChangeListener(String name, PropertyChangeListener pcl)
Adds a PropertyChangeListener
to this BeanContextChild
in order to receive a PropertyChangeEvent
whenever the specified property has changed.
|
abstract
void
|
addVetoableChangeListener(String name, VetoableChangeListener vcl)
Adds a VetoableChangeListener to
this BeanContextChild
to receive events whenever the specified property changes.
|
abstract
BeanContext
|
getBeanContext()
Gets the BeanContext associated
with this BeanContextChild .
|
abstract
void
|
removePropertyChangeListener(String name, PropertyChangeListener pcl)
Removes a PropertyChangeListener from this
BeanContextChild so that it no longer
receives PropertyChangeEvents when the
specified property is changed.
|
abstract
void
|
removeVetoableChangeListener(String name, VetoableChangeListener vcl)
Removes a VetoableChangeListener from this
BeanContextChild so that it no longer receives
events when the specified property changes.
|
abstract
void
|
setBeanContext(BeanContext bc)
Objects that implement this interface,
shall fire a java.beans.PropertyChangeEvent, with parameters:
propertyName "beanContext", oldValue (the previous nesting
BeanContext instance, or null ),
newValue (the current nesting
BeanContext instance, or null ).
|
|
From interface
java.lang.Iterable
abstract
Iterator<T>
|
iterator()
Returns an iterator over a set of elements of type T.
|
|
From interface
java.util.Collection
abstract
boolean
|
add(E e)
Ensures that this collection contains the specified element (optional
operation).
|
abstract
boolean
|
addAll(Collection<? extends E> c)
Adds all of the elements in the specified collection to this collection
(optional operation).
|
abstract
void
|
clear()
Removes all of the elements from this collection (optional operation).
|
abstract
boolean
|
contains(Object o)
Returns true if this collection contains the specified element.
|
abstract
boolean
|
containsAll(Collection<?> c)
Returns true if this collection contains all of the elements
in the specified collection.
|
abstract
boolean
|
equals(Object o)
Compares the specified object with this collection for equality.
|
abstract
int
|
hashCode()
Returns the hash code value for this collection.
|
abstract
boolean
|
isEmpty()
Returns true if this collection contains no elements.
|
abstract
Iterator<E>
|
iterator()
Returns an iterator over the elements in this collection.
|
abstract
boolean
|
remove(Object o)
Removes a single instance of the specified element from this
collection, if it is present (optional operation).
|
abstract
boolean
|
removeAll(Collection<?> c)
Removes all of this collection's elements that are also contained in the
specified collection (optional operation).
|
abstract
boolean
|
retainAll(Collection<?> c)
Retains only the elements in this collection that are contained in the
specified collection (optional operation).
|
abstract
int
|
size()
Returns the number of elements in this collection.
|
abstract
<T>
T[]
|
toArray(T[] a)
Returns an array containing all of the elements in this collection;
the runtime type of the returned array is that of the specified array.
|
abstract
Object[]
|
toArray()
Returns an array containing all of the elements in this collection.
|
|
Fields
public
static
final
Object
globalHierarchyLock
This global lock is used by both BeanContext
and BeanContextServices
implementors
to serialize changes in a BeanContext
hierarchy and any service requests etc.
Public Methods
public
abstract
void
addBeanContextMembershipListener
(BeanContextMembershipListener bcml)
Adds the specified BeanContextMembershipListener
to receive BeanContextMembershipEvents
from
this BeanContext
whenever it adds
or removes a child Component
(s).
Parameters
bcml
| the BeanContextMembershipListener to be added
|
Analagous to java.lang.ClassLoader.getResource()
, this
method allows a BeanContext
implementation to interpose
behavior between the child Component
and underlying ClassLoader
.
Parameters
name
| the resource name |
bcc
| the specified child |
Returns
- a
URL
for the named
resource for the specified child
Analagous to java.lang.ClassLoader.getResourceAsStream()
,
this method allows a BeanContext
implementation
to interpose behavior between the child Component
and underlying ClassLoader
.
Parameters
name
| the resource name |
bcc
| the specified child |
Returns
- an
InputStream
for reading the resource,
or null
if the resource could not
be found.
public
abstract
Object
instantiateChild
(String beanName)
Instantiate the javaBean named as a
child of this BeanContext
.
The implementation of the JavaBean is
derived from the value of the beanName parameter,
and is defined by the
java.beans.Beans.instantiate()
method.
Parameters
beanName
| The name of the JavaBean to instantiate
as a child of this BeanContext |
public
abstract
void
removeBeanContextMembershipListener
(BeanContextMembershipListener bcml)
Removes the specified BeanContextMembershipListener
so that it no longer receives BeanContextMembershipEvent
s
when the child Component
(s) are added or removed.
Parameters
bcml
| the BeanContextMembershipListener
to be removed
|