- すべての実装されたインタフェース:
BeanContext
,BeanContextChild
,BeanContextServiceRevokedListener
,BeanContextServicesListener
,DesignMode
,PropertyChangeListener
,VetoableChangeListener
,Visibility
,Serializable
,Iterable
,Collection
,EventListener
- 直系の既知のサブクラス:
BeanContextServicesSupport
このクラスは、BeanContextインタフェースを直接実装するため、この実装をサブクラス化することによって、あるいはほかのインスタンスからこのクラスのインスタンスの特別な委譲を介すことによって使用されることを目的としています。
- 導入されたバージョン:
- 1.2
- 関連項目:
-
ネストされたクラスのサマリー
ネストされたクラス修飾子と型クラス説明protected class
children
ハッシュ表内の子ごとの情報を含む保護されたネストされたクラス。protected static final class
protected finalサブクラス。イテレータをカプセル化しますが、何も行わないremove()メソッドを実装します。 -
フィールドのサマリー
フィールド修飾子と型フィールド説明protected ArrayList
<BeanContextMembershipListener> protected ArrayList bcmListeners
フィールドへのすべてのアクセスは、そのオブジェクトで同期されます。protected HashMap
<Object, BeanContextSupport.BCSChild> protected HashMap children
フィールドへのすべてのアクセスは、そのオブジェクトで同期されます。protected boolean
このオブジェクトが現在設計時モードであるかどうかを示すboolean
。protected Locale
BeanContextの現在のロケールです。protected boolean
このインスタンスがGUIをレンダリングできるかどうかを示すboolean
。クラスjava.beans.beancontext.BeanContextChildSupportで宣言されたフィールド
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport
インタフェースjava.beans.beancontext.BeanContextで宣言されているフィールド
globalHierarchyLock
インタフェースjava.beans.DesignModeで宣言されているフィールド
PROPERTYNAME
-
コンストラクタのサマリー
コンストラクタコンストラクタ説明ほかのオブジェクトの委譲でないインスタンスを生成します。デフォルトのロケールを使ってインスタンスを生成します。BeanContextSupport
(BeanContext peer, Locale lcle) 指定されたロケールを使ってインスタンスを生成します。BeanContextSupport
(BeanContext peer, Locale lcle, boolean dtime) 指定されたロケールを使って設計モードでインスタンスを生成します。BeanContextSupport
(BeanContext peer, Locale lcle, boolean dTime, boolean visible) BeanContextSupportのインスタンスを生成します。 -
メソッドのサマリー
修飾子と型メソッド説明boolean
このBeanContext
内で子を追加/ネストします。boolean
addAll
(Collection c) ChildrenのセットにCollectionを追加します(サポートされていない)。実装では、階層のロックおよび「子」のprotectedフィールドについて同期をとる必要があります。void
BeanContextMembershipListenerを追加します。boolean
BeanContext
の子がGUIを使用して回避しているかどうかを判断するために使用されます。protected Iterator
<BeanContextSupport.BCSChild> このBeanContext
のすべての子イテレータを返します。protected void
defaultReadObject()のあと、子を直列化する前のreadObjectによって呼び出されます。protected void
defaultWriteObject()のあと、子を直列化する前のwriteObjectによって呼び出されます。protected void
childDeserializedHook
(Object child, BeanContextSupport.BCSChild bcsc) 新しく直列化復元された子およびBCSChildを使ってreadObjectによって呼び出されます。protected void
childJustAddedHook
(Object child, BeanContextSupport.BCSChild bcsc) サブクラスはこのメソッドをオーバーライドして、子が追加されて、イベント通知が発生する前に、簡単にadd()セマンティックスを拡張できます。protected void
childJustRemovedHook
(Object child, BeanContextSupport.BCSChild bcsc) サブクラスはこのメソッドをオーバーライドして、子が削除されて、イベント通知が発生する前に、簡単にremove()セマンティックスを拡張できます。protected static final boolean
classEquals
(Class<?> first, Class<?> second) 2つのクラス・オブジェクトまたはそれらの名前が同じかどうかを判定します。void
clear()
子をクリアします(サポートされていない)。実装では、階層のロックおよび「子」のprotectedフィールドについて同期をとる必要があります。boolean
指定したオブジェクトが現在このBeanContext
の子であるかどうかを決定します。boolean
指定したCollection
内のすべてのオブジェクトがこのBeanContext
の子であるかどうかをテストします。boolean
指定したオブジェクトが現在このBeanContext
の子であるかどうかを決定します。protected final Object[]
このBeanContextの子のコピーを取得します。protected BeanContextSupport.BCSChild
createBCSChild
(Object targetChild, Object peer) サブクラスはこのメソッドをオーバーライドすることにより、セットに子を追加するadd()メソッドやほかのCollectionメソッドをオーバーライドすることなく、Childの独自のサブクラスを挿入することができます。protected final void
deserialize
(ObjectInputStream ois, Collection coll) コレクションを直列化復元するためにreadObjectによって使用されます。void
このインスタンスにGUIを描画できないことを通知します。protected final void
BeanContextMembershipListenerインタフェースでBeanContextMembershipEventを起動します。protected final void
BeanContextMembershipListenerインタフェースでBeanContextMembershipEventを起動します。このオブジェクトが実装を提供しているBeanContext
のインスタンスを取得します。protected static final BeanContextChild
getChildBeanContextChild
(Object child) 指定された子のBeanContextChild (存在する場合)を取得します。protected static final BeanContextMembershipListener
指定された子のBeanContextMembershipListener (存在する場合)を取得します。protected static final PropertyChangeListener
指定された子のPropertyChangeListener (存在する場合)を取得します。protected static final Serializable
getChildSerializable
(Object child) 指定されたChildに関連したSerializable (存在する場合)を取得します。protected static final VetoableChangeListener
指定された子のVetoableChangeListener (存在する場合)を取得します。protected static final Visibility
getChildVisibility
(Object child) 指定された子に関連したComponent (存在する場合)を取得します。このBeanContext
のロケールを取得します。getResource
(String name, BeanContextChild bcc) java.lang.ClassLoader.getResource()
と同様に、このメソッドを使用すると、子Component
と基礎となるClassLoader
の間の動作をBeanContext
実装で置き換えることができます。getResourceAsStream
(String name, BeanContextChild bcc) java.lang.ClassLoader.getResourceAsStream()
と同様に、このメソッドを使用すると、子Component
と基礎となるClassLoader
の間の動作をBeanContext
実装で置き換えることができます。protected void
BeanContextSupportインスタンスの過渡状態を初期化するために、コンストラクタおよびreadObjectから呼び出されるprotectedメソッドです。instantiateChild
(String beanName) instantiateChildメソッドは、BeanContextの便利なフックで、BeanContext
にネストされたBeanのインスタンス化のタスクを簡略化します。boolean
このオブジェクトが現在、設計時モードかどうかを報告します。boolean
isEmpty()
このBeanContext
が空かどうかを報告します。boolean
このBeanContext
は直列化処理中ですか。iterator()
このBeanContext
に現在ネストされているすべてのJavaBeanまたはBeanContext
インスタンスを取得します。boolean
needsGui()
通常、このメソッドは実装側がGUIを必要としているかどうかを判断するために、環境から呼び出されます。void
このインスタンスにGUIを描画できることを通知します。void
サブクラスは、子のプロパティの変更を監視するために包括することがあります。final void
このクラスのインスタンスがBeanContextプロトコル(およびそのサブプロトコル)の実装の委譲として使用されるときには、直列化復元の際に「鶏が先か卵が先か」の問題が起こります。boolean
このBeanContextから子を削除します。protected boolean
予期しないsetBeanContext
またはremove()
呼び出しによって発生した削除時に使用される内部削除。boolean
指定されたすべての子を削除します(サポートされていない)。実装では、階層のロックおよび「子」のprotectedフィールドについて同期をとる必要があります。void
BeanContextMembershipListenerを削除します。boolean
指定された子だけを保持します(サポートされていない)。実装では、階層のロックおよび「子」のprotectedフィールドについて同期をとる必要があります。protected final void
serialize
(ObjectOutputStream oos, Collection<?> coll) コレクションを直列化するためにwriteObjectによって使用されます。void
setDesignTime
(boolean dTime) このBeanContext
の新しい設計時の値を設定します。void
このBeanContextのロケールを設定します。int
size()
このBeanContextで入れ子になった現在の子の個数を取得します。Object[]
toArray()
このBeanContextに現在ネストされているすべてのJavaBeanまたはBeanContext
インスタンスを取得します。Object[]
arryに含まれる型と一致する、このBeanContext
のすべての子を含む配列を取得します。protected boolean
validatePendingAdd
(Object targetChild) このクラスのサブクラスはこのメソッドをオーバーライドまたは包括して、BeanContextに追加される直前に、BeanContextが子オブジェクトを調べるための検証動作を追加できます。protected boolean
validatePendingRemove
(Object targetChild) このクラスのサブクラスはこのメソッドをオーバーライドまたは包括して、BeanContextから削除される直前に、BeanContextが子オブジェクトを調べるための検証動作を追加できます。void
サブクラスは、子の拒否プロパティの変更を監視するために包括することがあります。final void
このBeanContext
のすべての子を直列化するために使用されます。クラスjava.beans.beancontext.BeanContextChildSupportで宣言されたメソッド
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, initializeBeanContextResources, isDelegated, releaseBeanContextResources, removePropertyChangeListener, removeVetoableChangeListener, serviceAvailable, serviceRevoked, setBeanContext, validatePendingSetBeanContext
クラスjava.lang.Objectで宣言されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
インタフェースjava.beans.beancontext.BeanContextChildで宣言されたメソッド
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext
インタフェースjava.util.Collectionで宣言されたメソッド
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
フィールド詳細
-
children
protected transient HashMap<Object,BeanContextSupport.BCSChild> childrenprotected HashMap children
フィールドへのすべてのアクセスは、そのオブジェクトで同期されます。 -
bcmListeners
protected transient ArrayList<BeanContextMembershipListener> bcmListenersprotected ArrayList bcmListeners
フィールドへのすべてのアクセスは、そのオブジェクトで同期されます。 -
locale
protected Locale localeBeanContextの現在のロケールです。 -
okToUseGui
protected boolean okToUseGuiこのインスタンスがGUIをレンダリングできるかどうかを示すboolean
。 -
designTime
protected boolean designTimeこのオブジェクトが現在設計時モードであるかどうかを示すboolean
。
-
-
コンストラクタの詳細
-
BeanContextSupport
public BeanContextSupport(BeanContext peer, Locale lcle, boolean dTime, boolean visible) BeanContextSupportのインスタンスを生成します。- パラメータ:
peer
- 実装を提供するピアBeanContext
、またはこのオブジェクトが独自のピアである場合はnull
lcle
- このBeanContextの現在のロケール。lcle
がnull
の場合、デフォルトのロケールがBeanContext
インスタンスに割り当てられます。dTime
- 初期状態。デザイン・モードの場合はtrue
、ランタイムの場合はfalse
。visible
- 初期状態での可視性。- 関連項目:
-
BeanContextSupport
public BeanContextSupport(BeanContext peer, Locale lcle, boolean dtime) 指定されたロケールを使って設計モードでインスタンスを生成します。- パラメータ:
peer
- 実装を提供するピアBeanContext
、またはこのオブジェクトが独自のピアである場合はnull
lcle
- このBeanContext
の現在のロケール。lcle
がnull
の場合、デフォルトのロケールがBeanContext
インスタンスに割り当てられます。dtime
- 初期状態。デザイン・モードの場合はtrue
、ランタイムの場合はfalse
。- 関連項目:
-
BeanContextSupport
public BeanContextSupport(BeanContext peer, Locale lcle) 指定されたロケールを使ってインスタンスを生成します。- パラメータ:
peer
- 実装を提供するピアBeanContext、またはこのオブジェクトが独自のピアである場合はnull
lcle
- このBeanContext
の現在のロケール。lcle
がnull
の場合、デフォルトのロケールがBeanContext
インスタンスに割り当てられます。- 関連項目:
-
BeanContextSupport
public BeanContextSupport(BeanContext peer) デフォルトのロケールを使ってインスタンスを生成します。- パラメータ:
peer
- 実装を提供するピアBeanContext
、またはこのオブジェクトが独自のピアである場合はnull
-
BeanContextSupport
public BeanContextSupport()ほかのオブジェクトの委譲でないインスタンスを生成します。
-
-
メソッドの詳細
-
getBeanContextPeer
public BeanContext getBeanContextPeer()このオブジェクトが実装を提供しているBeanContext
のインスタンスを取得します。- 戻り値:
- BeanContextインスタンス
-
instantiateChild
public Object instantiateChild(String beanName) throws IOException, ClassNotFoundException instantiateChildメソッドは、BeanContextの便利なフックで、
BeanContext
にネストされたBeanのインスタンス化のタスクを簡略化します。beanNameパラメータのセマンティックスは、java.beans.Beans.instantiateによって定義されます。
- 定義:
instantiateChild
、インタフェースBeanContext
- パラメータ:
beanName
- このBeanContext内でインスタンスを生成するBeanの名前- 戻り値:
- 新規オブジェクト
- 例外:
IOException
- Beanの直列化復元中に入出力エラーが発生した場合ClassNotFoundException
- beanNameパラメータによって識別されたクラスが見つからない場合
-
size
-
isEmpty
public boolean isEmpty()このBeanContext
が空かどうかを報告します。BeanContext
は、ネストされた子がゼロの場合、空とみなされます。- 定義:
isEmpty
、インタフェースCollection
- 戻り値:
- 子がないかどうか
-
contains
public boolean contains(Object o) 指定したオブジェクトが現在このBeanContext
の子であるかどうかを決定します。- 定義:
contains
、インタフェースCollection
- パラメータ:
o
- 該当するオブジェクト- 戻り値:
- このオブジェクトが子の場合
-
containsKey
public boolean containsKey(Object o) 指定したオブジェクトが現在このBeanContext
の子であるかどうかを決定します。- パラメータ:
o
- 該当するオブジェクト- 戻り値:
- このオブジェクトが子の場合
-
iterator
-
toArray
public Object[] toArray()このBeanContextに現在ネストされているすべてのJavaBeanまたはBeanContext
インスタンスを取得します。- 定義:
toArray
、インタフェースCollection
- 戻り値:
- 「ランタイム・コンポーネント・タイプ」が
Object
の配列。このコレクションのすべての要素を含む
-
toArray
arryに含まれる型と一致する、このBeanContext
のすべての子を含む配列を取得します。- 定義:
toArray
、インタフェースCollection
- パラメータ:
arry
- 対象となるオブジェクト型の配列。- 戻り値:
- 子の配列
-
createBCSChild
protected BeanContextSupport.BCSChild createBCSChild(Object targetChild, Object peer) サブクラスはこのメソッドをオーバーライドすることにより、セットに子を追加するadd()メソッドやほかのCollectionメソッドをオーバーライドすることなく、Childの独自のサブクラスを挿入することができます。
- パラメータ:
targetChild
- 代わりにChildを作成する子peer
- tragetChildとピアがBeanContextProxyの実装によって関連付けられている場合は、ピア- 戻り値:
- コレクション・メソッドをオーバーライドしない、子のサブ型固有のサブクラス
-
add
public boolean add(Object targetChild) このBeanContext
内で子を追加/ネストします。java.beans.Beans.instantiate()の副作用として呼び出されます。 子オブジェクトを追加する処理が正当でない場合、このメソッドはIllegalStateExceptionをスローします。
- 定義:
add
、インタフェースCollection
- パラメータ:
targetChild
- このBeanContext
内にネストする子オブジェクト- 戻り値:
- 子の追加が成功した場合はtrue。
- 関連項目:
-
remove
public boolean remove(Object targetChild) このBeanContextから子を削除します。 子オブジェクトを追加する処理が正当でない場合、このメソッドはIllegalStateExceptionをスローします。- 定義:
remove
、インタフェースCollection
- パラメータ:
targetChild
- 削除される子オブジェクト- 戻り値:
- この呼出しの結果として要素が削除された場合は
true
- 関連項目:
-
remove
protected boolean remove(Object targetChild, boolean callChildSetBC) 予期しないsetBeanContext
またはremove()
呼び出しによって発生した削除時に使用される内部削除。- パラメータ:
targetChild
- 削除されるJavaBean、BeanContext、またはObjectcallChildSetBC
- このBeanContext
にネストされなくなったことを子に通知する必要があることを示すために使用されます。- 戻り値:
- 削除する前に存在したかどうか
-
containsAll
public boolean containsAll(Collection c) 指定したCollection
内のすべてのオブジェクトがこのBeanContext
の子であるかどうかをテストします。- 定義:
containsAll
、インタフェースCollection
- パラメータ:
c
- 指定されたCollection
- 戻り値:
- コレクション内のすべてのオブジェクトがこの
BeanContext
の子である場合はtrue
、そうでない場合はfalse。 - 関連項目:
-
addAll
public boolean addAll(Collection c) ChildrenのセットにCollectionを追加します(サポートされていない)。実装では、階層のロックおよび「子」のprotectedフィールドについて同期をとる必要があります。- 定義:
addAll
、インタフェースCollection
- パラメータ:
c
- このコレクションに追加される要素を含むコレクション- 戻り値:
- この実装では、無条件に
UnsupportedOperationException
がスローされます - 例外:
UnsupportedOperationException
- この実装によって無条件にスローされる- 関連項目:
-
removeAll
public boolean removeAll(Collection c) 指定されたすべての子を削除します(サポートされていない)。実装では、階層のロックおよび「子」のprotectedフィールドについて同期をとる必要があります。- 定義:
removeAll
、インタフェースCollection
- パラメータ:
c
- このコレクションから削除される要素を含むコレクション- 戻り値:
- この実装では、無条件に
UnsupportedOperationException
がスローされます - 例外:
UnsupportedOperationException
- この実装によって無条件にスローされる- 関連項目:
-
retainAll
public boolean retainAll(Collection c) 指定された子だけを保持します(サポートされていない)。実装では、階層のロックおよび「子」のprotectedフィールドについて同期をとる必要があります。- 定義:
retainAll
、インタフェースCollection
- パラメータ:
c
- このコレクションで保持される要素を含むコレクション- 戻り値:
- この実装では、無条件に
UnsupportedOperationException
がスローされます - 例外:
UnsupportedOperationException
- この実装によって無条件にスローされる- 関連項目:
-
clear
public void clear()子をクリアします(サポートされていない)。実装では、階層のロックおよび「子」のprotectedフィールドについて同期をとる必要があります。- 定義:
clear
、インタフェースCollection
- 例外:
UnsupportedOperationException
- この実装によって無条件にスローされる
-
addBeanContextMembershipListener
public void addBeanContextMembershipListener(BeanContextMembershipListener bcml) BeanContextMembershipListenerを追加します。- 定義:
addBeanContextMembershipListener
、インタフェースBeanContext
- パラメータ:
bcml
- 追加されるBeanContextMembershipListener- 例外:
NullPointerException
- 引数がnullの場合
-
removeBeanContextMembershipListener
public void removeBeanContextMembershipListener(BeanContextMembershipListener bcml) BeanContextMembershipListenerを削除します。- 定義:
removeBeanContextMembershipListener
、インタフェースBeanContext
- パラメータ:
bcml
- 削除するBeanContextMembershipListener- 例外:
NullPointerException
- 引数がnullの場合
-
getResourceAsStream
public InputStream getResourceAsStream(String name, BeanContextChild bcc) インタフェースからコピーされた説明:BeanContext
java.lang.ClassLoader.getResourceAsStream()
と同様に、このメソッドを使用すると、子Component
と基礎となるClassLoader
の間の動作をBeanContext
実装で置き換えることができます。- 定義:
getResourceAsStream
、インタフェースBeanContext
- パラメータ:
name
- リクエストされたリソースの名前。bcc
- リクエストを行う子オブジェクト。- 戻り値:
- InputStreamとして要求されたリソース
- 例外:
NullPointerException
- 引数がnullの場合
-
getResource
public URL getResource(String name, BeanContextChild bcc) インタフェースからコピーされた説明:BeanContext
java.lang.ClassLoader.getResource()
と同様に、このメソッドを使用すると、子Component
と基礎となるClassLoader
の間の動作をBeanContext
実装で置き換えることができます。- 定義:
getResource
、インタフェースBeanContext
- パラメータ:
name
- リクエストされたリソースの名前。bcc
- リクエストを行う子オブジェクト。- 戻り値:
- InputStreamとして要求されたリソース
-
setDesignTime
public void setDesignTime(boolean dTime) このBeanContext
の新しい設計時の値を設定します。- 定義:
setDesignTime
、インタフェースDesignMode
- パラメータ:
dTime
- 新規designTime値- 関連項目:
-
isDesignTime
public boolean isDesignTime()このオブジェクトが現在、設計時モードかどうかを報告します。- 定義:
isDesignTime
、インタフェースDesignMode
- 戻り値:
true
(設計時モードの場合)、false
(そうでない場合)
-
setLocale
public void setLocale(Locale newLocale) throws PropertyVetoException このBeanContextのロケールを設定します。- パラメータ:
newLocale
- 新規ロケール。 newLocaleがnull
の場合、このメソッド呼出しに効果はない。- 例外:
PropertyVetoException
- 新規ロケールが拒否された場合
-
getLocale
-
needsGui
public boolean needsGui()通常、このメソッドは実装側がGUIを必要としているかどうかを判断するために、環境から呼び出されます。
ここで使われているアルゴリズムはBeanContextPeerと、現在の子が自身をContainers、Componentsのどちらかを判断するのをテストします。Visibilityを実装している場合は、needsGui()== trueを返します。
- 定義:
needsGui
、インタフェースVisibility
- 戻り値:
- 実装者がGUIを必要とする場合、
true
-
dontUseGui
-
okToUseGui
-
avoidingGui
public boolean avoidingGui()BeanContext
の子がGUIを使用して回避しているかどうかを判断するために使用されます。- 定義:
avoidingGui
、インタフェースVisibility
- 戻り値:
- このインスタンスがGUIの使用を避けるか
- 関連項目:
-
isSerializing
public boolean isSerializing()このBeanContext
は直列化処理中ですか。- 戻り値:
- この
BeanContext
が現在直列化中の場合
-
bcsChildren
protected Iterator<BeanContextSupport.BCSChild> bcsChildren()このBeanContext
のすべての子イテレータを返します。- 戻り値:
- 現在のすべてのBCSChild値のイテレータ
-
bcsPreSerializationHook
protected void bcsPreSerializationHook(ObjectOutputStream oos) throws IOException defaultWriteObject()のあと、子を直列化する前のwriteObjectによって呼び出されます。 スーパー・クラスが子を直列化する前の状態をカスタム直列化するサブクラスを使って、このメソッドをオーバーライドできます。 しかし、このメソッドは、writeObject()(がある場合)の独自の実装を置換するサブクラスで使用することはできません。- パラメータ:
oos
- 直列化中に使用するObjectOutputStream
- 例外:
IOException
- 直列化に失敗した場合
-
bcsPreDeserializationHook
protected void bcsPreDeserializationHook(ObjectInputStream ois) throws IOException, ClassNotFoundException defaultReadObject()のあと、子を直列化する前のreadObjectによって呼び出されます。 スーパー・クラスが子を直列化する前の状態をカスタム直列化復元するサブクラスを使って、このメソッドをオーバーライドできます。 しかし、このメソッドは、readObject()(がある場合)独自の実装を置換するために、サブクラスで使用することはできません。- パラメータ:
ois
- 直列化復元中に使用するObjectInputStream
- 例外:
IOException
- 直列化復元が失敗した場合ClassNotFoundException
- 必要なクラスが見つからない場合
-
childDeserializedHook
protected void childDeserializedHook(Object child, BeanContextSupport.BCSChild bcsc) 新しく直列化復元された子およびBCSChildを使ってreadObjectによって呼び出されます。- パラメータ:
child
- 新たに直列化復元された子bcsc
- 新たに直列化復元されたBCSChild
-
serialize
protected final void serialize(ObjectOutputStream oos, Collection<?> coll) throws IOException コレクションを直列化するためにwriteObjectによって使用されます。- パラメータ:
oos
- 直列化中に使用するObjectOutputStream
coll
- 直列化するCollection
- 例外:
IOException
- 直列化に失敗した場合
-
deserialize
protected final void deserialize(ObjectInputStream ois, Collection coll) throws IOException, ClassNotFoundException コレクションを直列化復元するためにreadObjectによって使用されます。- パラメータ:
ois
- 使用するObjectInputStreamcoll
- コレクション- 例外:
IOException
- 直列化復元が失敗した場合ClassNotFoundException
- 必要なクラスが見つからない場合
-
writeChildren
public final void writeChildren(ObjectOutputStream oos) throws IOException このBeanContext
のすべての子を直列化するために使用されます。- パラメータ:
oos
- 直列化中に使用するObjectOutputStream
- 例外:
IOException
- 直列化に失敗した場合
-
readChildren
public final void readChildren(ObjectInputStream ois) throws IOException, ClassNotFoundException このクラスのインスタンスがBeanContextプロトコル(およびそのサブプロトコル)の実装の委譲として使用されるときには、直列化復元の際に「鶏が先か卵が先か」の問題が起こります。- パラメータ:
ois
- 使用するObjectInputStream- 例外:
IOException
- 直列化復元が失敗した場合ClassNotFoundException
- 必要なクラスが見つからない場合
-
vetoableChange
public void vetoableChange(PropertyChangeEvent pce) throws PropertyVetoException サブクラスは、子の拒否プロパティの変更を監視するために包括することがあります。- 定義:
vetoableChange
、インタフェースVetoableChangeListener
- パラメータ:
pce
- イベント・ソースと変更されたプロパティを記述したPropertyChangeEvent
オブジェクト。- 例外:
PropertyVetoException
- 受け取り側がプロパティ変更をロールバックすることを望んでいる場合。
-
propertyChange
public void propertyChange(PropertyChangeEvent pce) サブクラスは、子のプロパティの変更を監視するために包括することがあります。- 定義:
propertyChange
、インタフェースPropertyChangeListener
- パラメータ:
pce
- イベント・ソースと変更されたプロパティを記述したPropertyChangeEventオブジェクト。
-
validatePendingAdd
protected boolean validatePendingAdd(Object targetChild) このクラスのサブクラスはこのメソッドをオーバーライドまたは包括して、BeanContextに追加される直前に、BeanContextが子オブジェクトを調べるための検証動作を追加できます。
- パラメータ:
targetChild
- 代わりにChildを作成する子- 戻り値:
- 子がこのBeanContextに追加された場合はtrue、そうでない場合はfalse。
-
validatePendingRemove
protected boolean validatePendingRemove(Object targetChild) このクラスのサブクラスはこのメソッドをオーバーライドまたは包括して、BeanContextから削除される直前に、BeanContextが子オブジェクトを調べるための検証動作を追加できます。
- パラメータ:
targetChild
- 代わりにChildを作成する子- 戻り値:
- 子がこのBeanContextから削除される場合はtrue、そうでない場合はfalse。
-
childJustAddedHook
protected void childJustAddedHook(Object child, BeanContextSupport.BCSChild bcsc) サブクラスはこのメソッドをオーバーライドして、子が追加されて、イベント通知が発生する前に、簡単にadd()セマンティックスを拡張できます。 このメソッドは同期化されている子を使って呼び出されます。- パラメータ:
child
- 子bcsc
- BCSChild
-
childJustRemovedHook
protected void childJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc) サブクラスはこのメソッドをオーバーライドして、子が削除されて、イベント通知が発生する前に、簡単にremove()セマンティックスを拡張できます。 このメソッドは同期化されている子を使って呼び出されます。- パラメータ:
child
- 子bcsc
- BCSChild
-
getChildVisibility
protected static final Visibility getChildVisibility(Object child) 指定された子に関連したComponent (存在する場合)を取得します。- パラメータ:
child
- 指定された子- 戻り値:
- 指定された子に関連したComponent (存在する場合)。
-
getChildSerializable
protected static final Serializable getChildSerializable(Object child) 指定されたChildに関連したSerializable (存在する場合)を取得します。- パラメータ:
child
- 指定された子- 戻り値:
- 指定されたChildに関連したSerializable (存在する場合)
-
getChildPropertyChangeListener
protected static final PropertyChangeListener getChildPropertyChangeListener(Object child) 指定された子のPropertyChangeListener (存在する場合)を取得します。- パラメータ:
child
- 指定された子- 戻り値:
- 指定された子のPropertyChangeListener (存在する場合)
-
getChildVetoableChangeListener
protected static final VetoableChangeListener getChildVetoableChangeListener(Object child) 指定された子のVetoableChangeListener (存在する場合)を取得します。- パラメータ:
child
- 指定された子- 戻り値:
- 指定された子のVetoableChangeListener (存在する場合)
-
getChildBeanContextMembershipListener
protected static final BeanContextMembershipListener getChildBeanContextMembershipListener(Object child) 指定された子のBeanContextMembershipListener (存在する場合)を取得します。- パラメータ:
child
- 指定された子- 戻り値:
- 指定された子のBeanContextMembershipListener (存在する場合)
-
getChildBeanContextChild
protected static final BeanContextChild getChildBeanContextChild(Object child) 指定された子のBeanContextChild (存在する場合)を取得します。- パラメータ:
child
- 指定された子- 戻り値:
- 指定された子のBeanContextChild (存在する場合)
- 例外:
IllegalArgumentException
- 子がBeanContextChildおよびBeanContextProxyの両方を実装している場合
-
fireChildrenAdded
protected final void fireChildrenAdded(BeanContextMembershipEvent bcme) BeanContextMembershipListenerインタフェースでBeanContextMembershipEventを起動します。- パラメータ:
bcme
- トリガーするイベント
-
fireChildrenRemoved
protected final void fireChildrenRemoved(BeanContextMembershipEvent bcme) BeanContextMembershipListenerインタフェースでBeanContextMembershipEventを起動します。- パラメータ:
bcme
- トリガーするイベント
-
initialize
protected void initialize()BeanContextSupportインスタンスの過渡状態を初期化するために、コンストラクタおよびreadObjectから呼び出されるprotectedメソッドです。 このクラスは、このメソッドを使用して、子のPropertyChangeおよびVetoableChangeイベントのモニターに使用される内部クラス・リスナーをインスタンス化します。サブクラスは独自の初期化動作を追加するためにこのメソッドを包括できます。 -
copyChildren
-
classEquals
-