blob: 9d4cc45a2e1c80fe005bbc84283fc1ecb37be2a9 [file] [log] [blame]
{ "type": "class",
"qname": "mx.utils.ObjectUtil",
"baseClassname": ""
,
"description": "The ObjectUtil class is an all-static class with methods for working with Objects within Flex. You do not create instances of ObjectUtil; instead you simply call static methods such as the <code>ObjectUtil.isSimple()</code> method. JS PAYG : non-reflectable utility class, unused methods will be subject to deadcode elimination",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]},
{ "tagName": "royalesuppressexport",
"values": []} ],
"members": [
{ "type": "method",
"qname": "compare",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Compares the Objects and returns an integer value indicating if the first item is less than, greater than, or equal to the second item. This method will recursively compare properties on nested objects and will return as soon as a non-zero result is found. By default this method will recurse to the deepest level of any property. To change the depth for comparison specify a non-negative value for the <code>depth</code> parameter. recursed when performing the comparison. Set this value to 0 for a shallow comparison of only the primitive representation of each property. For example:<pre>\\n var a:Object = {name:&quot;Bob&quot;, info:[1,2,3]};\\n var b:Object = {name:&quot;Alice&quot;, info:[5,6,7]};\\n var c:int = ObjectUtil.compare(a, b, 0);</pre> <p>In the above example the complex properties of <code>a</code> and <code>b</code> will be flattened by a call to <code>toString()</code> when doing the comparison. In this case the <code>info</code> property will be turned into a string when performing the comparison.</p> Return 1 if a is null or greater than b. Return -1 if b is null or greater than a.",
"tags": [
{ "tagName": "param",
"values": ["a Object.", "b Object.", "depth Indicates how many levels should be"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["Return 0 if a and b are equal, or both null or NaN."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "int",
"params": [{ "name": "a", "type": "Object"},
{ "name": "b", "type": "Object"},
{ "name": "depth", "type": "int"}]}
,
{ "type": "method",
"qname": "copy",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Copies the specified Object and returns a reference to the copy. The copy is made using a native serialization technique. This means that custom serialization will be respected during the copy. <p>This method is designed for copying data objects, such as elements of a collection. It is not intended for copying a UIComponent object, such as a TextInput control. If you want to create copies of specific UIComponent objects, you can create a subclass of the component and implement a <code>clone()</code> method, or other method to perform the copy.</p>",
"tags": [
{ "tagName": "param",
"values": ["value Object that should be copied."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["Copy of the specified Object."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Object",
"params": [{ "name": "value", "type": "Object"}]}
,
{ "type": "method",
"qname": "clone",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Clones the specified Object and returns a reference to the clone. The clone is made using a native serialization technique. This means that custom serialization will be respected during the cloning. clone() differs from copy() in that the uid property of each object instance is retained. <p>This method is designed for cloning data objects, such as elements of a collection. It is not intended for cloning a UIComponent object, such as a TextInput control. If you want to clone specific UIComponent objects, you can create a subclass of the component and implement a <code>clone()</code> method.</p>",
"tags": [
{ "tagName": "param",
"values": ["value Object that should be cloned."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 4"]},
{ "tagName": "return",
"values": ["Clone of the specified Object."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Object",
"params": [{ "name": "value", "type": "Object"}]}
,
{ "type": "method",
"qname": "isSimple",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Returns <code>true</code> if the object reference specified is a simple data type. The simple data types include the following: <ul> <li><code>String</code></li> <li><code>Number</code></li> <li><code>uint</code></li> <li><code>int</code></li> <li><code>Boolean</code></li> <li><code>Date</code></li> <li><code>Array</code></li> </ul> is one of the types above; <code>false</code> otherwise.",
"tags": [
{ "tagName": "param",
"values": ["value Object inspected."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["<code>true</code> if the object specified"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "value", "type": "Object"}]}
,
{ "type": "method",
"qname": "numericCompare",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Compares two numeric values. 1 if only <code>a</code> is a NaN. -1 if only <code>b</code> is a NaN. -1 if <code>a</code> is less than <code>b</code>. 1 if <code>a</code> is greater than <code>b</code>.",
"tags": [
{ "tagName": "param",
"values": ["a First number.", "b Second number."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["0 is both numbers are NaN."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "int",
"params": [{ "name": "a", "type": "Number"},
{ "name": "b", "type": "Number"}]}
,
{ "type": "method",
"qname": "stringCompare",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Compares two String values. <code>true</code>, or not, <code>false</code>. 1 if only <code>a</code> is null. -1 if only <code>b</code> is null. -1 if <code>a</code> precedes <code>b</code>. 1 if <code>b</code> precedes <code>a</code>.",
"tags": [
{ "tagName": "param",
"values": ["a First String value.", "b Second String value.", "caseInsensitive Specifies to perform a case insensitive compare,"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["0 is both Strings are null."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "int",
"params": [{ "name": "a", "type": "String"},
{ "name": "b", "type": "String"},
{ "name": "caseInsensitive", "type": "Boolean"}]}
,
{ "type": "method",
"qname": "dateCompare",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Compares the two Date objects and returns an integer value indicating if the first Date object is before, equal to, or after the second item. (or both are <code>null</code>); -1 if <code>a</code> is before <code>b</code> (or <code>b</code> is <code>null</code>); 1 if <code>a</code> is after <code>b</code> (or <code>a</code> is <code>null</code>); 0 is both dates getTime's are NaN; 1 if only <code>a</code> getTime is a NaN; -1 if only <code>b</code> getTime is a NaN.",
"tags": [
{ "tagName": "param",
"values": ["a Date object.", "b Date object."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["0 if <code>a</code> and <code>b</code> are equal"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "int",
"params": [{ "name": "a", "type": "Date"},
{ "name": "b", "type": "Date"}]}
,
{ "type": "method",
"qname": "toString",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "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>\\n (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>\\n public class MyCustomClass {\\n public var clazz:Class;\\n }</pre> <p>With the <code>clazz</code> property assigned to <code>Date</code> will display as shown below:</p> <pre>\\n (somepackage::MyCustomClass)#0\\n clazz = (Date)</pre> 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 &quot;*&quot;. excluded from the output. Use this to remove data from the formatted string. of the specified object. <pre>\\n // example 1\\n var obj:AsyncMessage = new AsyncMessage();\\n obj.body = [];\\n obj.body.push(new AsyncMessage());\\n obj.headers[&quot;1&quot;] = { name: &quot;myName&quot;, num: 15.3};\\n obj.headers[&quot;2&quot;] = { name: &quot;myName&quot;, num: 15.3};\\n obj.headers[&quot;10&quot;] = { name: &quot;myName&quot;, num: 15.3};\\n obj.headers[&quot;11&quot;] = { name: &quot;myName&quot;, num: 15.3};\\n trace(ObjectUtil.toString(obj));\\n \\n // will output to flashlog.txt\\n (mx.messaging.messages::AsyncMessage)#0\\n body = (Array)#1\\n [0] (mx.messaging.messages::AsyncMessage)#2\\n body = (Object)#3\\n clientId = (Null)\\n correlationId = &quot;&quot;\\n destination = &quot;&quot;\\n headers = (Object)#4\\n messageId = &quot;378CE96A-68DB-BC1B-BCF7FFFFFFFFB525&quot;\\n sequenceId = (Null)\\n sequencePosition = 0\\n sequenceSize = 0\\n timeToLive = 0\\n timestamp = 0\\n clientId = (Null)\\n correlationId = &quot;&quot;\\n destination = &quot;&quot;\\n headers = (Object)#5\\n 1 = (Object)#6\\n name = &quot;myName&quot;\\n num = 15.3\\n 10 = (Object)#7\\n name = &quot;myName&quot;\\n num = 15.3\\n 11 = (Object)#8\\n name = &quot;myName&quot;\\n num = 15.3\\n 2 = (Object)#9\\n name = &quot;myName&quot;\\n num = 15.3\\n messageId = &quot;1D3E6E96-AC2D-BD11-6A39FFFFFFFF517E&quot;\\n sequenceId = (Null)\\n sequencePosition = 0\\n sequenceSize = 0\\n timeToLive = 0\\n timestamp = 0\\n \\n // example 2 with circular references\\n obj = {};\\n obj.prop1 = new Date();\\n obj.prop2 = [];\\n obj.prop2.push(15.2);\\n obj.prop2.push(&quot;testing&quot;);\\n obj.prop2.push(true);\\n obj.prop3 = {};\\n obj.prop3.circular = obj;\\n obj.prop3.deeper = new ErrorMessage();\\n obj.prop3.deeper.rootCause = obj.prop3.deeper;\\n obj.prop3.deeper2 = {};\\n obj.prop3.deeper2.deeperStill = {};\\n obj.prop3.deeper2.deeperStill.yetDeeper = obj;\\n trace(ObjectUtil.toString(obj));\\n \\n // will output to flashlog.txt\\n (Object)#0\\n prop1 = Tue Apr 26 13:59:17 GMT-0700 2005\\n prop2 = (Array)#1\\n [0] 15.2\\n [1] &quot;testing&quot;\\n [2] true\\n prop3 = (Object)#2\\n circular = (Object)#0\\n deeper = (mx.messaging.messages::ErrorMessage)#3\\n body = (Object)#4\\n clientId = (Null)\\n code = (Null)\\n correlationId = &quot;&quot;\\n destination = &quot;&quot;\\n details = (Null)\\n headers = (Object)#5\\n level = (Null)\\n message = (Null)\\n messageId = &quot;14039376-2BBA-0D0E-22A3FFFFFFFF140A&quot;\\n rootCause = (mx.messaging.messages::ErrorMessage)#3\\n sequenceId = (Null)\\n sequencePosition = 0\\n sequenceSize = 0\\n timeToLive = 0\\n timestamp = 0\\n deeper2 = (Object)#6\\n deeperStill = (Object)#7\\n yetDeeper = (Object)#0\\n \\n // example 3 with Dictionary\\n var point:Point = new Point(100, 100);\\n var point2:Point = new Point(100, 100);\\n var obj:Dictionary = new Dictionary();\\n obj[point] = &quot;point&quot;;\\n obj[point2] = &quot;point2&quot;;\\n obj[&quot;1&quot;] = { name: &quot;one&quot;, num: 1};\\n obj[&quot;two&quot;] = { name: &quot;2&quot;, num: 2};\\n obj[3] = 3;\\n trace(ObjectUtil.toString(obj));\\n \\n // will output to flashlog.txt\\n (flash.utils::Dictionary)#0\\n {(flash.geom::Point)#1\\n length = 141.4213562373095\\n x = 100\\n y = 100} = &quot;point2&quot;\\n {(flash.geom::Point)#2\\n length = 141.4213562373095\\n x = 100\\n y = 100} = &quot;point&quot;\\n {1} = (Object)#3\\n name = &quot;one&quot;\\n num = 1\\n {3} = 3\\n {&quot;two&quot;} = (Object)#4\\n name = &quot;2&quot;\\n num = 2\\n \\n </pre>",
"tags": [
{ "tagName": "param",
"values": ["value Object to be pretty printed.", "namespaceURIs Array of namespace URIs for properties", "exclude Array of the property names that should be"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["String containing the formatted version"]},
{ "tagName": "example",
"values": []},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "String",
"params": [{ "name": "value", "type": "Object"},
{ "name": "namespaceURIs", "type": "Array"},
{ "name": "exclude", "type": "Array"}]}
,
{ "type": "field",
"qname": "USE_DOUBLE_COLON",
"return": "Boolean",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {}},
{ "type": "method",
"qname": "getClassInfo",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Returns information about the class, and properties of the class, for the specified Object. excluded from the returned result. For example, you could specify <code>[&quot;currentTarget&quot;, &quot;target&quot;]</code> for an Event object since these properties can cause the returned result to become large. 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 &quot;~~&quot;. By default, it is null, meaning no namespaces should be included. For example, you could specify <code>[&quot;mx_internal&quot;, &quot;mx_object&quot;]</code> or <code>[&quot;~~&quot;]</code>.</li> </ul> <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, or references to the original key if the specified object is a Dictionary. The individual array elements are QName instances, which contain both the local name of the property as well as the URI.</li> </ul>",
"tags": [
{ "tagName": "param",
"values": ["obj The Object to inspect.", "excludes Array of Strings specifying the property names that should be", "options An Object containing one or more properties"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "royaleignorecoercion",
"values": ["Class", "Map", "WeakMap"]},
{ "tagName": "return",
"values": ["An Object containing the following properties:"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "ClassInfo",
"params": [{ "name": "obj", "type": "Object"},
{ "name": "excludes", "type": "Array"},
{ "name": "options", "type": "Object"}]}
,
{ "type": "method",
"qname": "hasMetadata",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Uses <code>getClassInfo</code> and examines the metadata information to determine whether a property on a given object has the specified metadata.",
"tags": [
{ "tagName": "param",
"values": ["obj The object holding the property.", "propName The property to check for metadata.", "metadataName The name of the metadata to check on the property.", "excludes If any properties need to be excluded when generating class info. (Optional)", "options If any options flags need to changed when generating class info. (Optional)"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["true if the property has the specified metadata."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "obj", "type": "Object"},
{ "name": "propName", "type": "String"},
{ "name": "metadataName", "type": "String"},
{ "name": "excludes", "type": "Array"},
{ "name": "options", "type": "Object"}]}
,
{ "type": "method",
"qname": "isDynamicObject",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Returns <code>true</code> if the object is an instance of a dynamic class.",
"tags": [
{ "tagName": "param",
"values": ["object The object."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["<code>true</code> if the object is an instance of a dynamic class."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "object", "type": "Object"}]}
,
{ "type": "method",
"qname": "getEnumerableProperties",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Returns all the properties defined dynamically on an object.",
"tags": [
{ "tagName": "param",
"values": ["object The object to inspect."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["an <code>Array</code> of the enumerable properties of the object."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Array",
"params": [{ "name": "object", "type": "Object"}]}
,
{ "type": "method",
"qname": "valuesAreSubsetOfObject",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Verifies if the first object is dynamic and is a subset of the second object. is dynamic and <code>object</code> shares all its properties and values. (Even if <code>object</code> contains other properties and values, we still consider it a match).",
"tags": [
{ "tagName": "param",
"values": ["values The values which need to be shared by <code>object</code>", "object The object to verify against."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["true if and only if the objects are the same, or if <code>values</code>"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "values", "type": "Object"},
{ "name": "object", "type": "Object"}]}
,
{ "type": "method",
"qname": "getValue",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Returns the value at the end of the property chain <code>path</code>. If the value cannot be reached due to null links on the chain, <code>undefined</code> is returned. if it cannot be reached, or the object itself when <code>path</code> is empty.",
"tags": [
{ "tagName": "param",
"values": ["obj The object at the beginning of the property chain", "path The path to inspect (e.g. "address.street")"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["the value at the end of the property chain, <code>undefined</code>"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "*",
"params": [{ "name": "obj", "type": "Object"},
{ "name": "path", "type": "Array"}]}
,
{ "type": "method",
"qname": "setValue",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Sets a new value at the end of the property chain <code>path</code>. If the value cannot be reached due to null links on the chain, <code>false</code> is returned. <code>false</code> otherwise. Note that the function does not use a try/catch block. You can implement one in the calling function if there's a risk of type mismatch or other errors during the assignment.",
"tags": [
{ "tagName": "param",
"values": ["obj The object at the beginning of the property chain", "path The path to traverse (e.g. "address.street")", "newValue The value to set (e.g. "Fleet Street")"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["<code>true</code> if the value is successfully set,"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "obj", "type": "Object"},
{ "name": "path", "type": "Array"},
{ "name": "newValue", "type": "*"}]}
]
}