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

📄 descriptorsupport.html

📁 j2ee api,很好的api。我这现在有
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets all Fields in the list to the new value in with the same index in the fieldValue array.  </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/modelmbean/DescriptorSupport.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <pv>a human readable string representing the descriptor</pv>.       </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/management/modelmbean/DescriptorSupport.html#toXMLString()">toXMLString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an XML String representing the descriptor.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="DescriptorSupport()"><!-- --></A><H3>DescriptorSupport</H3><PRE>public <B>DescriptorSupport</B>()</PRE><DL><DD>Descriptor default constructor.  Default initial descriptor size is 20.  It will grow as needed.<br> Note that the created empty descriptor is not a valid descriptor (the method <A HREF="../../../javax/management/modelmbean/DescriptorSupport.html#isValid()"><CODE>isValid</CODE></A> returns <CODE>false</CODE>)<P></DL><HR><A NAME="DescriptorSupport(int)"><!-- --></A><H3>DescriptorSupport</H3><PRE>public <B>DescriptorSupport</B>(int&nbsp;initNumFields)                  throws <A HREF="../../../javax/management/MBeanException.html" title="class in javax.management">MBeanException</A>,                         <A HREF="../../../javax/management/RuntimeOperationsException.html" title="class in javax.management">RuntimeOperationsException</A></PRE><DL><DD>Descriptor constructor. Takes as parameter the initial capacity of the Map that stores the descriptor fields.  Capacity will grow as needed.<br> Note that the created empty descriptor is not a valid descriptor (the method <A HREF="../../../javax/management/modelmbean/DescriptorSupport.html#isValid()"><CODE>isValid</CODE></A> returns <CODE>false</CODE>)<P><DT><B>Parameters:</B><DD><CODE>initNumFields</CODE> - The initial capacity of the Map that stores the descriptor fields.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/RuntimeOperationsException.html" title="class in javax.management">RuntimeOperationsException</A></CODE> - for illegal value for initNumFields ( <= 0)<DD><CODE><A HREF="../../../javax/management/MBeanException.html" title="class in javax.management">MBeanException</A></CODE> - Wraps a distributed communication Exception.</DL><HR><A NAME="DescriptorSupport(javax.management.modelmbean.DescriptorSupport)"><!-- --></A><H3>DescriptorSupport</H3><PRE>public <B>DescriptorSupport</B>(<A HREF="../../../javax/management/modelmbean/DescriptorSupport.html" title="class in javax.management.modelmbean">DescriptorSupport</A>&nbsp;inDescr)</PRE><DL><DD>Descriptor constructor taking a Descriptor as parameter. Creates a new descriptor initialized to the values of the descriptor passed in parameter.<P><DT><B>Parameters:</B><DD><CODE>inDescr</CODE> - the descriptor to be used to initialize the constructed descriptor. If it is  null or contains no descriptor fields, an empty Descriptor will be created.</DL><HR><A NAME="DescriptorSupport(java.lang.String)"><!-- --></A><H3>DescriptorSupport</H3><PRE>public <B>DescriptorSupport</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;inStr)                  throws <A HREF="../../../javax/management/MBeanException.html" title="class in javax.management">MBeanException</A>,                         <A HREF="../../../javax/management/RuntimeOperationsException.html" title="class in javax.management">RuntimeOperationsException</A>,                         <A HREF="../../../javax/management/modelmbean/XMLParseException.html" title="class in javax.management.modelmbean">XMLParseException</A></PRE><DL><DD><p>Descriptor constructor taking an XML String.</p> <p>The format of the XML string is not defined, but an implementation must ensure that the string returned by <A HREF="../../../javax/management/modelmbean/DescriptorSupport.html#toXMLString()"><CODE>toXMLString()</CODE></A> on an existing descriptor can be used to instantiate an equivalent descriptor using this constructor.</p> <p>In this implementation, all field values will be created as Strings.  If the field values are not Strings, the programmer will have to reset or convert these fields correctly.</p><P><DT><B>Parameters:</B><DD><CODE>inStr</CODE> - An XML-formatted string used to populate this Descriptor.  The format is not defined, but any implementation must ensure that the string returned by method <A HREF="../../../javax/management/modelmbean/DescriptorSupport.html#toXMLString()"><CODE>toXMLString</CODE></A> on an existing descriptor can be used to instantiate an equivalent descriptor when instantiated using this constructor.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/RuntimeOperationsException.html" title="class in javax.management">RuntimeOperationsException</A></CODE> - If the String inStr passed in parameter is null<DD><CODE><A HREF="../../../javax/management/modelmbean/XMLParseException.html" title="class in javax.management.modelmbean">XMLParseException</A></CODE> - XML parsing problem while parsing the input String<DD><CODE><A HREF="../../../javax/management/MBeanException.html" title="class in javax.management">MBeanException</A></CODE> - Wraps a distributed communication Exception.</DL><HR><A NAME="DescriptorSupport(java.lang.String[], java.lang.Object[])"><!-- --></A><H3>DescriptorSupport</H3><PRE>public <B>DescriptorSupport</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]&nbsp;fieldNames,                         <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>[]&nbsp;fieldValues)                  throws <A HREF="../../../javax/management/RuntimeOperationsException.html" title="class in javax.management">RuntimeOperationsException</A></PRE><DL><DD>Constructor taking field names and field values.  The array and array elements cannot be null.<P><DT><B>Parameters:</B><DD><CODE>fieldNames</CODE> - String array of field names.  No elements of this array can be null.<DD><CODE>fieldValues</CODE> - Object array of the corresponding field values.                   Elements of the array can be null. The fieldValue must be valid for the fieldName (as defined in method <A HREF="../../../javax/management/modelmbean/DescriptorSupport.html#isValid()"><CODE>isValid</CODE></A>)   Note: array sizes of parameters should match. If both arrays are null or empty, then an empty descriptor is created.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/RuntimeOperationsException.html" title="class in javax.management">RuntimeOperationsException</A></CODE> - for illegal value for field Names or field Values.              The array lengths must be equal.               If the descriptor construction fails for any reason, this exception will be thrown.</DL><HR><A NAME="DescriptorSupport(java.lang.String[])"><!-- --></A><H3>DescriptorSupport</H3><PRE>public <B>DescriptorSupport</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]&nbsp;fields)</PRE><DL><DD>Constructor taking fields in the <i>fieldName=fieldValue</i> format.<P><DT><B>Parameters:</B><DD><CODE>fields</CODE> - String array of with each element containing a field name and value. If this array is null or empty, then the default constructor will be executed. Null strings or empty strings will be ignored.   All fields values should be Strings.  If the field values are not Strings, the programmer will have to reset or convert these fields correctly. Note: Each string should be of the form <i>fieldName=fieldValue</i>.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/RuntimeOperationsException.html" title="class in javax.management">RuntimeOperationsException</A></CODE> - for illegal value for field Names or field Values.              The field must contain an "=". "=fieldValue", "fieldName", and "fieldValue" are illegal.              FieldName cannot be null.  "fieldName=" will cause the value to be null.                 If the descriptor construction fails for any reason, this exception will be thrown.</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getFieldValue(java.lang.String)"><!-- --></A><H3>getFieldValue</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>getFieldValue</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;inFieldName)                     throws <A HREF="../../../javax/management/RuntimeOperationsException.html" title="class in javax.management">RuntimeOperationsException</A></PRE><DL><DD>Returns the value for a specific fieldname.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/Descriptor.html#getFieldValue(java.lang.String)">getFieldValue</A></CODE> in interface <CODE><A HREF="../../../javax/management/Descriptor.html" title="interface in javax.management">Descriptor</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>inFieldName</CODE> - The field name in question; if not found, null is returned.<DT><B>Returns:</B><DD>An Object representing the field value<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/RuntimeOperationsException.html" title="class in javax.management">RuntimeOperationsException</A></CODE> - for illegal value (null or empty string) for field Names.</DL></DD></DL><HR><A NAME="setField(java.lang.String, java.lang.Object)"><!-- --></A><H3>setField</H3><PRE>public void <B>setField</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;inFieldName,                     <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;fieldValue)              throws <A HREF="../../../javax/management/RuntimeOperationsException.html" title="class in javax.management">RuntimeOperationsException</A></PRE><DL><DD>Sets the string value for a specific fieldname. The value must be valid for the field (as defined in method <A HREF="../../../javax/management/modelmbean/DescriptorSupport.html#isValid()"><CODE>isValid</CODE></A>).  If the field does not exist, it is added at the end of the Descriptor.  If it does exist, the value is replaced.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/Descriptor.html#setField(java.lang.String, java.lang.Object)">setField</A></CODE> in interface <CODE><A HREF="../../../javax/management/Descriptor.html" title="interface in javax.management">Descriptor</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>inFieldName</CODE> - The field name to be set. Must not be null or empty string.<DD><CODE>fieldValue</CODE> - The field value to be set for the field name. Can be null.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/management/RuntimeOperationsException.html" title="class in javax.management">RuntimeOperationsException</A></CODE> - for illegal value for field Names.</DL></DD></DL><HR><A NAME="getFields()"><!-- --></A><H3>getFields</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>getFields</B>()</PRE><DL><DD>Returns all the fields in the descriptor. The order is not the order in which the fields were set.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/Descriptor.html#getFields()">getFields</A></CODE> in interface <CODE><A HREF="../../../javax/management/Descriptor.html" title="interface in javax.management">Descriptor</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>String array of fields in the format <i>fieldName=fieldValue</i>. If there are no fields in the descriptor, then an empty String array is returned. If a fieldValue is not a String then the toString() method is called on it and its returned value is used as the value for the field enclosed in parenthesis.<DT><B>See Also:</B><DD><A HREF="../../../javax/management/modelmbean/DescriptorSupport.html#setFields(java.lang.String[], java.lang.Object[])"><CODE>setFields(java.lang.String[], java.lang.Object[])</CODE></A></DL></DD></DL><HR><A NAME="getFieldNames()"><!-- --></A><H3>getFieldNames</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>getFieldNames</B>()</PRE><DL><DD>Returns all the fields names in the descriptor. The order is not the order in which the fields were set.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../javax/management/Descriptor.html#getFieldNames()">getFieldNames</A></CODE> in interface <CODE><A HREF="../../../javax/management/Descriptor.html" title="interface in javax.management">Descriptor</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>String array of fields names. If the descriptor is empty, you will get          an empty array.</DL>

⌨️ 快捷键说明

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