import _ from 'lodash';
export class HandlerMetaData {
    static setMetaDataOfHandler(handler, symbol, data) {
        const [controller, methodName] = handler.reference;
        const meta = Reflect.getMetadata(symbol, controller) || {};
        meta[methodName || 'handle'] = data;
        Reflect.defineMetadata(symbol, meta, controller);
    }
    static getMetaDataOfHandler(handler, symbol) {
        if (_.has(handler, 'reference')) {
            const [controller, methodName] = handler.reference;
            const meta = Reflect.getMetadata(symbol, controller) || {};
            return meta[methodName || 'handle'];
        }
    }
}
//# sourceMappingURL=handler_metadata.js.map