| Package | flex.lang.reflect.utils |
| Class | public class MetadataTools |
| Inheritance | MetadataTools Object |
MetadataTools contains methods that are responsible for the parsing and interpretation of XML
metadata. It contains methods that are responsible for determing whether provided metadata contains a certain
tag as well as methods used to obtain information from the metadata based on provided keys.
| Method | Defined By | ||
|---|---|---|---|
checkForValueInBlankMetaDataNode(node:XML, metaDataName:String, value:String):Boolean [static]
Returns whether a node contains metadata matching metadata with no key but a value of
value. | MetadataTools | ||
classExtends(description:XML, className:String):Boolean [static]
Determine if the description XML has a superclass of type className. | MetadataTools | ||
classExtendsFromNode(node:XML, className:String):Boolean [static]
Returns whether the description XML node extends from className. | MetadataTools | ||
classImpementsNode(node:XML, interfaceName:String):Boolean [static]
Determines if the node XML implements interfaceName. | MetadataTools | ||
classImplements(description:XML, interfaceName:String):Boolean [static]
Determine if the description XML implements interfaceName. | MetadataTools | ||
doesMethodAcceptsParams(method:XML):Boolean [static]
Determines if the method node accepts parameters. | MetadataTools | ||
getArgsFromFromNode(node:XML, metaDataName:String):XML [static]
Returns the metadata of node if it contains metaDataName
| MetadataTools | ||
getArgValueFromDescription(description:XML, metadata:String, key:String):String [static]
Determine if an XML description contains metadata with the attribute specified by key. | MetadataTools | ||
getArgValueFromMetaDataNode(node:XML, metaDataName:String, key:String):String [static]
Returns the value of a node with metadata matching metadata with key of key. | MetadataTools | ||
getArgValueFromSingleMetaDataNode(node:XML, key:String):String [static]
Determine if the node XML contains an argument with key matching key. | MetadataTools | ||
getMetaDataNodeFromNodesList(nodes:XMLList, type:String):XML [static]
Retrieves a metadata node with a specific name in the provided nodes XMLList. | MetadataTools | ||
getMethodReturnType(method:XML):String [static]
Returns the return type of paramater method XML node as a String. | MetadataTools | ||
getMethodsDecoratedBy(methodList:XMLList, metadata:String):XMLList [static] | MetadataTools | ||
getMethodsList(description:XML):XMLList [static]
Returns an XMLList containing method nodes of the description XML. | MetadataTools | ||
isClass(description:XML):Boolean [static]
Determine if the description XML describes a class. | MetadataTools | ||
isInstance(description:XML):Boolean [static]
Determine if the description XML describes an instance of a class. | MetadataTools | ||
nodeHasMetaData(node:XML, metadata:String):Boolean [static]
Determines if the node XML has metadata metadata. | MetadataTools | ||
nodeMetaData(node:XML):XMLList [static]
Retruns all metadata nodes for a given node. | MetadataTools | ||
| checkForValueInBlankMetaDataNode | () | method |
public static function checkForValueInBlankMetaDataNode(node:XML, metaDataName:String, value:String):Boolean
Returns whether a node contains metadata matching metadata with no key but a value of
value.
Parameters
node:XML — The XML node to check.
| |
metaDataName:String — The name of the metadata node to check.
| |
value:String — the String that potentially exists as an value attribute of an argument in the metaDataName node.
|
Boolean — a Boolean value indicating whether a match was found for the corresponding vlaue.
|
| classExtends | () | method |
public static function classExtends(description:XML, className:String):Boolean
Determine if the description XML has a superclass of type className.
Parameters
description:XML — The XML description to check.
| |
className:String — The class name to check.
|
Boolean — a Boolean value indicating whether the description XML extends from
className.
|
| classExtendsFromNode | () | method |
public static function classExtendsFromNode(node:XML, className:String):Boolean
Returns whether the description XML node extends from className.
Parameters
node:XML — The XML node to check.
| |
className:String — The name of the class to check.
|
Boolean — a Boolean value indicating whether the description XML node has a extendsClass node that has
a type of the provided className.
|
| classImpementsNode | () | method |
public static function classImpementsNode(node:XML, interfaceName:String):Boolean
Determines if the node XML implements interfaceName.
Parameters
node:XML — The XML node to check.
| |
interfaceName:String — The name of the interface to check.
|
Boolean — a Boolean value indicating whether the node XML node contains an implementsInterface node that has a type attribute
that matches the interfaceName.
|
| classImplements | () | method |
public static function classImplements(description:XML, interfaceName:String):Boolean
Determine if the description XML implements interfaceName.
Parameters
description:XML — The XML description to check.
| |
interfaceName:String — The interface name to check.
|
Boolean — a Boolean value indicating whether the description XML implements the
interfaceName.
|
| doesMethodAcceptsParams | () | method |
public static function doesMethodAcceptsParams(method:XML):Boolean
Determines if the method node accepts parameters.
Parameters
method:XML — The XML node to check.
|
Boolean — a Boolean value indicating whether the method node can accept parameters.
|
| getArgsFromFromNode | () | method |
public static function getArgsFromFromNode(node:XML, metaDataName:String):XML
Returns the metadata of node if it contains metaDataName
Parameters
node:XML — The XML node to check.
| |
metaDataName:String — The name of the metadata node to check.
|
XML — a metadata node that is contained in the node XML and that has a
metadata name that matches the provided metaDataName. If no metadata name matches,
a value of null is returned.
|
| getArgValueFromDescription | () | method |
public static function getArgValueFromDescription(description:XML, metadata:String, key:String):String
Determine if an XML description contains metadata with the attribute specified by key.
If some nodes exist, the value of the argument node is returned.
Parameters
description:XML — The XML description to check.
| |
metadata:String — The name of the metadata node to check.
| |
key:String — The key used to find the value in the metadata node.
|
String — a String with the value of the specific argument that was found with the metadata name and
key; if no match is found, a value of null is returned.
|
| getArgValueFromMetaDataNode | () | method |
public static function getArgValueFromMetaDataNode(node:XML, metaDataName:String, key:String):String
Returns the value of a node with metadata matching metadata with key of key.
Parameters
node:XML — The XML node to check.
| |
metaDataName:String — The name of the metadata node to check.
| |
key:String — the String that potentially exists as an attribute of an argument in the metaDataName node.
|
String — a String with the value of the specific argument that contains the matching key; if no match
is found, a value of null is returned.
|
| getArgValueFromSingleMetaDataNode | () | method |
public static function getArgValueFromSingleMetaDataNode(node:XML, key:String):String
Determine if the node XML contains an argument with key matching key.
Parameters
node:XML — The XML node to check.
| |
key:String — the String that potentially exists as an attribute of an argument in the node XML.
|
String — a String with the value of the specific argument that contains the matching key; if no match is found, a
value of null is returned.
|
| getMetaDataNodeFromNodesList | () | method |
public static function getMetaDataNodeFromNodesList(nodes:XMLList, type:String):XML
Retrieves a metadata node with a specific name in the provided nodes XMLList.
Parameters
nodes:XMLList — The XMLList that potentially contains the node.
| |
type:String — The name of the node to find.
|
XML — a metadata node in the nodes XMLList that has a matching name. If no metadata name matches
a value of null is returned.
|
| getMethodReturnType | () | method |
public static function getMethodReturnType(method:XML):String
Returns the return type of paramater method XML node as a String.
Parameters
method:XML — The XML node to check.
|
String — a String with the return type attribute of the method XML node. If the XML node is null, an
empty String is returned.
|
| getMethodsDecoratedBy | () | method |
public static function getMethodsDecoratedBy(methodList:XMLList, metadata:String):XMLListParameters
methodList:XMLList | |
metadata:String |
XMLList |
| getMethodsList | () | method |
public static function getMethodsList(description:XML):XMLList
Returns an XMLList containing method nodes of the description XML.
Parameters
description:XML — The XML description to check.
|
XMLList — an XMLList containing methods nodes of the description XML.
|
| isClass | () | method |
public static function isClass(description:XML):Boolean
Determine if the description XML describes a class.
Parameters
description:XML — The XML description to check.
|
Boolean — a Boolean value indicating whether the description XML has a base attribute
containing "Class" as the value.
|
| isInstance | () | method |
public static function isInstance(description:XML):Boolean
Determine if the description XML describes an instance of a class.
Parameters
description:XML — The XML description to check.
|
Boolean — a Boolean value indicating whether the description XML does not have a base attribute
containing "Class" as the value.
|
| nodeHasMetaData | () | method |
public static function nodeHasMetaData(node:XML, metadata:String):Boolean
Determines if the node XML has metadata metadata.
Parameters
node:XML — The XML node to check.
| |
metadata:String — The name of the metadata name.
|
Boolean — a Boolean value indicating whether node has metadata metadata
|
| nodeMetaData | () | method |
public static function nodeMetaData(node:XML):XMLList
Retruns all metadata nodes for a given node.
Parameters
node:XML — The XML node to check for metadata nodes.
|
XMLList — an XMLList containing all metadata nodes in a given node XML node. If no metadata nodes
exist, a value of null is returned.
|