📄 beancontextsupport.html
字号:
is assigned to the <tt>BeanContext</tt> instance.<DT><B>See Also: </B><DD><A HREF="../../../java/util/Locale.html#getDefault()"><CODE>Locale.getDefault()</CODE></A>, <A HREF="../../../java/util/Locale.html#setDefault(java.util.Locale)"><CODE>Locale.setDefault(java.util.Locale)</CODE></A></DL></DD></DL><HR><A NAME="BeanContextSupport(java.beans.beancontext.BeanContext)"><!-- --></A><H3>BeanContextSupport</H3><PRE>public <B>BeanContextSupport</B>(<A HREF="../../../java/beans/beancontext/BeanContext.html">BeanContext</A> peer)</PRE><DL><DD>Create an instance using with a default locale<DD><DL><DT><B>Parameters:</B><DD><CODE>peer</CODE> - The peer <tt>BeanContext</tt> we are supplying an implementation for, or <tt>null</tt> if this object is its own peer</DL></DD></DL><HR><A NAME="BeanContextSupport()"><!-- --></A><H3>BeanContextSupport</H3><PRE>public <B>BeanContextSupport</B>()</PRE><DL><DD>Create an instance that is not a delegate of another object</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getBeanContextPeer()"><!-- --></A><H3>getBeanContextPeer</H3><PRE>public <A HREF="../../../java/beans/beancontext/BeanContext.html">BeanContext</A> <B>getBeanContextPeer</B>()</PRE><DL><DD>Gets the instance of <tt>BeanContext</tt> that this object is providing the implementation for.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the BeanContext instance</DL></DD></DL><HR><A NAME="instantiateChild(java.lang.String)"><!-- --></A><H3>instantiateChild</H3><PRE>public <A HREF="../../../java/lang/Object.html">Object</A> <B>instantiateChild</B>(<A HREF="../../../java/lang/String.html">String</A> beanName) throws <A HREF="../../../java/io/IOException.html">IOException</A>, <A HREF="../../../java/lang/ClassNotFoundException.html">ClassNotFoundException</A></PRE><DL><DD><p> The instantiateChild method is a convenience hook in BeanContext to simplify the task of instantiating a Bean, nested, into a <tt>BeanContext</tt>. </p> <p> The semantics of the beanName parameter are defined by java.beans.Beans.instantate. </p><DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/beans/beancontext/BeanContext.html#instantiateChild(java.lang.String)">instantiateChild</A></CODE> in interface <CODE><A HREF="../../../java/beans/beancontext/BeanContext.html">BeanContext</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>beanName</CODE> - the name of the Bean to instantiate within this BeanContext<DT><B>Returns:</B><DD>the new object<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/io/IOException.html">IOException</A></CODE> - if there is an I/O error when the bean is being deserialized<DD><CODE><A HREF="../../../java/lang/ClassNotFoundException.html">ClassNotFoundException</A></CODE> - if the class identified by the beanName parameter is not found</DL></DD></DL><HR><A NAME="size()"><!-- --></A><H3>size</H3><PRE>public int <B>size</B>()</PRE><DL><DD>Gets the number of children currently nested in this BeanContext.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/util/Collection.html#size()">size</A></CODE> in interface <CODE><A HREF="../../../java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>number of children</DL></DD></DL><HR><A NAME="isEmpty()"><!-- --></A><H3>isEmpty</H3><PRE>public boolean <B>isEmpty</B>()</PRE><DL><DD>Reports whether or not this <tt>BeanContext</tt> is empty. A <tt>BeanContext</tt> is considered empty when it contains zero nested children.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/util/Collection.html#isEmpty()">isEmpty</A></CODE> in interface <CODE><A HREF="../../../java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>if there are not children</DL></DD></DL><HR><A NAME="contains(java.lang.Object)"><!-- --></A><H3>contains</H3><PRE>public boolean <B>contains</B>(<A HREF="../../../java/lang/Object.html">Object</A> o)</PRE><DL><DD>Determines whether or not the specified object is currently a child of this <tt>BeanContext</tt>.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/util/Collection.html#contains(java.lang.Object)">contains</A></CODE> in interface <CODE><A HREF="../../../java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>o</CODE> - the Object in question<DT><B>Returns:</B><DD>if this object is a child</DL></DD></DL><HR><A NAME="containsKey(java.lang.Object)"><!-- --></A><H3>containsKey</H3><PRE>public boolean <B>containsKey</B>(<A HREF="../../../java/lang/Object.html">Object</A> o)</PRE><DL><DD>Determines whether or not the specified object is currently a child of this <tt>BeanContext</tt>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>o</CODE> - the Object in question<DT><B>Returns:</B><DD>if this object is a child</DL></DD></DL><HR><A NAME="iterator()"><!-- --></A><H3>iterator</H3><PRE>public <A HREF="../../../java/util/Iterator.html">Iterator</A> <B>iterator</B>()</PRE><DL><DD>Gets all JavaBean or <tt>BeanContext</tt> instances currently nested in this <tt>BeanContext</tt>.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/util/Collection.html#iterator()">iterator</A></CODE> in interface <CODE><A HREF="../../../java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an <tt>Iterator</tt> of the nested children</DL></DD></DL><HR><A NAME="toArray()"><!-- --></A><H3>toArray</H3><PRE>public <A HREF="../../../java/lang/Object.html">Object</A>[] <B>toArray</B>()</PRE><DL><DD>Gets all JavaBean or <tt>BeanContext</tt> instances currently nested in this BeanContext.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/util/Collection.html#toArray()">toArray</A></CODE> in interface <CODE><A HREF="../../../java/util/Collection.html">Collection</A></CODE></DL></DD><DD>Following copied from interface: <CODE>java.util.Collection</CODE></DD><DD><DL><DT><B>Returns:</B><DD>an array containing all of the elements in this collection</DL></DD></DL><HR><A NAME="toArray(java.lang.Object[])"><!-- --></A><H3>toArray</H3><PRE>public <A HREF="../../../java/lang/Object.html">Object</A>[] <B>toArray</B>(<A HREF="../../../java/lang/Object.html">Object</A>[] arry)</PRE><DL><DD>Gets an array containing all children of this <tt>BeanContext</tt> that match the types contained in arry.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/util/Collection.html#toArray(java.lang.Object[])">toArray</A></CODE> in interface <CODE><A HREF="../../../java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>arry</CODE> - The array of object types that are of interest.<DT><B>Returns:</B><DD>an array of children</DL></DD></DL><HR><A NAME="createBCSChild(java.lang.Object, java.lang.Object)"><!-- --></A><H3>createBCSChild</H3><PRE>protected <A HREF="../../../java/beans/beancontext/BeanContextSupport.BCSChild.html">BeanContextSupport.BCSChild</A> <B>createBCSChild</B>(<A HREF="../../../java/lang/Object.html">Object</A> targetChild, <A HREF="../../../java/lang/Object.html">Object</A> peer)</PRE><DL><DD><p> 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. </p><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>targetChild</CODE> - the child to create the Child on behalf of<DD><CODE>peer</CODE> - the peer if the tragetChild and the peer are related by an implementation of BeanContextProxy</DL></DD></DL><HR><A NAME="add(java.lang.Object)"><!-- --></A><H3>add</H3><PRE>public boolean <B>add</B>(<A HREF="../../../java/lang/Object.html">Object</A> targetChild)</PRE><DL><DD>Adds/nests a child within this <tt>BeanContext</tt>. <p> Invoked as a side effect of java.beans.Beans.instantiate(). </p><DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/util/Collection.html#add(java.lang.Object)">add</A></CODE> in interface <CODE><A HREF="../../../java/util/Collection.html">Collection</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>targetChild</CODE> - The child objects to nest within this <tt>BeanContext</tt><DT><B>Returns:</B><DD>true if the child was added successfully.</DL></DD></DL><HR><A NAME="remove(java.lang.Object)"><!-- --></A><H3>remove</H3><PRE>pub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -