Package | org.spicefactory.parsley.core.scope |
Interface | public interface ScopeExtensions |
Implementors | DefaultScopeExtensions |
Extensions can be registered globally or for a single Context only with
FactoryRegistry.scopeExtensions
.
Method | Defined By | ||
---|---|---|---|
forType(type:Class):Object
Obtains the extension of the specified type. | ScopeExtensions | ||
hasType(type:Class):Boolean
Indicates whether this object contains an extension of the specified type. | ScopeExtensions |
forType | () | method |
public function forType(type:Class):Object
Obtains 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):Boolean
Indicates 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
|