| Package | system.ioc |
| Class | public dynamic class TypeExpression |
| Inheritance | TypeExpression ExpressionFormatter flash.utils.Dictionary |
Example :
import system.ioc.TypeExpression ;
var exp:TypeExpression = new TypeExpression() ;
exp.put( "package" , "foo.bar.myPackage" ) ;
exp.put( "package.controller" , "{package}.controller" ) ;
var type:String = "{package.controller}.InitApplication" ;
var result:String = exp.format(type) ;
trace( "type:" + type + ", result:" + result ) ;
| Method | Defined By | ||
|---|---|---|---|
TypeExpression(weakKeys:Boolean = false)
Creates a new TypeExpression instance. | TypeExpression | ||
![]() | format(value:* = null):String
Formats the specified value. | ExpressionFormatter | |
put(key:String, value:String):Boolean
Inserts a new expression in the collector. | TypeExpression | ||
| TypeExpression | () | Constructor |
public function TypeExpression(weakKeys:Boolean = false)Creates a new TypeExpression instance.
ParametersweakKeys:Boolean (default = false) — Instructs the Dictionary object to use "weak" references on object keys.
If the only reference to an object is in the specified Dictionary object, the key is eligible
for garbage collection and is removed from the table when the object is collected.
|
| put | () | method |
public function put(key:String, value:String):BooleanInserts a new expression in the collector. If the expression already exist, the value in the collector is replaced.
Parameters
key:String — The alias name, this expression not must be null and not empty or the method return false.
| |
value:String — The value of the alias type, this expression not must be null and not empty or the method return false.
|
Boolean — true if the alias can be registered.
|