| Package | org.pranaframework.ioc.factory.xml.parser.support |
| Class | public class XMLObjectDefinitionsParser |
| Subclasses | FlexXMLObjectDefinitionsParser |
| Property | Defined by | ||
|---|---|---|---|
| nodeParsers : Array [read-only]
Returns all registered implementations of INodeParser.
| XMLObjectDefinitionsParser | ||
| objectFactory : IXMLObjectFactory
The objectFactory currently in use
| XMLObjectDefinitionsParser | ||
| Method | Defined by | ||
|---|---|---|---|
|
XMLObjectDefinitionsParser(objectFactory:IXMLObjectFactory = null)
Constructs a new
XmlObjectDefinitionsParser. | XMLObjectDefinitionsParser | ||
|
addNodeParser(parser:INodeParser):void
Adds a NodeParser to the parser.
| XMLObjectDefinitionsParser | ||
|
addPreprocessor(preprocessor:IXMLObjectDefinitionsPreprocessor):void
Adds a preprocessor to the parser.
| XMLObjectDefinitionsParser | ||
|
parse(xml:XML, properties:Array = null):IXMLObjectFactory
Parses all object definitions and returns the objectFactory that contains
the parsed results.
| XMLObjectDefinitionsParser | ||
|
parseAndRegisterObjectDefinition(node:XML):String
Parses and registers an object definition.
| XMLObjectDefinitionsParser | ||
|
parseObjectDefinition(xml:XML):IObjectDefinition
Parses the given object definition node into an implementation of IObjectDefinition.
| XMLObjectDefinitionsParser | ||
|
parseProperty(node:XML):Object
Will parse the given property node.
| XMLObjectDefinitionsParser | ||
|
parsePropertyValue(node:XML):Object
Will parse the given property value using the node parsers.
| XMLObjectDefinitionsParser | ||
| Constant | Defined by | ||
|---|---|---|---|
| ARRAY_COLLECTION_ELEMENT : String = "array-collection" [static] Constant value 'array-collection'
| XMLObjectDefinitionsParser | ||
| ARRAY_ELEMENT : String = "array" [static] Constant value 'array'
| XMLObjectDefinitionsParser | ||
| CLASS_ATTRIBUTE : String = "class" [static] Constant value 'class'
| XMLObjectDefinitionsParser | ||
| CONSTRUCTOR_ARG_ELEMENT : String = "constructor-arg" [static] Constant value 'constructor-arg'
| XMLObjectDefinitionsParser | ||
| DICTIONARY_ELEMENT : String = "dictionary" [static] Constant value 'dictionary'
| XMLObjectDefinitionsParser | ||
| ENTRY_ELEMENENT : String = "entry" [static] Constant value 'entry'
| XMLObjectDefinitionsParser | ||
| FACTORY_METHOD_ATTRIBUTE : String = "factory-method" [static] Constant value 'factory-method'
| XMLObjectDefinitionsParser | ||
| ID_ATTRIBUTE : String = "id" [static] Constant value 'id'
| XMLObjectDefinitionsParser | ||
| INIT_METHOD_ATTRIBUTE : String = "init-method" [static] Constant value 'init-method'
| XMLObjectDefinitionsParser | ||
| KEY_ATTRIBUTE : String = "key" [static] Constant value 'key'
| XMLObjectDefinitionsParser | ||
| KEY_ELEMENT : String = "key" [static] Constant value 'key'
| XMLObjectDefinitionsParser | ||
| LAZY_INIT_ATTRIBUTE : String = "lazy-init" [static] Constant value 'lazy-init'
| XMLObjectDefinitionsParser | ||
| LIST_ELEMENT : String = "list" [static] Constant value 'list'
| XMLObjectDefinitionsParser | ||
| MAP_ELEMENT : String = "map" [static] Constant value 'map'
| XMLObjectDefinitionsParser | ||
| OBJECT_ELEMENT : String = "object" [static] Constant value 'object'
| XMLObjectDefinitionsParser | ||
| PROPERTY_ELEMENT : String = "property" [static] Constant value 'property'
| XMLObjectDefinitionsParser | ||
| REF_ATTRIBUTE : String = "ref" [static] Constant value 'ref'
| XMLObjectDefinitionsParser | ||
| REF_ELEMENT : String = "ref" [static] Constant value 'ref'
| XMLObjectDefinitionsParser | ||
| SCOPE_ATTRIBUTE : String = "scope" [static] Constant value 'scope'
| XMLObjectDefinitionsParser | ||
| TEMPLATE_ELEMENT : String = "template" [static] Constant value 'template'
| XMLObjectDefinitionsParser | ||
| VALUE_ATTRIBUTE : String = "value" [static] Constant value 'value'
| XMLObjectDefinitionsParser | ||
| VALUE_ELEMENT : String = "value" [static] Constant value 'value'
| XMLObjectDefinitionsParser | ||
| nodeParsers | property |
nodeParsers:Array [read-only]Returns all registered implementations of INodeParser. Node parsers can be added using the addNodeParser method.
Implementation public function get nodeParsers():Array
See also
| objectFactory | property |
objectFactory:IXMLObjectFactory [read-write]The objectFactory currently in use
The default value is an instance of XMLObjectFactory.
public function get objectFactory():IXMLObjectFactory
public function set objectFactory(value:IXMLObjectFactory):void
See also
| XMLObjectDefinitionsParser | () | constructor |
public function XMLObjectDefinitionsParser(objectFactory:IXMLObjectFactory = null)
Constructs a new XmlObjectDefinitionsParser.
An optional objectFactory can be passed to store the definitions. If no
container is passed then a new instance will be created of type XMLObjectFactory.
objectFactory:IXMLObjectFactory (default = null) — the objectFactory where the object definitions will be stored
|
See also
| addNodeParser | () | method |
public function addNodeParser(parser:INodeParser):voidAdds a NodeParser to the parser.
Parametersparser:INodeParser — The inplementation of INodeParser that will be added
|
| addPreprocessor | () | method |
public function addPreprocessor(preprocessor:IXMLObjectDefinitionsPreprocessor):voidAdds a preprocessor to the parser.
Parameterspreprocessor:IXMLObjectDefinitionsPreprocessor — The inplementation of IXMLObjectDefinitionsPreprocessor that will be added
|
| parse | () | method |
public function parse(xml:XML, properties:Array = null):IXMLObjectFactoryParses all object definitions and returns the objectFactory that contains the parsed results.
Parametersxml:XML — the xml object with the object definitions
|
|
properties:Array (default = null) — an array of Properties objects
|
IXMLObjectFactory —
the objectFactory with the parsed object definitions
|
| parseAndRegisterObjectDefinition | () | method |
public function parseAndRegisterObjectDefinition(node:XML):StringParses and registers an object definition.
Parametersnode:XML — The xml node to create an object definition from.
|
String |
| parseObjectDefinition | () | method |
public function parseObjectDefinition(xml:XML):IObjectDefinitionParses the given object definition node into an implementation of IObjectDefinition.
Parametersxml:XML — The object definition node
|
IObjectDefinition —
an implementation of IObjectDefinition
|
| parseProperty | () | method |
public function parseProperty(node:XML):ObjectWill parse the given property node. If the given property does not contain a value attribute, the first childNode will be used as value else the value of the property will be parsed and returned using the parsePropertyValue method.
Parametersnode:XML — The property node to be parsed
|
Object — the value of the parsed node
|
See also
| parsePropertyValue | () | method |
public function parsePropertyValue(node:XML):ObjectWill parse the given property value using the node parsers.
Will loop through the node parsers in the order that they have been added. The first parser able to parse the node is used to retrieve the value. Parametersnode:XML — The property value node to be parsed
|
Object — the value of the node after parsing
|
| ARRAY_COLLECTION_ELEMENT | constant |
public static const ARRAY_COLLECTION_ELEMENT:String = "array-collection"Constant value 'array-collection'
| ARRAY_ELEMENT | constant |
public static const ARRAY_ELEMENT:String = "array"Constant value 'array'
| CLASS_ATTRIBUTE | constant |
public static const CLASS_ATTRIBUTE:String = "class"Constant value 'class'
| CONSTRUCTOR_ARG_ELEMENT | constant |
public static const CONSTRUCTOR_ARG_ELEMENT:String = "constructor-arg"Constant value 'constructor-arg'
| DICTIONARY_ELEMENT | constant |
public static const DICTIONARY_ELEMENT:String = "dictionary"Constant value 'dictionary'
| ENTRY_ELEMENENT | constant |
public static const ENTRY_ELEMENENT:String = "entry"Constant value 'entry'
| FACTORY_METHOD_ATTRIBUTE | constant |
public static const FACTORY_METHOD_ATTRIBUTE:String = "factory-method"Constant value 'factory-method'
| ID_ATTRIBUTE | constant |
public static const ID_ATTRIBUTE:String = "id"Constant value 'id'
| INIT_METHOD_ATTRIBUTE | constant |
public static const INIT_METHOD_ATTRIBUTE:String = "init-method"Constant value 'init-method'
| KEY_ATTRIBUTE | constant |
public static const KEY_ATTRIBUTE:String = "key"Constant value 'key'
| KEY_ELEMENT | constant |
public static const KEY_ELEMENT:String = "key"Constant value 'key'
| LAZY_INIT_ATTRIBUTE | constant |
public static const LAZY_INIT_ATTRIBUTE:String = "lazy-init"Constant value 'lazy-init'
| LIST_ELEMENT | constant |
public static const LIST_ELEMENT:String = "list"Constant value 'list'
| MAP_ELEMENT | constant |
public static const MAP_ELEMENT:String = "map"Constant value 'map'
| OBJECT_ELEMENT | constant |
public static const OBJECT_ELEMENT:String = "object"Constant value 'object'
| PROPERTY_ELEMENT | constant |
public static const PROPERTY_ELEMENT:String = "property"Constant value 'property'
| REF_ATTRIBUTE | constant |
public static const REF_ATTRIBUTE:String = "ref"Constant value 'ref'
| REF_ELEMENT | constant |
public static const REF_ELEMENT:String = "ref"Constant value 'ref'
| SCOPE_ATTRIBUTE | constant |
public static const SCOPE_ATTRIBUTE:String = "scope"Constant value 'scope'
| TEMPLATE_ELEMENT | constant |
public static const TEMPLATE_ELEMENT:String = "template"Constant value 'template'
| VALUE_ATTRIBUTE | constant |
public static const VALUE_ATTRIBUTE:String = "value"Constant value 'value'
| VALUE_ELEMENT | constant |
public static const VALUE_ELEMENT:String = "value"Constant value 'value'