1 |
|
2 |
|
3 |
|
4 | import { ILogger } from "../iLogger";
|
5 | import { Component } from "../widgets/component";
|
6 | export interface ContextParams {
|
7 | seed: any;
|
8 | beans: any[];
|
9 | components: ComponentMeta[];
|
10 | overrideBeans: any[];
|
11 | debug: boolean;
|
12 | }
|
13 | export interface ComponentMeta {
|
14 | theClass: new () => Object;
|
15 | componentName: string;
|
16 | }
|
17 | export declare class Context {
|
18 | private beans;
|
19 | private contextParams;
|
20 | private logger;
|
21 | private componentsMappedByName;
|
22 | private destroyed;
|
23 | constructor(params: ContextParams, logger: ILogger);
|
24 | private setupComponents();
|
25 | private addComponent(componentMeta);
|
26 | createComponent(element: Element, afterPreCreateCallback?: (comp: Component) => void): Component;
|
27 | wireBean(bean: any, afterPreCreateCallback?: (comp: Component) => void): void;
|
28 | private wireBeans(beans, afterPreCreateCallback?);
|
29 | private createBeans();
|
30 | private createBeanEntry(Bean);
|
31 | private autoWireBeans(beans);
|
32 | private methodWireBeans(beans);
|
33 | private autoWireBean(bean);
|
34 | private getBeanName(constructor);
|
35 | private methodWireBean(bean);
|
36 | private getBeansForParameters(parameters, beanName);
|
37 | private lookupBeanInstance(wiringBean, beanName, optional?);
|
38 | private postConstruct(beans);
|
39 | private preConstruct(beans);
|
40 | getBean(name: string): any;
|
41 | destroy(): void;
|
42 | }
|
43 | export declare function PreConstruct(target: Object, methodName: string, descriptor: TypedPropertyDescriptor<any>): void;
|
44 | export declare function PostConstruct(target: Object, methodName: string, descriptor: TypedPropertyDescriptor<any>): void;
|
45 | export declare function PreDestroy(target: Object, methodName: string, descriptor: TypedPropertyDescriptor<any>): void;
|
46 | export declare function Bean(beanName: string): Function;
|
47 | export declare function Autowired(name?: string): Function;
|
48 | export declare function Optional(name?: string): Function;
|
49 | export declare function Qualifier(name: string): Function;
|