| Package | org.spicefactory.lib.xml.mapper |
| Class | public class ChoiceRegistry |
| Inheritance | ChoiceRegistry Object |
| Method | Defined By | ||
|---|---|---|---|
getChoiceById(id:String):Choice
Returns the choice for the specified id. | ChoiceRegistry | ||
getChoiceByType(type:Class):Choice
Returns the choice for the specified type. | ChoiceRegistry | ||
initialize(mappers:Dictionary):void
Initializes all existing choices, extracting the corresponding mappers for
all existing choices which map to types and their subtypes. | ChoiceRegistry | ||
mergeInto(choices:ChoiceRegistry):void
Merges the content of this registry into the specified registry. | ChoiceRegistry | ||
| getChoiceById | () | method |
public function getChoiceById(id:String):ChoiceReturns the choice for the specified id. If such a choice does not exist yet, a new one will be created.
Parameters
id:String — the id to return the choice for
|
Choice — the choice for the specified id
|
| getChoiceByType | () | method |
public function getChoiceByType(type:Class):ChoiceReturns the choice for the specified type. If such a choice does not exist yet, a new one will be created.
Parameters
type:Class — the type to return the choice for
|
Choice — the choice for the specified type
|
| initialize | () | method |
public function initialize(mappers:Dictionary):voidInitializes all existing choices, extracting the corresponding mappers for all existing choices which map to types and their subtypes. Also validates all existing choices and throws an Error if one of them is empty.
Parameters
mappers:Dictionary — the mappings to fill the choices with, the keys in the Dictionary are the
types (classes) of the mappings, the values are the actual mappers.
|
| mergeInto | () | method |
public function mergeInto(choices:ChoiceRegistry):voidMerges the content of this registry into the specified registry.
Parameters
choices:ChoiceRegistry — the registry to merge the content of this registry into
|