📄 binding.html
字号:
<!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Binding(java.lang.String, java.lang.Object)"><!-- --></A><H3>Binding</H3><PRE>public <B>Binding</B>(<A HREF="../../java/lang/String.html">String</A> name, <A HREF="../../java/lang/Object.html">Object</A> obj)</PRE><DL><DD>Constructs an instance of a Binding given its name and object. <p> <tt>getClassName()</tt> will return the class name of <tt>obj</tt> (or null if <tt>obj</tt> is null) unless the class name has been explicitly set using <tt>setClassName()</tt><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The non-null name of the object. It is relative to the <em>target context</em> (which is named by the first parameter of the <code>listBindings()</code> method)<DD><CODE>obj</CODE> - The possibly null object bound to name.<DT><B>See Also: </B><DD><A HREF="../../javax/naming/NameClassPair.html#setClassName(java.lang.String)"><CODE>NameClassPair.setClassName(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="Binding(java.lang.String, java.lang.Object, boolean)"><!-- --></A><H3>Binding</H3><PRE>public <B>Binding</B>(<A HREF="../../java/lang/String.html">String</A> name, <A HREF="../../java/lang/Object.html">Object</A> obj, boolean isRelative)</PRE><DL><DD>Constructs an instance of a Binding given its name, object, and whether the name is relative.<p> <tt>getClassName()</tt> will return the class name of <tt>obj</tt> (or null if <tt>obj</tt> is null) unless the class name has been explicitly set using <tt>setClassName()</tt><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The non-null string name of the object.<DD><CODE>obj</CODE> - The possibly null object bound to name.<DD><CODE>isRelative</CODE> - true if <code>name</code> is a name relative to the target context (which is named by the first parameter of the <code>listBindings()</code> method); false if <code>name</code> is a URL string.<DT><B>See Also: </B><DD><A HREF="../../javax/naming/NameClassPair.html#isRelative()"><CODE>NameClassPair.isRelative()</CODE></A>, <A HREF="../../javax/naming/NameClassPair.html#setRelative(boolean)"><CODE>NameClassPair.setRelative(boolean)</CODE></A>, <A HREF="../../javax/naming/NameClassPair.html#setClassName(java.lang.String)"><CODE>NameClassPair.setClassName(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="Binding(java.lang.String, java.lang.String, java.lang.Object)"><!-- --></A><H3>Binding</H3><PRE>public <B>Binding</B>(<A HREF="../../java/lang/String.html">String</A> name, <A HREF="../../java/lang/String.html">String</A> className, <A HREF="../../java/lang/Object.html">Object</A> obj)</PRE><DL><DD>Constructs an instance of a Binding given its name, class name, and object.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The non-null name of the object. It is relative to the <em>target context</em> (which is named by the first parameter of the <code>listBindings()</code> method)<DD><CODE>className</CODE> - The possibly null class name of the object bound to <tt>name</tt>. If null, the class name of <tt>obj</tt> is returned by <tt>getClassName()</tt>. If <tt>obj</tt> is also null, <tt>getClassName()</tt> will return null.<DD><CODE>obj</CODE> - The possibly null object bound to name.<DT><B>See Also: </B><DD><A HREF="../../javax/naming/NameClassPair.html#setClassName(java.lang.String)"><CODE>NameClassPair.setClassName(java.lang.String)</CODE></A></DL></DD></DL><HR><A NAME="Binding(java.lang.String, java.lang.String, java.lang.Object, boolean)"><!-- --></A><H3>Binding</H3><PRE>public <B>Binding</B>(<A HREF="../../java/lang/String.html">String</A> name, <A HREF="../../java/lang/String.html">String</A> className, <A HREF="../../java/lang/Object.html">Object</A> obj, boolean isRelative)</PRE><DL><DD>Constructs an instance of a Binding given its name, class name, object, and whether the name is relative.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The non-null string name of the object.<DD><CODE>className</CODE> - The possibly null class name of the object bound to <tt>name</tt>. If null, the class name of <tt>obj</tt> is returned by <tt>getClassName()</tt>. If <tt>obj</tt> is also null, <tt>getClassName()</tt> will return null.<DD><CODE>obj</CODE> - The possibly null object bound to name.<DD><CODE>isRelative</CODE> - true if <code>name</code> is a name relative to the target context (which is named by the first parameter of the <code>listBindings()</code> method); false if <code>name</code> is a URL string.<DT><B>See Also: </B><DD><A HREF="../../javax/naming/NameClassPair.html#isRelative()"><CODE>NameClassPair.isRelative()</CODE></A>, <A HREF="../../javax/naming/NameClassPair.html#setRelative(boolean)"><CODE>NameClassPair.setRelative(boolean)</CODE></A>, <A HREF="../../javax/naming/NameClassPair.html#setClassName(java.lang.String)"><CODE>NameClassPair.setClassName(java.lang.String)</CODE></A></DL></DD></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="getClassName()"><!-- --></A><H3>getClassName</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>getClassName</B>()</PRE><DL><DD>Retrieves the class name of the object bound to the name of this binding. If the class name has been set explicitly, return it. Otherwise, if this binding contains a non-null object, that object's class name is used. Otherwise, null is returned.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../javax/naming/NameClassPair.html#getClassName()">getClassName</A></CODE> in class <CODE><A HREF="../../javax/naming/NameClassPair.html">NameClassPair</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>A possibly null string containing class name of object bound.</DL></DD></DL><HR><A NAME="getObject()"><!-- --></A><H3>getObject</H3><PRE>public <A HREF="../../java/lang/Object.html">Object</A> <B>getObject</B>()</PRE><DL><DD>Retrieves the object bound to the name of this binding.<DD><DL><DT><B>Returns:</B><DD>The object bound; null if this binding does not contain an object.<DT><B>See Also: </B><DD><A HREF="../../javax/naming/Binding.html#setObject(java.lang.Object)"><CODE>setObject(java.lang.Object)</CODE></A></DL></DD></DL><HR><A NAME="setObject(java.lang.Object)"><!-- --></A><H3>setObject</H3><PRE>public void <B>setObject</B>(<A HREF="../../java/lang/Object.html">Object</A> obj)</PRE><DL><DD>Sets the object associated with this binding.<DD><DL><DT><B>Parameters:</B><DD><CODE>obj</CODE> - The possibly null object to use.<DT><B>See Also: </B><DD><A HREF="../../javax/naming/Binding.html#getObject()"><CODE>getObject()</CODE></A></DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>toString</B>()</PRE><DL><DD>Generates the string representation of this binding. The string representation consists of the string representation of the name/class pair and the string representation of this binding's object, separated by ':'. The contents of this string is useful for debugging and is not meant to be interpreted programmatically.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../javax/naming/NameClassPair.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../javax/naming/NameClassPair.html">NameClassPair</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>The non-null string representation of this binding.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Binding.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../javax/naming/BinaryRefAddr.html"><B>PREV CLASS</B></A> <A HREF="../../javax/naming/CompositeName.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Binding.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -