@gabliam/web-core
Version:
Gabliam plugin for add web-core
30 lines (29 loc) • 736 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExecutionContext = void 0;
/**
* Execution context for the controller.
* This class can be injected in interceptors
*/
class ExecutionContext {
constructor(instance, methodInfo) {
this.instance = instance;
this.methodInfo = methodInfo;
}
getClass() {
return this.instance;
}
getConstructor() {
return this.instance.constructor;
}
getHandler() {
return this.instance[this.methodInfo.methodName];
}
getHandlerName() {
return this.methodInfo.methodName;
}
getMethodInfo() {
return this.methodInfo;
}
}
exports.ExecutionContext = ExecutionContext;