public class IProvideService extends Objs
Objs.Constructor<T extends Objs>, Objs.Property<T>
Modifier | Constructor and Description |
---|---|
protected |
IProvideService(Objs.Constructor<?> c,
Object js) |
Modifier and Type | Method and Description |
---|---|
static IProvideService |
$as(Object obj) |
void |
constant(String name,
Object value) |
void |
decorator(String name,
Function decorator)
Register a service decorator with the $injector.
|
void |
decorator(String name,
Object[] inlineAnnotatedFunction)
Register a service decorator with the $injector.
|
IServiceProvider |
factory(String name,
Function serviceFactoryFunction) |
IServiceProvider |
factory(String name,
Object[] inlineAnnotatedFunction) |
IServiceProvider |
provider(String name,
Function serviceProviderConstructor) |
IServiceProvider |
provider(String name,
IServiceProvider provider) |
IServiceProvider |
service(String name,
Function constructor) |
IServiceProvider |
service(String name,
Object[] inlineAnnotatedFunction) |
IServiceProvider |
value(String name,
Object value) |
$as, $cast, $delete, $get, $js, $set, create, create, defineProperties, defineProperty, freeze, getOwnPropertyDescriptor, getOwnPropertyNames, getPrototypeOf, hasOwnProperty, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, newObject, newObject, preventExtensions, propertyIsEnumerable, seal, toLocaleString, toString, valueOf
protected IProvideService(Objs.Constructor<?> c, Object js)
public static IProvideService $as(Object obj)
public void decorator(String name, Object[] inlineAnnotatedFunction)
name
- The name of the service to decorate.inlineAnnotatedFunction
- This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments:
$delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.public void decorator(String name, Function decorator)
name
- The name of the service to decorate.decorator
- This function will be invoked when the service needs to be instantiated and should return the decorated service instance. The function is called using the injector.invoke method and is therefore fully injectable. Local injection arguments:
$delegate - The original service instance, which can be monkey patched, configured, decorated or delegated to.public IServiceProvider factory(String name, Object[] inlineAnnotatedFunction)
public IServiceProvider factory(String name, Function serviceFactoryFunction)
public IServiceProvider provider(String name, Function serviceProviderConstructor)
public IServiceProvider provider(String name, IServiceProvider provider)
public IServiceProvider service(String name, Object[] inlineAnnotatedFunction)
public IServiceProvider service(String name, Function constructor)
public IServiceProvider value(String name, Object value)
Copyright © 2018. All rights reserved.