⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 any.html

📁 API資料大全
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:43:03 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class  Any</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Any.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../org/omg/CORBA/_PolicyStub.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../org/omg/CORBA/AnyHolder.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>  &nbsp;&nbsp;<A HREF="Any.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.omg.CORBA</FONT><BR>Class  Any</H2><PRE><A HREF="../../../java/lang/Object.html">java.lang.Object</A>  |  +--<B>org.omg.CORBA.Any</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../org/omg/CORBA/portable/IDLEntity.html">IDLEntity</A>, <A HREF="../../../java/io/Serializable.html">Serializable</A></DD></DL><HR><DL><DT>public abstract class <B>Any</B><DT>extends <A HREF="../../../java/lang/Object.html">Object</A><DT>implements <A HREF="../../../org/omg/CORBA/portable/IDLEntity.html">IDLEntity</A></DL><P>Serves as a container for any data that can be described in IDL or for any IDL primitive type. An <code>Any</code> object is used as a component of a <code>NamedValue</code> object, which provides information about arguments or return values in requests, and which is used to define name/value pairs in <code>Context</code> objects.<p> An <code>Any</code> object consists of two parts: <OL> <LI>a data value <LI>a <code>TypeCode</code> object describing the type of the data value contained in the <code>Any</code> object.  For example, a <code>TypeCode</code> object for an array contains a field for the length of the array and a field for the type of elements in the array. (Note that in	this case, the second field of the <code>TypeCode</code> object is itself a <code>TypeCode</code> object.) </OL> <P> <a name="anyOps"</a> A large part of the <code>Any</code> class consists of pairs of methods for inserting values into and extracting values from an <code>Any</code> object. <P> For a given primitive type X, these methods are:  <dl>	<dt><code><bold> void insert_X(X x)</bold></code>	<dd> This method allows the insertion of	  an instance <code>x</code> of primitive type <code>X</code>    into the <code>value</code> field of the <code>Any</code> object.    Note that the method    <code>insert_X</code> also resets the <code>Any</code> object's    <code>type</code> field if necessary.	<dt> <code><bold>X extract_X()</bold></code>	<dd> This method allows the extraction of an instance of	  type <code>X</code> from the <code>Any</code> object.    <BR>    <P>    This method throws the exception <code>BAD_OPERATION</code> under two conditions:    <OL>     <LI> the type of the element contained in the <code>Any</code> object is not	   <code>X</code>     <LI> the method <code>extract_X</code> is called before     the <code>value</code> field of the <code>Any</code> object     has been set    </OL> </dl> <P> There are distinct method pairs for each primitive IDL data type (<code>insert_long</code> and <code>extract_long</code>, <code>insert_string</code> and <code>extract_string</code>, and so on).<BR> <P> The class <code>Any</code> also has methods for getting and setting the type code, for testing two <code>Any</code> objects for equality, and for reading an <code>Any</code> object from a stream or writing it to a stream. <BR><P><DL><DT><B>Since: </B><DD>JDK1.2</DD><DT><B>See Also: </B><DD><A HREF="../../../serialized-form.html#org.omg.CORBA.Any">Serialized Form</A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../org/omg/CORBA/Any.html#Any()">Any</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="../../../org/omg/CORBA/portable/InputStream.html">InputStream</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Any.html#create_input_stream()">create_input_stream</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an input stream from which this <code>Any</code> object's value can be unmarshalled.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="../../../org/omg/CORBA/portable/OutputStream.html">OutputStream</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Any.html#create_output_stream()">create_output_stream</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an output stream into which this <code>Any</code> object's value can be marshalled.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Any.html#equal(org.omg.CORBA.Any)">equal</A></B>(<A HREF="../../../org/omg/CORBA/Any.html">Any</A>&nbsp;a)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks for equality between this <code>Any</code> object and the given <code>Any</code> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="../../../org/omg/CORBA/Any.html">Any</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Any.html#extract_any()">extract_any</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extracts the <code>Any</code> object in this <code>Any</code> object's <code>value</code> field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Any.html#extract_boolean()">extract_boolean</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extracts the <code>boolean</code> in this <code>Any</code> object's <code>value</code> field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;char</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Any.html#extract_char()">extract_char</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extracts the <code>char</code> in this <code>Any</code> object's <code>value</code> field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Any.html#extract_double()">extract_double</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extracts the <code>double</code> in this <code>Any</code> object's <code>value</code> field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../java/math/BigDecimal.html">BigDecimal</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Any.html#extract_fixed()">extract_fixed</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extracts the <code>java.math.BigDecimal</code> object in this <code>Any</code> object's <code>value</code> field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Any.html#extract_float()">extract_float</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extracts the <code>float</code> in this <code>Any</code> object's <code>value</code> field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Any.html#extract_long()">extract_long</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extracts the <code>int</code> in this <code>Any</code> object's <code>value</code> field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Any.html#extract_longlong()">extract_longlong</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extracts the <code>long</code> in this <code>Any</code> object's <code>value</code> field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="../../../org/omg/CORBA/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Any.html#extract_Object()">extract_Object</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extracts the <code>org.omg.CORBA.Object</code> in this <code>Any</code> object's <code>value</code> field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Any.html#extract_octet()">extract_octet</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extracts the <code>byte</code> in this <code>Any</code> object's <code>value</code> field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="../../../org/omg/CORBA/Principal.html">Principal</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Any.html#extract_Principal()">extract_Principal</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>Deprecated by CORBA 2.2.</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;short</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/omg/CORBA/Any.html#extract_short()">extract_short</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extracts the <code>short</code> in this <code>Any</code> object's <code>value</code> field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -