| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!-- saved from url=(0014)about:internet --><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><link rel="stylesheet" href="../../style.css" type="text/css" media="screen"><link rel="stylesheet" href="../../print.css" type="text/css" media="print"><link rel="stylesheet" href="../../override.css" type="text/css"><meta name="keywords" content="RPCObjectUtil,mx.utils.RPCObjectUtil,addEventListener,addEventListener,adjustBrightness,adjustBrightness2,arrayValuesMatch,arraysMatch,callProperty,callProperty,clone,compare,computeDigest,convertHSBtoRGB,convertRGBtoHSB,copy,createUID,createUID,createUniqueName,createXMLDocument,dateCompare,decode,deleteProperty,deleteProperty,dispatchEvent,dispatchEvent,displayObjectToString,drawRoundRectComplex,drawRoundRectComplex2,encode,encodeBytes,encodeUTFBytes,externalToString,find,fromByteArray,fromByteArray,getArrayValues,getAttributeByQName,getClassInfo,getClassInfo,getComplexProperty,getEnumerableProperties,getFirstItem,getFullURL,getInstance,getItemIndex,getPlatforms,getPort,getProperty,getProperty,getProtocol,getServerName,getServerNameWithPort,getUID,getUnqualifiedClassName,getValue,hasEventListener,hasEventListener,hasMetadata,hasMutualTrustBetweenParentAndChild,hasProperty,hasTokens,hasUnresolvableTokens,init,init,init,insertAfter,insertBefore,isDynamicObject,isHttpURL,isHttpsURL,isSimple,isUID,isUID,isWhitespace,isWhitespace,nextName,nextNameIndex,nextValue,normalizeURL,numericCompare,objectToString,pop,propertyChangeHandler,push,qnameToString,qnamesEqual,readExternal,registerClassAliases,remove,removeEventListener,removeEventListener,repeat,replacePort,replaceProtocol,replaceTokens,reset,reset,restrict,rgbMultiply,setProperty,setProperty,setToStringExcludes,setValue,setupPropertyList,shift,stringCompare,stringToObject,substitute,substitute,toArray,toArrayInt,toArrayObject,toByteArray,toByteArray,toByteArray,toString,toString,toString,trim,trim,trimArrayElements,trimArrayElements,unshift,unwatchXML,urisEqual,valuesAreSubsetOfObject,walkDisplayObjects,watchXML,willTrigger,willTrigger,writeExternal"><title>mx.utils.RPCObjectUtil</title></head><body><script language="javascript" type="text/javascript" src="../../asdoc.js"></script><script language="javascript" type="text/javascript" src="../../help.js"></script><script language="javascript" type="text/javascript" src="../../cookies.js"></script><script language="javascript" type="text/javascript"><!-- |
| asdocTitle = 'RPCObjectUtil - ApacheFlex API Reference'; |
| var baseRef = '../../'; |
| window.onload = configPage; |
| --></script> |
| <script type="text/javascript"> |
| scrollToNameAnchor(); |
| </script><table class="titleTable" cellpadding="0" cellspacing="0" id="titleTable" style="display:none"><tr><td class="titleTableTitle" align="left">Apache Flex 4.16.1 API Reference </td><td class="titleTableTopNav" align="right"><a href="../../package-summary.html" onclick="loadClassListFrame('../../all-classes.html')">All Packages</a> | <a href="../../class-summary.html" onclick="loadClassListFrame('../../all-classes.html')">All Classes</a> | <a href="../../all-index-A.html" onclick="loadClassListFrame('../../index-list.html')">Index</a> | <a id="framesLink1" href="../../index.html?mx/utils/RPCObjectUtil.html&mx/utils/class-list.html">Frames</a><a id="noFramesLink1" style="display:none" href="" onclick="parent.location=document.location"> No Frames </a></td><td class="titleTableLogo" align="right" rowspan="3"><img src="../../images/logo.jpg" class="logoImage" alt="AdobeLogo" title="AdobeLogo"></td></tr><tr class="titleTableRow2"><td class="titleTableSubTitle" id="subTitle" align="left">RPCObjectUtil</td><td class="titleTableSubNav" id="subNav" align="right"><a href="#methodSummary">Methods</a></td></tr><tr class="titleTableRow3"><td colspan="3"> </td></tr></table><script language="javascript" type="text/javascript" xml:space="preserve"> |
| <!-- |
| |
| if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("RPCObjectUtil"); titleBar_setSubNav(false,false,false,false,false,false,false,false,true,false,false ,false,false,false,false,false);} |
| --> |
| </script><div xmlns:fn="http://www.w3.org/2005/xpath-functions" class="MainContent"><table class="classHeaderTable" cellpadding="0" cellspacing="0"><tr><td class="classHeaderTableLabel">Package</td><td><a href="package-detail.html" onclick="javascript:loadClassListFrame('class-list.html')">mx.utils</a></td></tr><tr><td class="classHeaderTableLabel">Class</td><td class="classSignature">public class RPCObjectUtil</td></tr><tr><td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">RPCObjectUtil <img src="../../images/inherit-arrow.gif" title="Inheritance" alt="Inheritance" class="inheritArrow"> Object</td></tr></table><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p></p><p></p> |
| The RPCObjectUtil class is a subset of ObjectUtil, removing methods |
| that create dependency issues when RPC messages are in a bootstrap loader. |
| |
| <p></p><br/><hr></div><a name="methodSummary"></a><div class="summarySection"><div class="summaryTableTitle">Public Methods </div><table cellspacing="0" cellpadding="3" class="summaryTable " id="summaryTableMethod"><tr><th> </th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined By</th></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#externalToString()" class="signatureLink">externalToString</a>(value:Function):void</div><div class="summaryTableDescription">[static] |
| Assign an static external toString method rather than use the internal one.</div></td><td class="summaryTableOwnerCol">RPCObjectUtil</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#getClassInfo()" class="signatureLink">getClassInfo</a>(obj:Object, excludes:Array = null, options:Object = null):Object</div><div class="summaryTableDescription">[static] |
| Returns information about the class, and properties of the class, for |
| the specified Object.</div></td><td class="summaryTableOwnerCol">RPCObjectUtil</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#setToStringExcludes()" class="signatureLink">setToStringExcludes</a>(excludes:Array):void</div><div class="summaryTableDescription">[static] |
| Change deault set of strings to exclude.</div></td><td class="summaryTableOwnerCol">RPCObjectUtil</td></tr><tr class=""><td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><div class="summarySignature"><a href="#toString()" class="signatureLink">toString</a>(value:Object, namespaceURIs:Array = null, exclude:Array = null):String</div><div class="summaryTableDescription">[static] |
| Pretty-prints the specified Object into a String.</div></td><td class="summaryTableOwnerCol">RPCObjectUtil</td></tr></table></div><script language="javascript" type="text/javascript"><!-- |
| showHideInherited(); |
| --></script><div class="MainContent"><a name="methodDetail"></a><div class="detailSectionHeader">Method Detail</div><a name="externalToString()"></a><a name="externalToString(Function)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">externalToString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td></tr></table><div class="detailBody"><code> public static function externalToString(value:Function):void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>ApacheFlex 4.10</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| Assign an static external toString method rather than use the internal one. |
| |
| <p>The function passed in needs to have the same signature as toString. |
| <code> |
| public static function externalToString(value:Object, |
| namespaceURIs:Array = null, |
| exclude:Array = null):String |
| </code></p> |
| |
| </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">value</span>:Function</code> — The function to call instead of internalToString. |
| |
| </td></tr></table></p></div><a name="getClassInfo()"></a><a name="getClassInfo(Object,Array,Object)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">getClassInfo</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code> public static function getClassInfo(obj:Object, excludes:Array = null, options:Object = null):Object</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| Returns information about the class, and properties of the class, for |
| the specified Object. |
| </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">obj</span>:Object</code> — The Object to inspect. |
| </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">excludes</span>:Array</code> (default = <code>null</code>)<code></code> — Array of Strings specifying the property names that should be |
| excluded from the returned result. For example, you could specify |
| <code>["currentTarget", "target"]</code> for an Event object since these properties |
| can cause the returned result to become large. |
| </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">options</span>:Object</code> (default = <code>null</code>)<code></code> — An Object containing one or more properties |
| that control the information returned by this method. |
| The properties include the following: |
| <ul> |
| <li><code>includeReadOnly</code>: If <code>false</code>, |
| exclude Object properties that are read-only. |
| The default value is <code>true</code>.</li> |
| <li><code>includeTransient</code>: If <code>false</code>, |
| exclude Object properties and variables that have <code>[Transient]</code> metadata. |
| The default value is <code>true</code>.</li> |
| <li><code>uris</code>: Array of Strings of all namespaces that should be included in the output. |
| It does allow for a wildcard of "*". |
| By default, it is null, meaning no namespaces should be included. |
| For example, you could specify <code>["mx_internal", "mx_object"]</code> |
| or <code>["*"]</code>.</li> |
| </ul> |
| |
| </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>Object</code> — An Object containing the following properties: |
| <ul> |
| <li><code>name</code>: String containing the name of the class;</li> |
| <li><code>properties</code>: Sorted list of the property names of the specified object.</li> |
| </ul> |
| |
| </td></tr></table></div><a name="setToStringExcludes()"></a><a name="setToStringExcludes(Array)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">setToStringExcludes</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code> public static function setToStringExcludes(excludes:Array):void</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>ApacheFlex 4.10</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| Change deault set of strings to exclude. |
| |
| </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">excludes</span>:Array</code> — The array of strings to exclude. |
| |
| </td></tr></table></p></div><a name="toString()"></a><a name="toString(Object,Array,Array)"></a><table class="detailHeader" cellpadding="0" cellspacing="0"><tr><td class="detailHeaderName">toString</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td></tr></table><div class="detailBody"><code> public static function toString(value:Object, namespaceURIs:Array = null, exclude:Array = null):String</code><p></p><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Language Version : </b></td><td>ActionScript 3.0</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Product Version : </b></td><td>Flex 3</td></tr></table><table cellpadding="0" cellspacing="0" border="0"><tr><td style="white-space:nowrap" valign="top"><b> Runtime Versions : </b></td><td>Flash Player 9, AIR 1.1</td></tr></table><p></p><p></p><p> |
| Pretty-prints the specified Object into a String. |
| All properties will be in alpha ordering. |
| Each object will be assigned an id during printing; |
| this value will be displayed next to the object type token |
| preceded by a '#', for example: |
| <pre> |
| (mx.messaging.messages::AsyncMessage)#2.</pre> |
| <p>This id is used to indicate when a circular reference occurs. |
| Properties of an object that are of the <code>Class</code> type will |
| appear only as the assigned type. |
| For example a custom definition like the following:</p> |
| <pre> |
| public class MyCustomClass { |
| public var clazz:Class; |
| }</pre> |
| |
| <p>With the <code>clazz</code> property assigned to <code>Date</code> |
| will display as shown below:</p> |
| |
| <pre> |
| (somepackage::MyCustomClass)#0 |
| clazz = (Date)</pre> |
| </p><p><span class="label"> Parameters </span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20px"></td><td><code><span class="label">value</span>:Object</code> — Object to be pretty printed. |
| |
| </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">namespaceURIs</span>:Array</code> (default = <code>null</code>)<code></code> — Array of namespace URIs for properties |
| that should be included in the output. |
| By default only properties in the public namespace will be included in |
| the output. |
| To get all properties regardless of namespace pass an array with a |
| single element of ". |
| |
| </td></tr><tr><td class="paramSpacer"> </td></tr><tr><td width="20px"></td><td><code><span class="label">exclude</span>:Array</code> (default = <code>null</code>)<code></code> — Array of the property names that should be |
| excluded from the output. |
| Use this to remove data from the formatted string. |
| |
| </td></tr></table></p><p></p><span class="label">Returns</span><table cellpadding="0" cellspacing="0" border="0"><tr><td width="20"></td><td><code>String</code> — String containing the formatted version |
| of the specified object. |
| </td></tr></table><br/><span class="label"> Example </span><br/> <pre> |
| // example 1 |
| var obj:AsyncMessage = new AsyncMessage(); |
| obj.body = []; |
| obj.body.push(new AsyncMessage()); |
| obj.headers["1"] = { name: "myName", num: 15.3}; |
| obj.headers["2"] = { name: "myName", num: 15.3}; |
| obj.headers["10"] = { name: "myName", num: 15.3}; |
| obj.headers["11"] = { name: "myName", num: 15.3}; |
| trace(ObjectUtil.toString(obj)); |
| // will output to flashlog.txt |
| (mx.messaging.messages::AsyncMessage)#0 |
| body = (Array)#1 |
| [0] (mx.messaging.messages::AsyncMessage)#2 |
| body = (Object)#3 |
| clientId = (Null) |
| correlationId = "" |
| destination = "" |
| headers = (Object)#4 |
| messageId = "378CE96A-68DB-BC1B-BCF7FFFFFFFFB525" |
| sequenceId = (Null) |
| sequencePosition = 0 |
| sequenceSize = 0 |
| timeToLive = 0 |
| timestamp = 0 |
| clientId = (Null) |
| correlationId = "" |
| destination = "" |
| headers = (Object)#5 |
| 1 = (Object)#6 |
| name = "myName" |
| num = 15.3 |
| 10 = (Object)#7 |
| name = "myName" |
| num = 15.3 |
| 11 = (Object)#8 |
| name = "myName" |
| num = 15.3 |
| 2 = (Object)#9 |
| name = "myName" |
| num = 15.3 |
| messageId = "1D3E6E96-AC2D-BD11-6A39FFFFFFFF517E" |
| sequenceId = (Null) |
| sequencePosition = 0 |
| sequenceSize = 0 |
| timeToLive = 0 |
| timestamp = 0 |
| // example 2 with circular references |
| obj = {}; |
| obj.prop1 = new Date(); |
| obj.prop2 = []; |
| obj.prop2.push(15.2); |
| obj.prop2.push("testing"); |
| obj.prop2.push(true); |
| obj.prop3 = {}; |
| obj.prop3.circular = obj; |
| obj.prop3.deeper = new ErrorMessage(); |
| obj.prop3.deeper.rootCause = obj.prop3.deeper; |
| obj.prop3.deeper2 = {}; |
| obj.prop3.deeper2.deeperStill = {}; |
| obj.prop3.deeper2.deeperStill.yetDeeper = obj; |
| trace(ObjectUtil.toString(obj)); |
| // will output to flashlog.txt |
| (Object)#0 |
| prop1 = Tue Apr 26 13:59:17 GMT-0700 2005 |
| prop2 = (Array)#1 |
| [0] 15.2 |
| [1] "testing" |
| [2] true |
| prop3 = (Object)#2 |
| circular = (Object)#0 |
| deeper = (mx.messaging.messages::ErrorMessage)#3 |
| body = (Object)#4 |
| clientId = (Null) |
| code = (Null) |
| correlationId = "" |
| destination = "" |
| details = (Null) |
| headers = (Object)#5 |
| level = (Null) |
| message = (Null) |
| messageId = "14039376-2BBA-0D0E-22A3FFFFFFFF140A" |
| rootCause = (mx.messaging.messages::ErrorMessage)#3 |
| sequenceId = (Null) |
| sequencePosition = 0 |
| sequenceSize = 0 |
| timeToLive = 0 |
| timestamp = 0 |
| deeper2 = (Object)#6 |
| deeperStill = (Object)#7 |
| yetDeeper = (Object)#0 |
| </pre> |
| |
| </div><br/><br/><hr><br/><p></p><center class="copyright"><footer>The Apache Software Foundation</footer><br/>Wed Nov 15 2017, 09:50 AM +01:00 </center></div></body></html><!--The Apache Software Foundation<br/>Wed Nov 15 2017, 09:50 AM +01:00 --> |