| Package | org.spicefactory.parsley.core.scope.impl |
| Class | public class DefaultScopeExtensions |
| Inheritance | DefaultScopeExtensions Object |
| Implements | ScopeExtensions |
| Method | Defined By | ||
|---|---|---|---|
DefaultScopeExtensions(types:Dictionary, initCallback:Function)
Creates a new instance. | DefaultScopeExtensions | ||
forType(type:Class):Object
Obtains the extension of the specified type. | DefaultScopeExtensions | ||
hasType(type:Class):Boolean
Indicates whether this object contains an extension of the specified type. | DefaultScopeExtensions | ||
| DefaultScopeExtensions | () | Constructor |
public function DefaultScopeExtensions(types:Dictionary, initCallback:Function)Creates a new instance.
Parameterstypes:Dictionary — all extensions for this instance mapped by type
| |
initCallback:Function — the callback to invoke when creating a new instance of a scope extension
|
| forType | () | method |
public function forType(type:Class):ObjectObtains the extension of the specified type. When using this method the scope must contain exactly one instance of a matching type, otherwise an Error will be thrown.
Parameters
type:Class — the type of extenstion to obtain
|
Object — the extension with a matching type
|
| hasType | () | method |
public function hasType(type:Class):BooleanIndicates whether this object contains an extension of the specified type.
Parameters
type:Class — the type of extension to check
|
Boolean — true if this object contains an extension of the specified type
|